Remember currently showed settings model ID

[MAILPOET-1974]
This commit is contained in:
Ján Mikláš
2019-05-02 13:29:03 +02:00
committed by M. Shull
parent 4817347293
commit 970e835ddc
2 changed files with 7 additions and 0 deletions

View File

@@ -225,6 +225,7 @@ Module.BlockToolsView = AugmentedView.extend({
},
changeSettings: function changeSettings(options) {
var ViewType = this.getSettingsView();
App.getChannel().trigger('settingsShowed', this.model.cid);
(new ViewType(_.extend({ model: this.model }, options || {}))).render();
},
showDeletionConfirmation: function showDeletionConfirmation() {
@@ -313,6 +314,7 @@ Module.BlockSettingsView = Marionette.View.extend({
onBeforeDestroy: function onBeforeDestroy() {
MailPoet.Modal.close();
this.model.trigger('stopEditing');
App.getChannel().trigger('settingsShowed', null);
},
});