Show settings on click
[MAILPOET-2278]
This commit is contained in:
committed by
Jack Kitterhing
parent
8b2bb9d69f
commit
b56cee8b7d
@ -1,3 +1,4 @@
|
||||
import _ from 'underscore';
|
||||
import App from 'newsletter_editor/App';
|
||||
import BaseBlock from 'newsletter_editor/blocks/base';
|
||||
|
||||
@ -14,8 +15,16 @@ const BlockModel = BaseBlock.BlockModel.extend({
|
||||
},
|
||||
});
|
||||
|
||||
const SettingsView = BaseBlock.BlockSettingsView.extend({
|
||||
getTemplate: function getTemplate() { return window.templates.woocommerceHeadingBlockSettings; },
|
||||
});
|
||||
|
||||
const BlockToolsView = BaseBlock.BlockToolsView.extend({
|
||||
tools: { move: true },
|
||||
tools: {
|
||||
move: true,
|
||||
settings: true,
|
||||
},
|
||||
getSettingsView: () => SettingsView,
|
||||
});
|
||||
|
||||
const WidgetView = BaseBlock.WidgetView.extend({
|
||||
@ -34,6 +43,9 @@ const WidgetView = BaseBlock.WidgetView.extend({
|
||||
const BlockView = BaseBlock.BlockView.extend({
|
||||
className: 'mailpoet_block mailpoet_woocommerce_heading_block mailpoet_droppable_block',
|
||||
getTemplate() { return window.templates.woocommerceHeadingBlock; },
|
||||
behaviors: _.defaults({
|
||||
ShowSettingsBehavior: {},
|
||||
}, BaseBlock.BlockView.prototype.behaviors),
|
||||
regions: {
|
||||
toolsRegion: '.mailpoet_tools',
|
||||
},
|
||||
|
Reference in New Issue
Block a user