[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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user