diff --git a/src/domain_abstract/ui/InputNumber.js b/src/domain_abstract/ui/InputNumber.js index 80ebd3523..5abaff8f6 100644 --- a/src/domain_abstract/ui/InputNumber.js +++ b/src/domain_abstract/ui/InputNumber.js @@ -125,10 +125,12 @@ module.exports = Backbone.View.extend({ unitStr += ''; }); unitStr += ''; - this.unitEl = $(unitStr); + const temp = document.createElement('div'); + temp.innerHTML = unitStr; + this.unitEl = temp.firstChild; } } - return this.unitEl && this.unitEl.get(0); + return this.unitEl; }, /** @@ -281,7 +283,8 @@ module.exports = Backbone.View.extend({ const el = this.$el; el.html(this.template({ppfx})); el.find(`.${ppfx}input-holder`).append(this.getInputEl()); - el.find(`.${ppfx}field-units`).html(this.getUnitEl()); + const unit = this.getUnitEl(); + unit && el.find(`.${ppfx}field-units`).get(0).appendChild(unit); el.addClass(this.contClass); return this; } diff --git a/src/style_manager/view/PropertyCompositeView.js b/src/style_manager/view/PropertyCompositeView.js index e0a39e839..49214e399 100644 --- a/src/style_manager/view/PropertyCompositeView.js +++ b/src/style_manager/view/PropertyCompositeView.js @@ -48,7 +48,7 @@ module.exports = PropertyView.extend({ var PropertiesView = require('./PropertiesView'); var propsView = new PropertiesView(this.getPropsConfig()); this.$props = propsView.render().$el; - this.$el.find('#'+ this.pfx +'input-holder').html(this.$props); + this.$el.find(`#${this.pfx}input-holder`).append(this.$props); } } }, diff --git a/src/style_manager/view/PropertySelectView.js b/src/style_manager/view/PropertySelectView.js index 3bd049a8e..61ff92d96 100644 --- a/src/style_manager/view/PropertySelectView.js +++ b/src/style_manager/view/PropertySelectView.js @@ -20,7 +20,7 @@ module.exports = require('./PropertyView').extend({ const model = this.model; const options = model.get('list') || model.get('options') || []; - if (!this.$input) { + if (!this.input) { let optionsStr = ''; options.forEach(option => { @@ -31,9 +31,9 @@ module.exports = require('./PropertyView').extend({ optionsStr += ``; }); - this.$input = $(``); - this.input = this.$input.get(0); - this.$el.find(`#${pfx}input-holder`).html(this.$input); + const inputH = this.el.querySelector(`#${pfx}input-holder`); + inputH.innerHTML = ``; + this.input = inputH.firstChild; } }, diff --git a/src/style_manager/view/PropertyView.js b/src/style_manager/view/PropertyView.js index fcd074f5b..af13d49df 100644 --- a/src/style_manager/view/PropertyView.js +++ b/src/style_manager/view/PropertyView.js @@ -50,7 +50,7 @@ module.exports = Backbone.View.extend({ this.customValue = o.customValue || {}; const model = this.model; this.property = model.get('property'); - this.input = this.$input = null; + this.input = null; const pfx = this.pfx; this.inputHolderId = '#' + pfx + 'input-holder'; this.sector = model.collection && model.collection.sector; diff --git a/src/style_manager/view/SectorView.js b/src/style_manager/view/SectorView.js index 7c87b8fcb..f80da44e3 100644 --- a/src/style_manager/view/SectorView.js +++ b/src/style_manager/view/SectorView.js @@ -4,25 +4,25 @@ var PropertiesView = require('./PropertiesView'); module.exports = Backbone.View.extend({ template: _.template(` -