diff options
Diffstat (limited to 'addons/note/static/src')
| -rw-r--r-- | addons/note/static/src/js/systray_activity_menu.js (renamed from addons/note/static/src/js/systray.js) | 14 | ||||
| -rw-r--r-- | addons/note/static/src/scss/note.scss | 8 | ||||
| -rw-r--r-- | addons/note/static/src/xml/systray.xml | 12 |
3 files changed, 18 insertions, 16 deletions
diff --git a/addons/note/static/src/js/systray.js b/addons/note/static/src/js/systray_activity_menu.js index 54a2fe6bdd1..8194cc17e6a 100644 --- a/addons/note/static/src/js/systray.js +++ b/addons/note/static/src/js/systray_activity_menu.js @@ -1,8 +1,9 @@ -odoo.define('note.systray', function (require) { +odoo.define('note.systray.ActivityMenu', function (require) { "use strict"; +var ActivityMenu = require('mail.systray.ActivityMenu'); + var core = require('web.core'); -var ActivityMenu = require('mail.systray').ActivityMenu; var datepicker = require('web.datepicker'); var _t = core._t; @@ -24,8 +25,10 @@ ActivityMenu.include({ */ _getActivityData: function () { var self = this; - return this._super.apply(this, arguments).then(function() { - var reminderIndex = _.findIndex(self.activities, function (val) { return val.model == 'note.note'; }); + return this._super.apply(this, arguments).then(function () { + var reminderIndex = _.findIndex(self.activities, function (val) { + return val.model === 'note.note'; + }); if (reminderIndex > 0) { self.activities.splice(0, 0, self.activities.splice(reminderIndex, 1)[0]); } @@ -60,7 +63,7 @@ ActivityMenu.include({ */ _onActivityFilterClick: function (ev) { var $el = $(ev.currentTarget); - if(!$el.hasClass("o_note")) { + if (!$el.hasClass("o_note")) { var data = _.extend({}, $el.data(), $(ev.target).data()); if (data.res_model === "note.note" && data.filter === "my") { this.do_action({ @@ -90,7 +93,6 @@ ActivityMenu.include({ this.noteDateTimeWidget.$input.attr('placeholder', _t("Today")); this.$('.o_note_show, .o_note').toggleClass('hidden'); this.$('.o_note_input').val('').focus(); - }, /** * When focusing on input for new quick note systerm tray must be open. diff --git a/addons/note/static/src/scss/note.scss b/addons/note/static/src/scss/note.scss index 428c58ec28e..f1e90d80d57 100644 --- a/addons/note/static/src/scss/note.scss +++ b/addons/note/static/src/scss/note.scss @@ -25,11 +25,11 @@ } // Quick create notes from systray -.o_note.o_mail_channel_preview { +.o_note.o_mail_preview { background-color: white; - .o_channel_info { - .o_channel_title { - .o_channel_name { + .o_preview_info { + .o_preview_title { + .o_preview_name { @include o-flex(1, 1, 100%); } } diff --git a/addons/note/static/src/xml/systray.xml b/addons/note/static/src/xml/systray.xml index 827bf0159a8..d1676c63761 100644 --- a/addons/note/static/src/xml/systray.xml +++ b/addons/note/static/src/xml/systray.xml @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="UTF-8"?> <templates> - <t t-extend="mail.chat.ActivityMenuPreview"> + <t t-extend="mail.systray.ActivityMenu.Previews"> <t t-jquery="t[t-foreach*='activities'][t-as*='activity']" t-operation="after"> <div class="o_note_show"> <a role="button" class="btn btn-block text-center">Add new note</a> </div> - <div class="o_note o_mail_channel_preview hidden"> - <div class="o_mail_channel_image o_mail_channel_app"> + <div class="o_note o_mail_preview hidden"> + <div class="o_mail_preview_image o_mail_preview_app"> <img src="/note/static/description/icon.png" alt="Channel"/> </div> - <div class="o_channel_info"> - <div class="o_channel_title"> - <span class="o_channel_name"><strong>Add a note</strong></span> + <div class="o_preview_info"> + <div class="o_preview_title"> + <span class="o_preview_name"><strong>Add a note</strong></span> <div class="o_note_datetime"/> <span class="ml4"> <a class="o_note_set_datetime text-muted"> |
