Translate color picker actions in newsletter editor

This commit is contained in:
Tautvidas Sipavičius
2017-02-27 19:32:08 +02:00
parent 626d6c0fa9
commit 47f5e1e7b4
3 changed files with 9 additions and 10 deletions

View File

@ -158,6 +158,9 @@ define([
*/
Module.SidebarStylesView = Marionette.LayoutView.extend({
getTemplate: function() { return templates.sidebarStyles; },
behaviors: {
ColorPickerBehavior: {},
},
events: function() {
return {
"change #mailpoet_text_font_color": _.partial(this.changeColorField, 'text.fontColor'),
@ -205,15 +208,6 @@ define([
initialize: function(options) {
this.availableStyles = options.availableStyles;
},
onRender: function() {
this.$('.mailpoet_color').spectrum({
clickoutFiresChange: true,
showInput: true,
showInitial: true,
preferredFormat: "hex6",
allowEmpty: true,
});
},
changeField: function(field, event) {
this.model.set(field, jQuery(event.target).val());
},