Fix Styles color changes rendered only once
[MAILPOET-2249]
This commit is contained in:
@ -163,9 +163,6 @@ Module.SidebarStylesView = Marionette.View.extend({
|
|||||||
behaviors: {
|
behaviors: {
|
||||||
ColorPickerBehavior: {},
|
ColorPickerBehavior: {},
|
||||||
},
|
},
|
||||||
modelEvents: {
|
|
||||||
change: 'render',
|
|
||||||
},
|
|
||||||
events: function () {
|
events: function () {
|
||||||
return {
|
return {
|
||||||
'change #mailpoet_text_font_color': _.partial(this.changeColorField, 'text.fontColor'),
|
'change #mailpoet_text_font_color': _.partial(this.changeColorField, 'text.fontColor'),
|
||||||
@ -220,6 +217,7 @@ Module.SidebarStylesView = Marionette.View.extend({
|
|||||||
},
|
},
|
||||||
initialize: function (options) {
|
initialize: function (options) {
|
||||||
this.availableStyles = options.availableStyles;
|
this.availableStyles = options.availableStyles;
|
||||||
|
App.getChannel().on('historyUpdate', this.render);
|
||||||
},
|
},
|
||||||
changeField: function (field, event) {
|
changeField: function (field, event) {
|
||||||
this.model.set(field, jQuery(event.target).val());
|
this.model.set(field, jQuery(event.target).val());
|
||||||
|
Reference in New Issue
Block a user