Browse Source

rename "this.target" to "this.em"

pull/652/head
Ryan Deba 9 years ago
parent
commit
06c546653e
  1. 2
      src/domain_abstract/ui/Input.js
  2. 4
      src/domain_abstract/ui/InputColor.js

2
src/domain_abstract/ui/Input.js

@ -25,7 +25,7 @@ module.exports = Backbone.View.extend({
const ppfx = opts.ppfx || '';
this.opts = opts;
this.ppfx = ppfx;
this.target = opts.target || {};
this.em = opts.target || {};
this.listenTo(this.model, 'change:value', this.handleModelChange);
},

4
src/domain_abstract/ui/InputColor.js

@ -58,8 +58,8 @@ module.exports = Input.extend({
var colorEl = $(`<div class="${this.ppfx}field-color-picker"></div>`);
var cpStyle = colorEl.get(0).style;
var elToAppend = this.target && this.target.config ? this.target.config.el : '';
var colorPickerConfig = this.target && this.target.getConfig && this.target.getConfig("colorPicker") || {};
var elToAppend = this.em && this.em.config ? this.em.config.el : '';
var colorPickerConfig = this.em && this.em.getConfig && this.em.getConfig("colorPicker") || {};
const getColor = color => {
let cl = color.getAlpha() == 1 ? color.toHexString() : color.toRgbString();
return cl.replace(/ /g, '');

Loading…
Cancel
Save