summaryrefslogtreecommitdiff
path: root/addons/sms/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-10-09 02:08:17 +0200
committerChristophe Simonis <chs@odoo.com>2019-10-09 02:08:17 +0200
commitd74b4518052066446e2a1975a91ce53c745ca75a (patch)
treec08180f88a512d15e37fbec628931f02b3825f65 /addons/sms/static/src
parentec162dd0cb5622ab6e56db1a63dab5f531a96f4a (diff)
parentf4105eb9c7010f8693e5d2fd20c0bd9d9cc2e483 (diff)
[MERGE] forward port branch 13.0 up to f4105eb9c70
Diffstat (limited to 'addons/sms/static/src')
-rw-r--r--addons/sms/static/src/js/fields_phone_widget.js4
-rw-r--r--addons/sms/static/src/js/message.js4
-rw-r--r--addons/sms/static/src/scss/thread.scss2
-rw-r--r--addons/sms/static/src/xml/thread.xml9
4 files changed, 13 insertions, 6 deletions
diff --git a/addons/sms/static/src/js/fields_phone_widget.js b/addons/sms/static/src/js/fields_phone_widget.js
index ecbe784d22d..f269b26d0ed 100644
--- a/addons/sms/static/src/js/fields_phone_widget.js
+++ b/addons/sms/static/src/js/fields_phone_widget.js
@@ -58,8 +58,10 @@ Phone.include({
var $composerButton = $('<a>', {
title: _t('Send SMS Text Message'),
href: '',
- class: 'btn-sm btn-link mb4 fa fa-comment o_field_phone_sms',
+ class: 'ml-3 d-inline-flex align-items-center o_field_phone_sms',
+ html: $('<small>', {class: 'font-weight-bold ml-1', html: 'SMS'}),
});
+ $composerButton.prepend($('<i>', {class: 'fa fa-mobile'}));
$composerButton.on('click', this._onClickSMS.bind(this));
this.$el = $('<div/>').append(this.$el).append($composerButton);
}
diff --git a/addons/sms/static/src/js/message.js b/addons/sms/static/src/js/message.js
index b5463ae9f8f..27ab85b0d21 100644
--- a/addons/sms/static/src/js/message.js
+++ b/addons/sms/static/src/js/message.js
@@ -59,7 +59,9 @@ Message.include({
var sms = _.find(self._smsIds, function (sms) {
return sms[0] === smsID;
});
- sms[2] = smsStatus;
+ if (sms !== undefined && smsStatus !== undefined) {
+ sms[2] = smsStatus;
+ }
},
//--------------------------------------------------------------------------
diff --git a/addons/sms/static/src/scss/thread.scss b/addons/sms/static/src/scss/thread.scss
index ba4e54386c7..4d7d653eb02 100644
--- a/addons/sms/static/src/scss/thread.scss
+++ b/addons/sms/static/src/scss/thread.scss
@@ -1,4 +1,4 @@
-i.o_thread_message_sms.o_thread_message_sms_error {
+.o_thread_message_sms.o_thread_message_sms_error {
color: red;
opacity: 1;
cursor: pointer;
diff --git a/addons/sms/static/src/xml/thread.xml b/addons/sms/static/src/xml/thread.xml
index a28e70f0fa7..6fb9530a8f4 100644
--- a/addons/sms/static/src/xml/thread.xml
+++ b/addons/sms/static/src/xml/thread.xml
@@ -3,10 +3,13 @@
<t t-extend="mail.widget.Thread.Message">
<t t-jquery=".o_thread_tooltip_container" t-operation="after">
- <span t-if="message.getType() === 'sms' and message.hasSmsData() and options.displaySmsIcons" class="o_thread_sms_tooltip_container">
+ <span t-if="message.getType() === 'sms' and message.hasSmsData() and options.displaySmsIcons" class="o_thread_sms_tooltip_container ml-1">
<t t-set="thread_icon_class" t-value="'o_thread_sms_tooltip o_thread_message_sms o_thread_message_sms_' + message.getSmsStatus()" />
- <i t-attf-class="o_thread_sms_tooltip o_thread_message_sms o_thread_message_sms_#{message.getSmsStatus()} #{message.isError() ? 'o_thread_message_sms_error' : ''} fa fa-comment"
- t-att-data-message-id="message.getID()"/>
+ <span t-attf-class="d-inline-flex align-items-center o_thread_sms_tooltip o_thread_message_sms o_thread_message_sms_#{message.getSmsStatus()} #{message.isError() ? 'o_thread_message_sms_error' : ''}"
+ t-att-data-message-id="message.getID()">
+ <i class="fa fa-mobile"/>
+ <small class="font-weight-bold ml-1">SMS</small>
+ </span>
</span>
</t>
</t>