summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/js/mail.js14
-rw-r--r--addons/mail/static/src/js/mail_followers.js18
-rw-r--r--addons/mail/static/src/js/many2many_tags_email.js2
-rw-r--r--addons/mail/static/src/xml/mail.xml4
4 files changed, 19 insertions, 19 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index 1eb3c29e556..7acebe9b1df 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -357,7 +357,7 @@ openerp.mail = function (session) {
this.context.default_parent_id,
attachments,
this.parent_thread.context
- ]).then(function (record) {
+ ]).done(function (record) {
var thread = self.parent_thread;
// create object and attach to the thread object
thread.message_fetch(false, false, [record], function (arg, data) {
@@ -745,7 +745,7 @@ openerp.mail = function (session) {
}
// if this message is read, all childs message display is read
- this.ds_notification.call('set_message_read', [ [this.id].concat( this.get_child_ids() ) , this.to_read, this.context]).pipe(function () {
+ this.ds_notification.call('set_message_read', [ [this.id].concat( this.get_child_ids() ) , this.to_read, this.context]).then(function () {
self.$el.removeClass(self.to_read ? 'oe_msg_unread':'oe_msg_read').addClass(self.to_read ? 'oe_msg_read':'oe_msg_unread');
self.to_read = !self.to_read;
});
@@ -802,7 +802,7 @@ openerp.mail = function (session) {
on_vote: function (event) {
event.stopPropagation();
var self=this;
- return this.ds_message.call('vote_toggle', [[self.id]]).pipe(function (vote) {
+ return this.ds_message.call('vote_toggle', [[self.id]]).then(function (vote) {
self.has_voted = vote;
self.vote_nb += self.has_voted ? 1 : -1;
self.display_vote();
@@ -827,7 +827,7 @@ openerp.mail = function (session) {
event.stopPropagation();
var self=this;
var button = self.$('.oe_star:first');
- return this.ds_message.call('favorite_toggle', [[self.id]]).pipe(function (star) {
+ return this.ds_message.call('favorite_toggle', [[self.id]]).then(function (star) {
self.is_favorite=star;
if (self.is_favorite) {
button.addClass('oe_starred');
@@ -1112,7 +1112,7 @@ openerp.mail = function (session) {
var thread_level = this.options.display_indented_thread > this.thread_level ? this.options.display_indented_thread - this.thread_level : 0;
return this.ds_message.call('message_read', [ids, fetch_domain, message_loaded_ids, thread_level, fetch_context, this.context.default_parent_id || undefined])
- .then(callback ? _.bind(callback, this, arguments) : this.proxy('switch_new_message'));
+ .done(callback ? _.bind(callback, this, arguments) : this.proxy('switch_new_message'));
},
/**
@@ -1581,7 +1581,7 @@ openerp.mail = function (session) {
load_searchview: function (defaults, hidden) {
var self = this;
this.searchview = new session.web.SearchView(this, this.ds_msg, false, defaults || {}, hidden || false);
- return this.searchview.appendTo(this.$('.oe_view_manager_view_search')).then(function () {
+ return this.searchview.appendTo(this.$('.oe_view_manager_view_search')).done(function () {
self.searchview.on('search_data', self, self.do_searchview_search);
});
},
@@ -1599,7 +1599,7 @@ openerp.mail = function (session) {
domains: domains || [],
contexts: contexts || [],
group_by_seq: groupbys || []
- }).then(function (results) {
+ }).done(function (results) {
self.search_results['context'] = results.context;
self.search_results['domain'] = results.domain;
self.root.destroy();
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index a13d2048bf3..a5a97f48d26 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -85,7 +85,7 @@ openerp_mail_followers = function(session, mail) {
read_value: function () {
var self = this;
- return this.ds_model.read_ids([this.view.datarecord.id], ['message_follower_ids']).pipe(function (results) {
+ return this.ds_model.read_ids([this.view.datarecord.id], ['message_follower_ids']).then(function (results) {
self.set_value(results[0].message_follower_ids);
});
},
@@ -98,9 +98,9 @@ openerp_mail_followers = function(session, mail) {
fetch_followers: function (value_) {
this.value = value_ || {};
return this.ds_follow.call('read', [this.value, ['name', 'user_ids']])
- .pipe(this.proxy('display_followers'), this.proxy('fetch_generic'))
- .pipe(this.proxy('display_buttons'))
- .pipe(this.proxy('fetch_subtypes'));
+ .then(this.proxy('display_followers'), this.proxy('fetch_generic'))
+ .then(this.proxy('display_buttons'))
+ .then(this.proxy('fetch_subtypes'));
},
/** Read on res.partner failed: fall back on a generic case
@@ -109,10 +109,10 @@ openerp_mail_followers = function(session, mail) {
fetch_generic: function (error, event) {
var self = this;
event.preventDefault();
- return this.ds_users.call('read', [this.session.uid, ['partner_id']]).pipe(function (results) {
+ return this.ds_users.call('read', [this.session.uid, ['partner_id']]).then(function (results) {
var pid = results['partner_id'][0];
self.message_is_follower = (_.indexOf(self.get('value'), pid) != -1);
- }).pipe(self.proxy('display_generic'));
+ }).then(self.proxy('display_generic'));
},
_format_followers: function(count){
// TDE note: why redefining _t ?
@@ -179,7 +179,7 @@ openerp_mail_followers = function(session, mail) {
var subtype_list_ul = this.$('.oe_subtype_list').empty();
if (! this.message_is_follower) return;
var context = new session.web.CompoundContext(this.build_context(), {});
- this.ds_model.call('message_get_subscription_data', [[this.view.datarecord.id], context]).pipe(this.proxy('display_subtypes'));
+ this.ds_model.call('message_get_subscription_data', [[this.view.datarecord.id], context]).then(this.proxy('display_subtypes'));
},
/** Display subtypes: {'name': default, followed} */
@@ -206,7 +206,7 @@ openerp_mail_followers = function(session, mail) {
$(record).attr('checked',false);
});
var context = new session.web.CompoundContext(this.build_context(), {});
- return this.ds_model.call('message_unsubscribe_users', [[this.view.datarecord.id], [this.session.uid], context]).pipe(this.proxy('read_value'));
+ return this.ds_model.call('message_unsubscribe_users', [[this.view.datarecord.id], [this.session.uid], context]).then(this.proxy('read_value'));
},
do_update_subscription: function (event) {
@@ -221,7 +221,7 @@ openerp_mail_followers = function(session, mail) {
var context = new session.web.CompoundContext(this.build_context(), {});
return this.ds_model.call('message_subscribe_users', [[this.view.datarecord.id], [this.session.uid], this.message_is_follower ? checklist:undefined, context])
- .pipe(this.proxy('read_value'));
+ .then(this.proxy('read_value'));
},
});
};
diff --git a/addons/mail/static/src/js/many2many_tags_email.js b/addons/mail/static/src/js/many2many_tags_email.js
index 52dcbf7aeb5..cc701e8a585 100644
--- a/addons/mail/static/src/js/many2many_tags_email.js
+++ b/addons/mail/static/src/js/many2many_tags_email.js
@@ -46,7 +46,7 @@ instance.web.form.FieldMany2ManyTagsEmail = instance.web.form.FieldMany2ManyTags
["email", "=", false],
["notification_email_send", "in", ['all', 'comment']] ]],
{context: this.build_context()})
- .pipe(function (record_ids) {
+ .then(function (record_ids) {
// valid partner
var valid_partner = _.difference(ids, record_ids);
self.values = self.values.concat(valid_partner);
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index caa85cd3deb..bfd0e4cd10f 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -197,8 +197,8 @@
<div class="oe_msg_center">
<div class='oe_msg_icons'>
- <span class='oe_read' t-if="widget.show_read_unread_button"><a title="Read" class="oe_e">X</a></span>
- <span class='oe_unread' t-if="widget.show_read_unread_button"><a title="Set back to unread" class="oe_e">v</a></span>
+ <span class='oe_read' t-if="widget.show_read_unread_button"><a title="Mark as read" class="oe_e">X</a></span>
+ <span class='oe_unread' t-if="widget.show_read_unread_button"><a title="Mark as unread" class="oe_e">v</a></span>
<span class='oe_reply' t-if="widget.show_reply_button"><a title="Reply" class="oe_e">(</a></span>
<span t-attf-class="oe_star #{widget.is_favorite?'oe_starred':''}"><a title="Add To Favorites" class="oe_e">7</a></span>
</div>