mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: add row highlighting for popular and unread
This commit is contained in:
@@ -53,7 +53,9 @@ define('forum/topic/threadTools', [
|
||||
}
|
||||
|
||||
if (app.previousUrl && !app.previousUrl.match('^/topic')) {
|
||||
ajaxify.go(app.previousUrl, handleBack.onBackClicked);
|
||||
ajaxify.go(app.previousUrl, function () {
|
||||
handleBack.onBackClicked(true);
|
||||
});
|
||||
} else if (ajaxify.data.category) {
|
||||
ajaxify.go('category/' + ajaxify.data.category.slug, handleBack.onBackClicked);
|
||||
}
|
||||
|
||||
@@ -32,8 +32,9 @@ define('handleBack', [
|
||||
});
|
||||
}
|
||||
|
||||
function onBackClicked() {
|
||||
if ((ajaxify.data.template.category || ajaxify.data.template.recent)) {
|
||||
function onBackClicked(isMarkedUnread) {
|
||||
var highlightUnread = isMarkedUnread && ajaxify.data.template.unread;
|
||||
if (ajaxify.data.template.category || ajaxify.data.template.recent || ajaxify.data.template.popular || highlightUnread) {
|
||||
var bookmarkIndex = storage.getItem('category:bookmark');
|
||||
var clickedIndex = storage.getItem('category:bookmark:clicked');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user