summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js
diff options
context:
space:
mode:
authorAmit Patel (OpenERP) <apa@tinyerp.com>2012-04-24 14:59:25 +0530
committerAmit Patel (OpenERP) <apa@tinyerp.com>2012-04-24 14:59:25 +0530
commitdfc4e3fb0979d76e47376680fbefc2a33e38bcd3 (patch)
tree148f0e02cda3f890f40f0003d92334a44752e867 /addons/mail/static/src/js
parentc6bcc6d69fd7a1f8de0ad93baa642d5801b96a32 (diff)
parente9f015e217f1ff48d95e9b55a9515b7276240c48 (diff)
[MERGE]
bzr revid: apa@tinyerp.com-20120417112722-7rz5vvcg6eo0jf3e bzr revid: apa@tinyerp.com-20120419051214-j4wvjp9kz1w0zqs7 bzr revid: apa@tinyerp.com-20120423053400-unc6y6lonksopys3 bzr revid: apa@tinyerp.com-20120424092925-ezqfnppvfgocj94t
Diffstat (limited to 'addons/mail/static/src/js')
-rw-r--r--addons/mail/static/src/js/mail.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 20ff72645a2..d99674f98a7 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -275,6 +275,8 @@ openerp.mail = function(session) {
record.tr_body = this.do_truncate_string(record.body, this.params.msg_more_limit);
record.body = this.do_replace_internal_links(record.body);
if (record.tr_body) record.tr_body = this.do_replace_internal_links(record.tr_body);
+ // format date according to the user timezone
+ record.date = session.web.format_value(record.date, {type:"datetime"});
// render
$(session.web.qweb.render('ThreadMsg', {'record': record, 'thread': this, 'params': this.params, 'display': this.display})
).appendTo(this.$element.children('div.oe_mail_thread_display:first'));
@@ -388,6 +390,11 @@ openerp.mail = function(session) {
return this.fetch_comments(this.params.limit, this.params.offset, domain);
},
+ /**
+ *
+ * var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g);
+ * var regex_intlink = new RegExp(/(^|\s)#(\w*[a-zA-Z_]+\w*)\.(\w+[a-zA-Z_]+\w*),(\w+)/g);
+ */
do_replace_internal_links: function (string) {
var self = this;
var icon_list = ['al', 'pinky']
@@ -427,7 +434,6 @@ openerp.mail = function(session) {
/**
*
- * var regex_login = new RegExp(/(^|\s)@(\w*[a-zA-Z_.]+\w*\s)/g);
* var regex_login = new RegExp(/(^|\s)@((\w|@|\.)*)/g);
* var regex_intlink = new RegExp(/(^|\s)#(\w*[a-zA-Z_]+\w*)\.(\w+[a-zA-Z_]+\w*),(\w+)/g);
*/
@@ -485,11 +491,11 @@ openerp.mail = function(session) {
// bind buttons
this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); }).hide();
this.$element.find('button.oe_mail_button_follow').click(function () { self.do_follow(); })
- .mouseover(function () { $(this).html('Follow').addClass('following'); })
- .mouseleave(function () { $(this).html('Not following').removeClass('following'); });
+ .mouseover(function () { $(this).html('Follow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); })
+ .mouseleave(function () { $(this).html('Not following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); });
this.$element.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); })
- .mouseover(function () { $(this).html('Unfollow').removeClass('following').addClass('unfollow'); })
- .mouseleave(function () { $(this).html('Following').removeClass('unfollow').addClass('following'); });
+ .mouseover(function () { $(this).html('Unfollow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); })
+ .mouseleave(function () { $(this).html('Following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); });
this.reinit();
},