summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/transcoder.js
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2016-01-28 17:27:34 +0100
committerDenis Ledoux <dle@odoo.com>2016-01-28 17:27:34 +0100
commit03173543a0598873c791ac251fb0c7af546f6512 (patch)
tree09e7de892c933bba837a6ded8f9fa2f03f969e0c /addons/web_editor/static/src/js/transcoder.js
parent15f1b793174fcbe9c26f320fee51334cc6ec2e25 (diff)
parent1982ef993eeba5fc3658b4499b6d9adbe9f5ca07 (diff)
[MERGE] forward port of branch 9.0 up to 1982ef9
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