[IMP] web_editor: clean buttons from icon toolbar
Some buttons/actions were unsuitable for icons (were made for images).
fa-icon for toggle icon spin was misleading ("refresh").
task#2737569
closes odoo/odoo#104163
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -1874,6 +1874,14 @@ const Wysiwyg = Widget.extend({
|
||||
// Some icons are relevant for icons, that aren't for other media.
|
||||
this.toolbar.$el.find('#colorInputButtonGroup, #create-link').toggleClass('d-none', isInMedia && !$target.is('.fa'));
|
||||
this.toolbar.$el.find('.only_fa').toggleClass('d-none', !$target.is('.fa'));
|
||||
// Hide unsuitable buttons for icon
|
||||
if ($target.is('.fa')) {
|
||||
this.toolbar.$el.find([
|
||||
'#image-shape',
|
||||
'#image-width',
|
||||
'#image-edit',
|
||||
].join(',')).toggleClass('d-none', true);
|
||||
}
|
||||
// Hide the create-link button if the selection spans several blocks.
|
||||
selection = this.odooEditor.document.getSelection();
|
||||
const range = selection && selection.rangeCount && selection.getRangeAt(0);
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
</div>
|
||||
|
||||
<div class="btn-group only_fa">
|
||||
<div id="fa-spin" title="Toggle icon spin" class="editor-ignore btn fa fa-refresh"></div>
|
||||
<div id="fa-spin" title="Toggle icon spin" class="editor-ignore btn fa fa-play"></div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user