Allow toggling settings by clicking on settings icon
[MAILPOET-1974]
This commit is contained in:
@@ -192,7 +192,7 @@ Module.BlockView = AugmentedView.extend({
|
||||
Module.BlockToolsView = AugmentedView.extend({
|
||||
getTemplate: function getTemplate() { return window.templates.genericBlockTools; },
|
||||
events: {
|
||||
'click .mailpoet_edit_block': 'changeSettings',
|
||||
'click .mailpoet_edit_block': 'toggleSettings',
|
||||
'click .mailpoet_delete_block_activate': 'showDeletionConfirmation',
|
||||
'click .mailpoet_delete_block_cancel': 'hideDeletionConfirmation',
|
||||
'click .mailpoet_delete_block_confirm': 'deleteBlock',
|
||||
@@ -224,6 +224,13 @@ Module.BlockToolsView = AugmentedView.extend({
|
||||
tools: this.tools,
|
||||
};
|
||||
},
|
||||
toggleSettings: function toggleSettings() {
|
||||
if (App.getDisplayedSettingsId() === this.model.cid) {
|
||||
App.getChannel().trigger('hideSettings');
|
||||
return;
|
||||
}
|
||||
this.changeSettings();
|
||||
},
|
||||
changeSettings: function changeSettings(options) {
|
||||
var ViewType = this.getSettingsView();
|
||||
var displayedSettingsId = App.getDisplayedSettingsId();
|
||||
|
Reference in New Issue
Block a user