diff options
Diffstat (limited to 'addons/web_editor/static/src/js/editor/transcoder.js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/transcoder.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/addons/web_editor/static/src/js/editor/transcoder.js b/addons/web_editor/static/src/js/editor/transcoder.js index 11d23bf603b..058ea8ebcc7 100644 --- a/addons/web_editor/static/src/js/editor/transcoder.js +++ b/addons/web_editor/static/src/js/editor/transcoder.js @@ -1,7 +1,7 @@ odoo.define('web_editor.transcoder', function (require) { 'use strict'; -var widget = require('web_editor.widget'); +var base = require('web_editor.base'); var rulesCache = []; @@ -156,11 +156,11 @@ function fontToImg($editable) { $editable.find('.fa').each(function () { var $font = $(this); var icon, content; - _.find(widget.fontIcons, function (font) { - return _.find(widget.getCssSelectors(font.parser), function (css) { - if ($font.is(css[0].replace(/::?before/g, ''))) { - icon = css[2].split('-').shift(); - content = css[1].match(/content:\s*['"]?(.)['"]?/)[1]; + _.find(base.fontIcons, function (font) { + return _.find(base.getCssSelectors(font.parser), function (data) { + if ($font.is(data.selector.replace(/::?before/g, ''))) { + icon = data.names[0].split('-').shift(); + content = data.css.match(/content:\s*['"]?(.)['"]?/)[1]; return true; } }); |
