diff options
Diffstat (limited to 'addons/mail/static/src/js/mail.js')
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 16 |
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(); }, |
