Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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.
  • Loading branch information
qsm-odoo committed Nov 20, 2017
1 parent 2c7851b commit dc67930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/web_editor/static/src/js/widgets.js
Expand Up @@ -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 () {
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit dc67930

Please sign in to comment.