summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/composer.xml
diff options
context:
space:
mode:
authorDharmang Soni <dpr@odoo.com>2018-07-25 13:14:57 +0000
committerAlexandre Kühn <aku@odoo.com>2018-11-26 11:34:00 +0000
commitfb051d342085b4558de7cdf489527e8b888181df (patch)
treec80f784887d172c9f9ff6ecccd4880e7fa2d80e4 /addons/mail/static/src/xml/composer.xml
parentdb0f80ee537424c15e1bd1852b2e1dbdbedf4fea (diff)
[IMP] mail: Allowing drag/drop files/images on mail composer
By this commit user can upload attachments by drag and drop in chatter composer. This feature can be used from discuss UI, chat windows and form view chatter. Before this commit chatter unlinks the attachment if another attachment uploaded with same name. Criteria for removing duplicate attachment is changed with this commit. Now it will remove the attachment based on name and size of attachment. The reason for this change is, when you upload image with same name from different directory with old condition it was not possible to attach more then one image/file of same name. Related to task #32469 Closes #18914
Diffstat (limited to 'addons/mail/static/src/xml/composer.xml')
-rw-r--r--addons/mail/static/src/xml/composer.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml
index 7dd31393d34..883c9752035 100644
--- a/addons/mail/static/src/xml/composer.xml
+++ b/addons/mail/static/src/xml/composer.xml
@@ -2,12 +2,18 @@
<templates xml:space="preserve">
<div t-name="mail.Composer" t-attf-class="o_thread_composer #{widget.extended ? 'o_thread_composer_extended' : (widget.notInline ? '' : 'o_chat_inline_composer')} #{widget.isMini ? 'o_chat_mini_composer' : ''}">
+ <div t-if="widget.isMini || !widget.notInline" class="o_file_drop_zone_container d-none">
+ <h4>Drag Files Here <span class="fa fa-download"/></h4>
+ </div>
<div class="o_composer_container">
<img t-if="widget.avatarURL" height="36" width="36" class="o_thread_message_sidebar o_chatter_avatar rounded-circle" t-att-src="widget.avatarURL" alt="Avatar"/>
<div t-if="widget.extended" class="o_composer_subject">
<input tabindex="1" type="text" placeholder="Subject" class="o_input"/>
</div>
<div t-attf-class="o_composer #{widget.extended ? 'o_extended_composer' : ''}">
+ <div t-if="widget.notInline" class="o_file_drop_zone_container d-none">
+ <h4>Drag Files Here <span class="fa fa-download"/></h4>
+ </div>
<div class="o_composer_input">
<textarea class="o_input o_composer_text_field" tabindex="2" placeholder="Write something..."/>
<div class="o_chatter_composer_tools">