Browse Source

[FIX] change way for show "Send message" button

pull/22/head
x620 8 years ago
parent
commit
e8310c841b
  1. 4
      mail_base/static/src/js/base.js
  2. 5
      mail_sent/static/src/js/sent.js

4
mail_base/static/src/js/base.js

@ -63,6 +63,10 @@ var channel_seen = _.throttle(function (channel) {
var ChatAction = core.action_registry.get('mail.chat.instant_messaging');
ChatAction.include({
init: function(parent, action, options) {
this._super.apply(this, arguments);
this.show_send_message_button = ['channel_inbox'];
},
start: function() {
var result = this._super.apply(this, arguments);

5
mail_sent/static/src/js/sent.js

@ -20,12 +20,13 @@ var ChatAction = core.action_registry.get('mail.chat.instant_messaging');
ChatAction.include({
set_channel: function(channel){
var result = this._super.apply(this, arguments);
// Add "Send message" button in the Sent menu
this.show_send_message_button.push('channel_sent');
var self = this;
return $.when(result).done(function() {
// Add "Send message" button in the Sent menu
self.$buttons
.find('.o_mail_chat_button_new_message')
.toggle(channel.id === "channel_inbox" || channel.id === "channel_sent");
.toggle(self.show_send_message_button.includes(channel.id));
});
},
get_thread_rendering_options: function (messages) {

Loading…
Cancel
Save