diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-01-07 12:55:51 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-01-08 11:01:42 +0100 |
| commit | d26e5ac091e7e40ba1c7e90dc278ff613a3a504f (patch) | |
| tree | 1a15f8829a0751f118e1c4281914e547be96d46f /addons/website/static/src | |
| parent | f81698c86c3bd423a3323d7c0d8347b2584b40e9 (diff) | |
[FIX] website editor: Some elements display font-size more than range, add default size
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/summernote.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/website/static/src/js/summernote.js b/addons/website/static/src/js/summernote.js index bcfb980a296..59b7b78f7d6 100644 --- a/addons/website/static/src/js/summernote.js +++ b/addons/website/static/src/js/summernote.js @@ -771,7 +771,7 @@ define(['summernote/editing/Editor', 'summernote/summernote'], function (Editor) } if (from.parentNode === to) { while (from.lastChild) { - insertAfter(from.lastChild, from); + dom.insertAfter(from.lastChild, from); } } else { while (from.firstChild && from.firstChild != to) { @@ -1747,7 +1747,7 @@ define(['summernote/editing/Editor', 'summernote/summernote'], function (Editor) return false; }; - options.fontSizes = ['8', '9', '10', '11', '12', '14', '18', '24', '36']; + options.fontSizes = [_t('Default'), 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 62]; $.summernote.pluginEvents.applyFont = function (event, editor, layoutInfo, color, bgcolor, size) { var rng = range.create(); var startPoint = rng.getStartPoint(); @@ -1846,7 +1846,7 @@ define(['summernote/editing/Editor', 'summernote/summernote'], function (Editor) } if (size) { font.style.fontSize = "inherit"; - if (parseInt(window.getComputedStyle(font).fontSize, 10) != size) { + if (!isNaN(size) && Math.abs(parseInt(window.getComputedStyle(font).fontSize, 10)-size)/size > 0.05) { font.style.fontSize = size + "px"; } } |
