diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-12-10 13:05:58 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-12-10 13:05:58 +0100 |
| commit | 82a495eed52a9f42e5b88caa52c20a85f8d81ce3 (patch) | |
| tree | 6c5e8cc0247d5fe08d24e9abae38fe353fbebc56 /addons/web_editor/static/src/js/widgets.js | |
| parent | 0bc2ddae784bf80c4c809d8b7f6d642d576f92a1 (diff) | |
| parent | 4022493c0b85f966e499b6c03ac7cce5556f15e6 (diff) | |
[MERGE] forward port of branch saas-7 up to 4022493
Diffstat (limited to 'addons/web_editor/static/src/js/widgets.js')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/addons/web_editor/static/src/js/widgets.js b/addons/web_editor/static/src/js/widgets.js index 97c171f0950..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'); @@ -1079,7 +1076,7 @@ var LinkDialog = Dialog.extend({ return this.get_data() .then(function (url, new_window, label, classes) { self.data.url = url; - self.data.newWindow = new_window; + self.data.isNewWindow = new_window; self.data.text = label; self.data.className = classes.replace(/\s+/gi, ' ').replace(/^\s+|\s+$/gi, ''); |
