Commit d2eadbdc authored by JC Brand's avatar JC Brand

Use classList API

parent b41d978d
...@@ -115,15 +115,15 @@ ...@@ -115,15 +115,15 @@
}); });
_converse.rosterview.update(); // XXX: Will normally called as event handler _converse.rosterview.update(); // XXX: Will normally called as event handler
} }
test_utils.waitUntil(function () { return test_utils.waitUntil(function () {
if (_converse.rosterview.$roster.hasScrollBar()) { if (_converse.rosterview.$roster.hasScrollBar()) {
return $filter.is(':visible'); return $filter.is(':visible');
} else { } else {
return !$filter.is(':visible'); return !$filter.is(':visible');
} }
}).then(function () { }).then(function () {
done(); done();
}); });
}); });
})); }));
......
...@@ -166,12 +166,12 @@ ...@@ -166,12 +166,12 @@
}, },
renderClearButton: function () { renderClearButton: function () {
var $roster_filter = this.$('.roster-filter'); var roster_filter = this.el.querySelector('.roster-filter');
$roster_filter[this.tog($roster_filter.val())]('x'); roster_filter.classList[this.tog(roster_filter.value)]('x');
}, },
tog: function (v) { tog: function (v) {
return v?'addClass':'removeClass'; return v?'add':'remove';
}, },
toggleX: function (ev) { toggleX: function (ev) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment