PROD-2208
This commit is contained in:
committed by
Ali-D-Akbar
parent
35d658e66c
commit
7c2d28530b
@@ -3,8 +3,9 @@
|
||||
'jquery',
|
||||
'underscore',
|
||||
'backbone',
|
||||
'gettext'
|
||||
], function($, _, Backbone, gettext) {
|
||||
'gettext',
|
||||
'edx-ui-toolkit/js/utils/html-utils'
|
||||
], function($, _, Backbone, gettext, HtmlUtils) {
|
||||
'use strict';
|
||||
|
||||
return Backbone.View.extend({
|
||||
@@ -14,7 +15,7 @@
|
||||
className: 'active-filter',
|
||||
|
||||
initialize: function() {
|
||||
this.tpl = _.template($('#filter-tpl').html());
|
||||
this.tpl = HtmlUtils.template($('#filter-tpl').html());
|
||||
this.listenTo(this.model, 'remove', this.remove);
|
||||
this.listenTo(this.model, 'change', this.render);
|
||||
},
|
||||
@@ -23,7 +24,10 @@
|
||||
var data = _.clone(this.model.attributes);
|
||||
data.name = data.name || data.query;
|
||||
this.className = data.type;
|
||||
this.$el.html(this.tpl(data));
|
||||
HtmlUtils.setHtml(
|
||||
this.$el,
|
||||
this.tpl(data)
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user