diff options
| author | Géry Debongnie <ged@odoo.com> | 2016-02-05 15:00:48 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2016-02-05 15:23:27 +0100 |
| commit | bc03c915d426409e8b1165eafb6cab61d539aa95 (patch) | |
| tree | 786c994be70dd256da98f6c3e20413d8f70d6af9 /addons/mail/static/src/js/thread.js | |
| parent | 9e31b5de2a6c4544a1fd5664fa23b9727e665a67 (diff) | |
[FIX] mail: various UI fixes
- correct template for undo snackbar
- better padding for chat windows
- recent messages now display 'now' instead of 'a few seconds ago'
Diffstat (limited to 'addons/mail/static/src/js/thread.js')
| -rw-r--r-- | addons/mail/static/src/js/thread.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/mail/static/src/js/thread.js b/addons/mail/static/src/js/thread.js index dc2467d3862..de61822b4de 100644 --- a/addons/mail/static/src/js/thread.js +++ b/addons/mail/static/src/js/thread.js @@ -137,8 +137,12 @@ var Thread = Widget.extend({ var date = msg.date.format('YYYY-MM-DD'); if (date === moment().format('YYYY-MM-DD')) { - msg.day = _t("Today"); - msg.hour = msg.date.fromNow(); + msg.day = _t("Today"); + if (moment().diff(msg.date, 'minutes') === 0) { + msg.hour = _t("now"); + } else { + msg.hour = msg.date.fromNow(); + } } else if (date === moment().subtract(1, 'days').format('YYYY-MM-DD')) { msg.day = _t("Yesterday"); msg.hour = msg.date.format('LT'); |
