summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/transcoder.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-02-02 14:48:31 +0100
committerChristophe Simonis <chs@odoo.com>2016-02-02 14:48:31 +0100
commit2611a8198eaac60cf424742e4dc411700e439352 (patch)
tree64b4c0c2cbbf6199995b3f5db5e213d6813ab830 /addons/web_editor/static/src/js/transcoder.js
parent7e44ddcda3f21c7e6401173539dc0fe93f9a7dd2 (diff)
parente765569d04766ca005484c4746faeb08bd917446 (diff)
[MERGE] forward port of branch saas-7 up to e765569
Diffstat (limited to 'addons/web_editor/static/src/js/transcoder.js')
-rw-r--r--addons/web_editor/static/src/js/transcoder.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/transcoder.js b/addons/web_editor/static/src/js/transcoder.js
index 20779bf19aa..4b613ba636c 100644
--- a/addons/web_editor/static/src/js/transcoder.js
+++ b/addons/web_editor/static/src/js/transcoder.js
@@ -173,7 +173,11 @@ var class_to_style = function ($editable) {
style = k+":"+v+";"+style;
}
});
- $target.attr("style", style);
+ if (_.isEmpty(style)) {
+ $target.removeAttr("style");
+ } else {
+ $target.attr("style", style);
+ }
});
};
// convert style into inline class from mail