feat: add support for selected topic count

isekai-main
Barış Soner Uşaklı 2 years ago
parent a83734fb2b
commit 69f24ed92a

@ -35,6 +35,15 @@ define('topicSelect', ['components'], function (components) {
select.toggleClass('fa-check-square-o', isSelected);
select.toggleClass('fa-square-o', !isSelected);
select.parents('[component="category/topic"]').toggleClass('selected', isSelected);
updateSelectedBadgeCount();
}
function updateSelectedBadgeCount() {
const badge = $('[component="topic/selected/badge"]');
if (badge.length) {
const count = topicsContainer.find('[component="category/topic"].selected').length;
badge.text(count > 0 ? count : '');
}
}
TopicSelect.getSelectedTids = function () {

Loading…
Cancel
Save