diff --git a/src/selector_manager/view/ClassTagView.js b/src/selector_manager/view/ClassTagView.js index 8524497b9..46eac24ca 100644 --- a/src/selector_manager/view/ClassTagView.js +++ b/src/selector_manager/view/ClassTagView.js @@ -1,14 +1,22 @@ -var Backbone = require('backbone'); const Selector = require('./../model/Selector'); const inputProp = 'readOnly'; -module.exports = Backbone.View.extend({ - template: _.template(` - - - data-tag-name> - - `), +module.exports = require('backbone').View.extend({ + + template() { + const pfx = this.pfx; + const ppfx = this.ppfx; + const label = this.model.get('label') || ''; + return ` + + + + + + ⨯ + + `; + }, events: { 'click [data-tag-remove]': 'removeTag', @@ -137,12 +145,7 @@ module.exports = Backbone.View.extend({ render() { const pfx = this.pfx; const ppfx = this.ppfx; - this.$el.html( this.template({ - label: this.model.get('label'), - pfx, - ppfx, - inputProp: this.inputProp, - })); + this.$el.html(this.template()); this.$el.attr('class', `${pfx}tag ${ppfx}three-bg`); this.updateStatus(); this.updateInputLength();