mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-19 15:00:22 +01:00
fix: mark unread button showing the selected category
This commit is contained in:
@@ -70,7 +70,7 @@ define('forum/unread', [
|
|||||||
doneRemovingTids(tids);
|
doneRemovingTids(tids);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const selectCategoryLabel = ajaxify.data.selectCategoryLabel || '[[unread:mark_as_read]]';
|
||||||
const selector = categorySelector.init($('[component="category-selector"]'), {
|
const selector = categorySelector.init($('[component="category-selector"]'), {
|
||||||
onSelect: function (category) {
|
onSelect: function (category) {
|
||||||
selector.selectCategory(0);
|
selector.selectCategory(0);
|
||||||
@@ -82,7 +82,7 @@ define('forum/unread', [
|
|||||||
markCategoryRead(category.cid);
|
markCategoryRead(category.cid);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectCategoryLabel: ajaxify.data.selectCategoryLabel || '[[unread:mark_as_read]]',
|
selectCategoryLabel: selectCategoryLabel,
|
||||||
localCategories: [
|
localCategories: [
|
||||||
{
|
{
|
||||||
cid: 'selected',
|
cid: 'selected',
|
||||||
@@ -96,6 +96,14 @@ define('forum/unread', [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
app.parseAndTranslate('partials/category-selector-content', {
|
||||||
|
selectCategoryLabel: selectCategoryLabel,
|
||||||
|
selectCategoryIcon: ajaxify.data.selectCategoryIcon,
|
||||||
|
}, function (html) {
|
||||||
|
selector.el.find('[component="category-selector-selected"]').html(
|
||||||
|
html.find('[component="category-selector-selected"]').html()
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function doneRemovingTids(tids) {
|
function doneRemovingTids(tids) {
|
||||||
|
|||||||
Reference in New Issue
Block a user