PROD-2296
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
'backbone',
|
||||
'gettext',
|
||||
'js/discovery/models/filter',
|
||||
'js/discovery/views/filter_label'
|
||||
], function($, _, Backbone, gettext, Filter, FilterLabel) {
|
||||
'js/discovery/views/filter_label',
|
||||
'edx-ui-toolkit/js/utils/html-utils'
|
||||
], function($, _, Backbone, gettext, Filter, FilterLabel, HtmlUtils) {
|
||||
'use strict';
|
||||
|
||||
return Backbone.View.extend({
|
||||
@@ -20,7 +21,7 @@
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
this.tpl = _.template($(this.templateId).html());
|
||||
this.tpl = HtmlUtils.template($(this.templateId).html());
|
||||
this.render();
|
||||
this.listenTo(this.collection, 'remove', this.hideIfEmpty);
|
||||
this.listenTo(this.collection, 'add', this.addFilter);
|
||||
@@ -28,7 +29,10 @@
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.tpl());
|
||||
HtmlUtils.setHtml(
|
||||
this.$el,
|
||||
this.tpl()
|
||||
);
|
||||
this.$ul = this.$el.find('ul');
|
||||
this.$el.addClass('is-animated');
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user