summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomainLibert <rli@odoo.com>2019-06-27 18:48:36 +0200
committerYannick Tivisse <yti@odoo.com>2019-07-05 13:03:18 +0200
commit9cd3bcd4408be76168e1ab4c08f2d8e187096d79 (patch)
tree4826e94cd60f7fe89e0fce27c94dbf74caf96f25
parenta4f33b5bf5f0188251221fce7db8dd6e8b218005 (diff)
[IMP] mail: Move the attachment icon on the left
This is much better.
-rw-r--r--addons/mail/static/src/js/chatter.js9
-rw-r--r--addons/mail/static/src/xml/chatter.xml7
2 files changed, 9 insertions, 7 deletions
diff --git a/addons/mail/static/src/js/chatter.js b/addons/mail/static/src/js/chatter.js
index 7cabe960cdb..164a24cd7b8 100644
--- a/addons/mail/static/src/js/chatter.js
+++ b/addons/mail/static/src/js/chatter.js
@@ -89,18 +89,15 @@ 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', {
- displayCounter: !!this.fields.thread,
- count: this.record.data.message_attachment_count || 0,
- }));
- }
// render and append the buttons
this._$topbar.prepend(QWeb.render('mail.chatter.Buttons', {
newMessageButton: !!this.fields.thread,
logNoteButton: this.hasLogButton,
scheduleActivityButton: !!this.fields.activity,
isMobile: config.device.isMobile,
+ disableAttachmentBox: this._disableAttachmentBox,
+ displayCounter: !!this.fields.thread,
+ count: this.record.data.message_attachment_count || 0,
}));
// start and append the widgets
var fieldDefs = _.invoke(this.fields, 'appendTo', $('<div>'));
diff --git a/addons/mail/static/src/xml/chatter.xml b/addons/mail/static/src/xml/chatter.xml
index 23202f608b9..c302320302c 100644
--- a/addons/mail/static/src/xml/chatter.xml
+++ b/addons/mail/static/src/xml/chatter.xml
@@ -110,7 +110,12 @@
<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">
+ <t t-call="mail.chatter.Attachment.Button">
+ <t t-set="displayCounter" t-value="displayCounter"/>
+ <t t-set="count" t-value="count"/>
+ </t>
+ </t>
</t>
<!--