[FIX] web_editor: highlight selected fa icon on media dialog start

When editing a fa icon in the editor, the current fa icon was not
properly selected anymore.

Note: the code is still to be improved to handle all cases but this
will be done in master.
This commit is contained in:
qsm-odoo
2017-11-20 10:38:45 +01:00
parent 2c7851b8ee
commit dc679308d6
+2 -2
View File
@@ -617,7 +617,7 @@ var fontIconsDialog = Widget.extend({
e.stopPropagation();
this.$('#fa-icon').val(e.target.getAttribute('data-id'));
$(".font-icons-icon").removeClass("o_selected");
this.$(".font-icons-icon").removeClass("o_selected");
$(e.target).addClass("o_selected");
},
'dblclick .font-icons-icon': function () {
@@ -743,7 +743,7 @@ var fontIconsDialog = Widget.extend({
continue;
case '': continue;
default:
$(".font-icons-icon").removeClass("o_selected").filter("[data-alias*=',"+cls+",']").addClass("o_selected");
this.$(".font-icons-icon").removeClass("o_selected").filter("[data-alias*=',"+cls+",']").addClass("o_selected");
if (this.alias.indexOf(cls) !== -1) {
this.$('#fa-icon').val(cls);
}