Skip to content

Commit

Permalink
[FIX] web_editor: img classname is removed when change the url
Browse files Browse the repository at this point in the history
  • Loading branch information
Gorash authored and KangOl committed Dec 3, 2015
1 parent 44ad6f3 commit d1af67b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions addons/web_editor/static/src/js/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit d1af67b

Please sign in to comment.