diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-11-30 15:53:21 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-12-03 13:26:36 +0100 |
| commit | d1af67bf28d24fe8471c2f43132488535d4f6a63 (patch) | |
| tree | 954cc67c950b76f0f68491f153d4f12c4a2345a0 /addons/web_editor/static/src/js/widgets.js | |
| parent | 44ad6f37b12d4bbf53c69bbb7807ff3ac6769807 (diff) | |
[FIX] web_editor: img classname is removed when change the url
Diffstat (limited to 'addons/web_editor/static/src/js/widgets.js')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/addons/web_editor/static/src/js/widgets.js b/addons/web_editor/static/src/js/widgets.js index 7e13a27f8e5..165f0b0e914 100644 --- a/addons/web_editor/static/src/js/widgets.js +++ b/addons/web_editor/static/src/js/widgets.js @@ -171,12 +171,9 @@ var MediaDialog = Dialog.extend({ var self = this; if (self.media) { this.media.innerHTML = ""; - if (this.active !== this.imageDialog) { + if (this.active !== this.imageDialog && this.active !== this.documentDialog) { this.imageDialog.clear(); } - if (this.active !== this.documentDialog) { - this.documentDialog.clear(); - } // if not mode only_images if (this.iconDialog && this.active !== this.iconDialog) { this.iconDialog.clear(); @@ -355,7 +352,7 @@ var ImageDialog = Widget.extend({ return this.media; }, clear: function () { - this.media.className = this.media.className.replace(/(^|\s+)(img(\s|$)|img-(?!circle|rounded|thumbnail)[^\s]*)/g, ' '); + this.media.className = this.media.className.replace(/(^|\s+)((img(\s|$)|img-(?!circle|rounded|thumbnail))[^\s]*)/g, ' '); }, cancel: function () { this.trigger('cancel'); |
