Use styles from woocommerce everytime
[MAILPOET-2279]
This commit is contained in:
committed by
Jack Kitterhing
parent
96cbce78a3
commit
812b89cfee
@ -3,6 +3,7 @@ import App from 'newsletter_editor/App';
|
||||
import BaseBlock from 'newsletter_editor/blocks/base';
|
||||
|
||||
const BlockModel = BaseBlock.BlockModel.extend({
|
||||
stale: ['styles'],
|
||||
defaults: function () {
|
||||
return this._getDefaults({
|
||||
type: 'woocommerceContent',
|
||||
@ -41,6 +42,13 @@ const BlockView = BaseBlock.BlockView.extend({
|
||||
this.toolsView = new BlockToolsView({ model: this.model });
|
||||
this.showChildView('toolsRegion', this.toolsView);
|
||||
},
|
||||
templateContext: function templateContext() {
|
||||
return {
|
||||
viewCid: this.cid,
|
||||
model: this.model.toJSON(),
|
||||
styles: this.model.get('styles').toJSON(),
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
App.on('before:start', function (BeforeStartApp) {
|
||||
|
Reference in New Issue
Block a user