Rerender editor on global styles change
[MAILPOET-1976]
This commit is contained in:
@@ -163,6 +163,9 @@ Module.SidebarStylesView = Marionette.View.extend({
|
||||
behaviors: {
|
||||
ColorPickerBehavior: {},
|
||||
},
|
||||
modelEvents: {
|
||||
change: 'render',
|
||||
},
|
||||
events: function () {
|
||||
return {
|
||||
'change #mailpoet_text_font_color': _.partial(this.changeColorField, 'text.fontColor'),
|
||||
|
@@ -47,6 +47,11 @@ Module.StylesModel = SuperModel.extend({
|
||||
// apply model defaults recursively (not only on top level)
|
||||
this.set(jQuery.extend(true, {}, this.defaults, data));
|
||||
this.on('change', function () { App.getChannel().trigger('autoSave'); }); // eslint-disable-line func-names
|
||||
App.getChannel().on('historyUpdate', this.onHistoryUpdate, this);
|
||||
},
|
||||
|
||||
onHistoryUpdate: function onHistoryUpdate(json) {
|
||||
this.set(json.globalStyles);
|
||||
},
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user