[REV] mail: Move the attachment icon on the left
This revert of commit odoo/odoo@9cd3bcd440 is due to the attachment's button needing to be kept on the right side of the chatter's topbar. Task ID: 2193950 closes odoo/odoo#46958 X-original-commit: d458aca28c25879ca9878b0628f2a6ea703504ef Related: odoo/enterprise#9027 Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
This commit is contained in:
@@ -96,6 +96,11 @@ var Chatter = Widget.extend({
|
||||
*/
|
||||
start: function () {
|
||||
this._$topbar = this.$('.o_chatter_topbar');
|
||||
if(!this._disableAttachmentBox) {
|
||||
this.$('.o_topbar_right_area').append(QWeb.render('mail.chatter.Attachment.Button', {
|
||||
count: this.record.data.message_attachment_count || 0,
|
||||
}));
|
||||
}
|
||||
// render and append the buttons
|
||||
this._$topbar.prepend(this._renderButtons());
|
||||
// start and append the widgets
|
||||
@@ -455,8 +460,6 @@ var Chatter = Widget.extend({
|
||||
logNoteButton: this.hasLogButton,
|
||||
scheduleActivityButton: !!this.fields.activity,
|
||||
isMobile: config.device.isMobile,
|
||||
disableAttachmentBox: this._disableAttachmentBox,
|
||||
count: this.record.data.message_attachment_count || 0,
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -121,14 +121,20 @@
|
||||
<button t-if="scheduleActivityButton" class="btn btn-link o_chatter_button_schedule_activity" title="Log or schedule an activity" disabled="disabled">
|
||||
<i class="fa fa-clock-o" role="img" aria-label="Dates" title="Dates"/> <t t-if="isMobile">Activity</t><t t-else="">Schedule activity</t>
|
||||
</button>
|
||||
<t t-if="!disableAttachmentBox">
|
||||
<button class="btn btn-link o_chatter_button_attachment" title="View all the attachments of the current record">
|
||||
<span>
|
||||
<i class="fa fa-paperclip"/>
|
||||
<span class="o_chatter_attachment_button_count" t-esc="count"/>
|
||||
</span>
|
||||
</button>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<!--
|
||||
Chatter attachment paperclip button.
|
||||
|
||||
@param {integer} [count]
|
||||
-->
|
||||
<t t-name="mail.chatter.Attachment.Button">
|
||||
<button class="btn btn-link o_chatter_button_attachment" title="View all the attachments of the current record">
|
||||
<span>
|
||||
<i class="fa fa-paperclip"/>
|
||||
<span class="o_chatter_attachment_button_count" t-esc="count"/>
|
||||
</span>
|
||||
</button>
|
||||
</t>
|
||||
|
||||
<!--
|
||||
|
||||
Reference in New Issue
Block a user