mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: add support for selected topic count
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user