diff options
| author | Thibault Delavallée <tde@odoo.com> | 2018-02-16 15:05:45 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2018-03-14 11:06:32 +0100 |
| commit | b4ecbcfaa30fcf73af9016a59f0bdea3eec32c38 (patch) | |
| tree | 1482b8811a5a7b51c275392e4f2c4428d16875d8 /addons/mail | |
| parent | 8de00fee3158de36875e51b9914e45fee6e029c3 (diff) | |
[REM] mail: remove o_mail_note class in chatter
Purpose of this commit is to clean a bit various classes and conditions.
First clean is the removal of o_mail_note class in activities less. It comes
from first implementation of activity widget and is not used anymore in
activity widgets rendering.
Second clean is the removal of o_mail_note class when displaying messages.
Only o_mail_discussion is used currently in chatter to make a different
background depending on whether the message is a discussion or not. All
we have to know to differentiate message display is whether it is a
discussion done by an user or not.
Tests have been updated to use o_mail_discussion class triggered by
the message being a discussion, aka a comment posted by an user.
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/static/src/less/mail_activity.less | 4 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/thread.xml | 2 | ||||
| -rw-r--r-- | addons/mail/static/tests/chatter_tests.js | 12 |
3 files changed, 7 insertions, 11 deletions
diff --git a/addons/mail/static/src/less/mail_activity.less b/addons/mail/static/src/less/mail_activity.less index 9d792ddb6af..c9fd7c8595c 100644 --- a/addons/mail/static/src/less/mail_activity.less +++ b/addons/mail/static/src/less/mail_activity.less @@ -102,10 +102,6 @@ } } - .o_thread_message_core.o_mail_note { - padding: 0px 3px; - } - .o_activity_color_default { color: #dddddd; } diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml index 26c093c3e84..5568729b02d 100644 --- a/addons/mail/static/src/xml/thread.xml +++ b/addons/mail/static/src/xml/thread.xml @@ -157,7 +157,7 @@ t-att-class="'fa o_thread_message_star o_thread_icon ' + (message.is_starred ? 'fa-star' : 'fa-star-o')" t-att-data-message-id="message.id" title="Mark as Todo"/> </div> - <div t-att-class="'o_thread_message_core' + (message.is_note ? ' o_mail_note' : '')"> + <div class='o_thread_message_core'> <p t-if="message.display_author" class="o_mail_info"> <t t-if="message.is_note"> Note by diff --git a/addons/mail/static/tests/chatter_tests.js b/addons/mail/static/tests/chatter_tests.js index a63e074ef4a..b1a395eb9cc 100644 --- a/addons/mail/static/tests/chatter_tests.js +++ b/addons/mail/static/tests/chatter_tests.js @@ -463,8 +463,8 @@ QUnit.test('chatter: post, receive and star messages', function (assert) { assert.ok(form.$('.o_chatter_topbar .o_chatter_button_log_note').length, "log note button should be available"); assert.strictEqual(form.$('.o_thread_message').length, 1, "thread should contain one message"); - assert.ok(!form.$('.o_thread_message:first() .o_mail_note').length, - "the message shouldn't be a note"); + assert.ok(form.$('.o_thread_message:first().o_mail_discussion').length, + "the message should be a discussion"); assert.ok(form.$('.o_thread_message:first() .o_thread_message_core').text().indexOf('A message') >= 0, "the message's body should be correct"); assert.ok(form.$('.o_thread_message:first() .o_mail_info').text().indexOf('John Doe') >= 0, @@ -477,8 +477,8 @@ QUnit.test('chatter: post, receive and star messages', function (assert) { form.$('.oe_chatter .o_composer_button_send').click(); assert.ok($('.oe_chatter .o_chat_composer').hasClass('o_hidden'), "chatter should be closed"); assert.strictEqual(form.$('.o_thread_message').length, 2, "thread should contain two messages"); - assert.ok(!form.$('.o_thread_message:first() .o_mail_note').length, - "the last message shouldn't be a note"); + assert.ok(form.$('.o_thread_message:first().o_mail_discussion').length, + "the last message should be a discussion"); assert.ok(form.$('.o_thread_message:first() .o_thread_message_core').text().indexOf('My first message') >= 0, "the message's body should be correct"); assert.ok(form.$('.o_thread_message:first() .o_mail_info').text().indexOf('Me') >= 0, @@ -491,8 +491,8 @@ QUnit.test('chatter: post, receive and star messages', function (assert) { form.$('.oe_chatter .o_composer_button_send').click(); assert.ok($('.oe_chatter .o_chat_composer').hasClass('o_hidden'), "chatter should be closed"); assert.strictEqual(form.$('.o_thread_message').length, 3, "thread should contain three messages"); - assert.ok(form.$('.o_thread_message:first() .o_mail_note').length, - "the last message should be a note"); + assert.ok(!form.$('.o_thread_message:first().o_mail_discussion').length, + "the last message should not be a discussion"); assert.ok(form.$('.o_thread_message:first() .o_thread_message_core').text().indexOf('My first note') >= 0, "the message's body should be correct"); assert.ok(form.$('.o_thread_message:first() .o_mail_info').text().indexOf('Me') >= 0, |
