Hide settings when clicked on another block
[MAILPOET-1974]
This commit is contained in:
@@ -226,6 +226,14 @@ Module.BlockToolsView = AugmentedView.extend({
|
||||
},
|
||||
changeSettings: function changeSettings(options) {
|
||||
var ViewType = this.getSettingsView();
|
||||
var showedSettingsId = App.getShowedSettingsId();
|
||||
if (showedSettingsId) {
|
||||
if (showedSettingsId === this.model.cid) {
|
||||
return;
|
||||
}
|
||||
App.getChannel().trigger('hideSettings');
|
||||
return;
|
||||
}
|
||||
App.getChannel().trigger('settingsShowed', this.model.cid);
|
||||
(new ViewType(_.extend({ model: this.model }, options || {}))).render();
|
||||
},
|
||||
|
Reference in New Issue
Block a user