summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/summernote.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-02-24 13:13:12 +0100
committerqsm-odoo <qsm@odoo.com>2016-02-24 13:47:36 +0100
commit6610d05549e347fbb548e606fa66cfb113df9e67 (patch)
treefc750ca544b5caa135791c0eaeb10dfee17eefa3 /addons/web_editor/static/src/js/summernote.js
parent58c5ff1d4f64f16d43106e6b00f0b94fe63506c2 (diff)
[REF] web_editor,website,mass_mailing: JS/XML update
* Adapt DOM selectors * Refactore dialog XMLs to have odoo styling * New editor options (background-position, ...) * Various improvements
Diffstat (limited to 'addons/web_editor/static/src/js/summernote.js')
-rw-r--r--addons/web_editor/static/src/js/summernote.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js
index 775c4398268..5c9e86dc8df 100644
--- a/addons/web_editor/static/src/js/summernote.js
+++ b/addons/web_editor/static/src/js/summernote.js
@@ -977,7 +977,7 @@ $.summernote.pluginEvents.tab = function (event, editor, layoutInfo, outdent) {
$.summernote.pluginEvents.indent(event, editor, layoutInfo);
}
} else {
- if (!outdent){
+ if (!outdent) {
if(dom.isText(r.sc)) {
var next = r.sc.splitText(r.so);
} else {
@@ -1876,11 +1876,11 @@ eventHandler.modules.toolbar.button.updateRecentColor = function (elBtn, sEvent,
font.style.color = sValue !== 'inherit' ? sValue : "";
}
} else {
- font.className = font.className.replace(/(^|\s+)bg-\S+/, '');
if (sValue.indexOf('bg-') !== -1) {
font.className += ' ' + sValue;
font.style.backgroundColor = "";
} else {
+ font.className = font.className.replace(/(^|\s+)bg-\S+/, '');
font.style.backgroundColor = sValue !== 'inherit' ? sValue : "";
}
}
@@ -1905,7 +1905,7 @@ eventHandler.modules.editor.redo = function ($popover) {
// use image toolbar if current range is on image
var fn_editor_currentstyle = eventHandler.modules.editor.currentStyle;
-eventHandler.modules.editor.currentStyle = function(target) {
+eventHandler.modules.editor.currentStyle = function (target) {
var styleInfo = fn_editor_currentstyle.apply(this, arguments);
// with our changes for inline editor, the targeted element could be a button of the editor
if(!styleInfo.image || !dom.isEditable(styleInfo.image)) {