Use classList API
This commit is contained in:
parent
b41d978d00
commit
d2eadbdce4
@ -115,15 +115,15 @@
|
||||
});
|
||||
_converse.rosterview.update(); // XXX: Will normally called as event handler
|
||||
}
|
||||
test_utils.waitUntil(function () {
|
||||
return test_utils.waitUntil(function () {
|
||||
if (_converse.rosterview.$roster.hasScrollBar()) {
|
||||
return $filter.is(':visible');
|
||||
} else {
|
||||
return !$filter.is(':visible');
|
||||
}
|
||||
}).then(function () {
|
||||
done();
|
||||
});
|
||||
}).then(function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
|
@ -166,12 +166,12 @@
|
||||
},
|
||||
|
||||
renderClearButton: function () {
|
||||
var $roster_filter = this.$('.roster-filter');
|
||||
$roster_filter[this.tog($roster_filter.val())]('x');
|
||||
var roster_filter = this.el.querySelector('.roster-filter');
|
||||
roster_filter.classList[this.tog(roster_filter.value)]('x');
|
||||
},
|
||||
|
||||
tog: function (v) {
|
||||
return v?'addClass':'removeClass';
|
||||
return v?'add':'remove';
|
||||
},
|
||||
|
||||
toggleX: function (ev) {
|
||||
|
Loading…
Reference in New Issue
Block a user