|
|
|
@ -14,7 +14,8 @@ export default Backbone.View.extend({ |
|
|
|
|
|
|
|
initialize(o = {}, config = {}) { |
|
|
|
this.config = config; |
|
|
|
const pfx = this.config.pStylePrefix || ''; |
|
|
|
const pfx = config.pStylePrefix || ''; |
|
|
|
this.em = config.em; |
|
|
|
this.pfx = pfx; |
|
|
|
this.caretR = 'fa fa-caret-right'; |
|
|
|
this.caretD = 'fa fa-caret-down'; |
|
|
|
@ -69,13 +70,16 @@ export default Backbone.View.extend({ |
|
|
|
}, |
|
|
|
|
|
|
|
render() { |
|
|
|
this.el.innerHTML = this.template({ |
|
|
|
const { em, el, $el, model } = this; |
|
|
|
const label = em.t(`blocks.categories.${model.id}`) || model.get('label'); |
|
|
|
el.innerHTML = this.template({ |
|
|
|
pfx: this.pfx, |
|
|
|
label: this.model.get('label') |
|
|
|
label |
|
|
|
}); |
|
|
|
this.el.className = this.className; |
|
|
|
this.$el.css({ order: this.model.get('order') }); |
|
|
|
el.className = this.className; |
|
|
|
$el.css({ order: model.get('order') }); |
|
|
|
this.updateVisibility(); |
|
|
|
|
|
|
|
return this; |
|
|
|
} |
|
|
|
}); |
|
|
|
|