PROD-2296

This commit is contained in:
Azan Bin Zahid
2021-03-15 15:00:34 +05:00
parent 3e6b3e41f8
commit 5c0fce308e

View File

@@ -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;