Fix closing of Image, ALC and Posts sidepanels on "Done" click

This commit is contained in:
Tautvidas Sipavičius
2015-10-07 14:50:28 +03:00
parent 3cfe9a9acc
commit 44f43a151d
3 changed files with 3 additions and 0 deletions

View File

@ -238,6 +238,7 @@ define([
});
},
onBeforeDestroy: function() {
base.BlockSettingsView.prototype.onBeforeDestroy.apply(this, arguments);
// Force close select2 if it hasn't closed yet
this.$('.mailpoet_automated_latest_content_categories_and_tags').select2('close');
},

View File

@ -327,6 +327,7 @@ define([
this._mediaManager.open();
},
onBeforeDestroy: function() {
base.BlockSettingsView.prototype.onBeforeDestroy.apply(this, arguments);
if (typeof this._mediaManager === 'object') {
this._mediaManager.remove();
}

View File

@ -304,6 +304,7 @@ define([
});
},
onBeforeDestroy: function() {
base.BlockSettingsView.prototype.onBeforeDestroy.apply(this, arguments);
// Force close select2 if it hasn't closed yet
this.$('.mailpoet_posts_categories_and_tags').select2('close');
},