diff options
| author | Alexandre Kühn <aku@odoo.com> | 2018-06-22 16:23:02 +0200 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2018-06-22 16:31:54 +0200 |
| commit | e503b0b3a4a521ae9f36e4c6e151bc7b80938b92 (patch) | |
| tree | 676fed13ef7af183b3c5cf2a44b0406b14f38540 /addons/im_support/static/src | |
| parent | e4d3dfba49b736740522cfcb89797d90ffd4604d (diff) | |
[FIX] im_support: fix style of attachment button in discuss composer
Before this commit, there was a visual bug on the attachment button
of a composer in discuss: instead of being next to the emoji button,
it was places below it.
This is due to the intent of displaying the attachment button only
for threads that are not the support channel. To do so, it uses the
jQuery methods `$.show()` and `$.hide()` on the considered DOM element.
The problem is that these methods change the `display` attribute of the
DOM element, so that when `$.show()` is called, it sets the display to
`block`, which causes the visual glitch.
With this commit, we use the classname `o_hidden` instead of the jQuery
methods, so that the attribute `display` is unchanged.
Diffstat (limited to 'addons/im_support/static/src')
| -rw-r--r-- | addons/im_support/static/src/js/discuss.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/im_support/static/src/js/discuss.js b/addons/im_support/static/src/js/discuss.js index df2526a2a26..0f29370b049 100644 --- a/addons/im_support/static/src/js/discuss.js +++ b/addons/im_support/static/src/js/discuss.js @@ -42,9 +42,9 @@ Discuss.include({ if (!channel.available) { self.basicComposer.do_hide(); } - $buttonAddAttachment.hide(); + $buttonAddAttachment.toggleClass('o_hidden', true); } else { - $buttonAddAttachment.show(); + $buttonAddAttachment.toggleClass('o_hidden', false); } }); }, |
