[FIX] web_editor: hide link buttons duplicates instead of removing them

For example, if primary = alpha, the primary button option is removed
in the link dialog. When editing a primary button, this lead to broken
behaviors. Hiding the button does the trick.
This commit is contained in:
qsm-odoo
2018-10-19 09:58:00 +00:00
parent b154709645
commit 932fdb4e24
@@ -1466,7 +1466,7 @@ var LinkDialog = Dialog.extend({
var $btn = $(btn);
var color = $btn.css('background-color');
if (_.contains(colors, color)) {
$btn.remove();
$btn.hide(); // Not remove to be able to edit buttons with those styles
} else {
colors.push(color);
}