summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/chat_window.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-10-05 12:00:19 +0200
committerAaron Bohy <aab@odoo.com>2015-10-06 16:24:09 +0200
commitaab4ef752e4607e7e7a5558d1bf0d884b716e22f (patch)
tree2c78d82e8cdb21c90e26802bc4b08e86cfff7a5e /addons/mail/static/src/js/chat_window.js
parent212bbf1f7e6d8e14b4017c1683655ed0e823db3f (diff)
[IMP] mail: thread: parameterize the display of messages' star
To allow hiding it in livechat windows on the website.
Diffstat (limited to 'addons/mail/static/src/js/chat_window.js')
-rw-r--r--addons/mail/static/src/js/chat_window.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/chat_window.js b/addons/mail/static/src/js/chat_window.js
index 3a50082e017..73f2ffd7c56 100644
--- a/addons/mail/static/src/js/chat_window.js
+++ b/addons/mail/static/src/js/chat_window.js
@@ -16,12 +16,15 @@ return Widget.extend({
"click .o_chat_title": "on_click_fold",
},
- init: function (parent, channel_id, title, is_folded) {
+ init: function (parent, channel_id, title, is_folded, options) {
this._super(parent);
this.title = title;
this.channel_id = channel_id;
this.placeholder = _t("Say something");
this.folded = is_folded;
+ this.options = _.defaults(options || {}, {
+ display_stars: true,
+ });
},
start: function () {
this.$content = this.$('.o_chat_content');
@@ -30,6 +33,7 @@ return Widget.extend({
this.thread = new ChatThread(this, {
display_avatar: false,
display_needactions: false,
+ display_stars: this.options.display_stars,
});
this.thread.on('toggle_star_status', this, function (message_id) {
this.trigger('toggle_star_status', message_id);