summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/mail_utils.js
diff options
context:
space:
mode:
authorValerie Pirenne <vpi@odoo.com>2015-04-29 17:32:49 +0200
committerThibault Delavallée <tde@openerp.com>2015-05-21 12:10:25 +0200
commitc24332e6da68dbed28ea8ab4702a97c49860d374 (patch)
treed4b4cd321b0a591ebcf11f2f3313d727ce8ec807 /addons/mail/static/src/js/mail_utils.js
parent946d245c2b73aa0d3ba1784626fd67e31a6c66a9 (diff)
[IMP][ADD] mail, various: timeline view.
This commit introduces a new view type, the timeline view. This view is intended to display messages like the previous chatter. This is now a view like the form or list view. Like other views it will be possible to have custom templates for some specific needs, allowing customization. [IMP] mail: the value tracking is modified. Previously messages were created containing the modified values. Those values are now stored, using a new model mail.tracking.value. The message body is dynamically build based on the values. Tests have been updated. This version is temporary. Indeed two main modifications will come in a short future : - the new design will improve the display - the slack mode will change the way the Inbox and notifications are managed All glory to the Hypnotoad. Special thanks to Valerie Pirenne (vpi), Jerome Maes (jem) and Richat Mathot (rim) that did not code but said a lot of things. Martin Trigaux (mat) did nothing, a bit like for the slides modules, but he is busy sending emails.
Diffstat (limited to 'addons/mail/static/src/js/mail_utils.js')
-rw-r--r--addons/mail/static/src/js/mail_utils.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/mail_utils.js b/addons/mail/static/src/js/mail_utils.js
index 0634e240340..b30968304aa 100644
--- a/addons/mail/static/src/js/mail_utils.js
+++ b/addons/mail/static/src/js/mail_utils.js
@@ -107,6 +107,22 @@ function breakword(str){
return out;
}
+function bindTooltipTo($el, value, position) {
+ $el.tooltip({
+ 'title': value,
+ 'placement': position,
+ 'html': true,
+ 'trigger': 'manual',
+ 'animation': false,
+ }).on("mouseleave", function () {
+ setTimeout(function () {
+ if (!$(".tooltip:hover").length) {
+ $el.tooltip("hide");
+ }
+ }, 100);
+ });
+}
+
return {
parse_email: parse_email,
get_image: get_image,
@@ -115,6 +131,7 @@ return {
get_text2html: get_text2html,
expand_domain: expand_domain,
breakword: breakword,
+ bindTooltipTo: bindTooltipTo,
};
});