diff options
| author | Thibault Delavallée <tde@openerp.com> | 2015-03-30 12:52:26 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2015-04-27 10:36:15 +0200 |
| commit | 4b122ad41d873febe288ab1f8c6cdc078ca2a479 (patch) | |
| tree | 9792fcbc0c61274ca6296e3ce6c2f67a2467b377 /addons/mail/static/src | |
| parent | b7f04278bd5375d6dc21a3381df91c725bb2fd44 (diff) | |
[MIGR] mail: migration to the new API
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 4 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 6bd7ba36378..8d0b19d605e 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -1001,7 +1001,7 @@ var ThreadMessage = MessageCommon.extend({ var domain = mail_utils.expand_domain( this.options.root_thread.domain ) .concat([["id", "in", message_ids ]]); - return this.parent_thread.ds_message.call('message_read', [undefined, domain, [], !!this.parent_thread.options.display_indented_thread, this.context, this.parent_thread.id]) + return this.parent_thread.ds_message.call('message_read_wrapper', [undefined, domain, [], !!this.parent_thread.options.display_indented_thread, this.context, this.parent_thread.id]) .then( function (records) { // remove message not loaded _.map(messages, function (msg) { @@ -1366,7 +1366,7 @@ var Thread = Widget.extend({ * @param {Array} ids read (if the are some ids, the method don't use the domain) */ message_fetch: function (replace_domain, replace_context, ids, callback) { - return this.ds_message.call('message_read', [ + return this.ds_message.call('message_read_wrapper', [ // ids force to read ids === false ? undefined : ids && ids.slice(0, this.options.fetch_limit), // domain + additional diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index f97d036bb2a..295a8a1da10 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -230,7 +230,7 @@ <!-- default layout --> <t t-name="mail.thread.message"> - <div t-attf-class="oe_msg #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} #{widget.subtype ? '' : 'oe_msg_nobody'} oe_msg_#{widget.type}"> + <div t-attf-class="oe_msg #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} #{widget.subtype ? '' : 'oe_msg_nobody'} oe_msg_#{widget.message_type}"> <div class='oe_msg_left'> <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}" t-att-title="widget.author_id[1]"> @@ -274,22 +274,22 @@ </t> <a t-if="widget.author_id and widget.options.show_link and widget.author_id[0]" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}" t-att-data-partner="widget.author_id[0]" class="oe_mail_action_author"><t t-esc="widget.author_id[2]"/></a> <span t-if="widget.author_id and (!widget.options.show_link or !widget.author_id[0])"><t t-esc="widget.author_id[2]"/></span> - <t t-if="widget.type == 'notification'"> + <t t-if="widget.message_type == 'notification'"> updated document <t t-if="widget.partner_ids.length > 0"> <span class='oe_subtle'>•</span> </t> </t> - <t t-if="widget.type == 'comment' and ! widget.subtype and widget.partner_ids.length == 0"> + <t t-if="widget.message_type == 'comment' and ! widget.subtype and widget.partner_ids.length == 0"> logged a note </t> - <t t-if="(widget.type == 'comment' or widget.type == 'email') and (widget.subtype or widget.partner_ids.length > 0)"> + <t t-if="(widget.message_type == 'comment' or widget.message_type == 'email') and (widget.subtype or widget.partner_ids.length > 0)"> <!-- Remove nobody if user have no rights on partner that will display 'portal to nobody 5 minutes ago' that will confuse to end user, now it display 'portal 5 minutes ago' if no rights.--> <t t-if="widget.partner_ids.length > 0"> to </t> </t> - <t t-if="widget.type == 'notification' or ( (widget.type == 'email' or widget.type == 'comment') and (widget.subtype or widget.partner_ids.length > 0))" + <t t-if="widget.message_type == 'notification' or ( (widget.message_type == 'email' or widget.message_type == 'comment') and (widget.subtype or widget.partner_ids.length > 0))" t-foreach="widget.partner_ids.slice(0, 3)" t-as="partner"> <span t-attf-class="oe_partner_follower"> <a t-if="widget.options.show_link" t-attf-href="#model=res.partner&id=#{partner[0]}" t-att-data-partner="partner[0]" class="oe_mail_action_author"><t t-esc="partner[1]"/></a> @@ -300,7 +300,7 @@ <t t-if="widget.partner_ids.length > 3"> <span t-att-title="widget.extra_partners_str">and <t t-esc="widget.extra_partners_nbr"/> more</span> </t> - <t t-if="widget.type == 'notification' and widget.partner_ids.length > 0"> + <t t-if="widget.message_type == 'notification' and widget.partner_ids.length > 0"> notified </t> <span class='oe_subtle'>•</span> @@ -317,7 +317,7 @@ <!-- expandable message layout --> <t t-name="mail.thread.expandable"> - <div t-attf-class="oe_msg oe_msg_#{widget.type} #{widget.max_limit ? 'oe_max_limit' : ''} #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}"> + <div t-attf-class="oe_msg oe_msg_#{widget.message_type} #{widget.max_limit ? 'oe_max_limit' : ''} #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}"> <div class="oe_msg_content oe_msg_more_message"> <div class='oe_separator'></div> <a t-if="widget.nb_messages <= 0" class="oe_msg_fetch_more">show more message</a> |
