[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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user