mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
fix: #11619, fix selector
This commit is contained in:
@@ -74,11 +74,11 @@ define('notifications', [
|
|||||||
Notifications.handleUnreadButton = function (notifList) {
|
Notifications.handleUnreadButton = function (notifList) {
|
||||||
notifList.on('click', '.mark-read', function () {
|
notifList.on('click', '.mark-read', function () {
|
||||||
const $this = $(this);
|
const $this = $(this);
|
||||||
const liEl = $this.parents('li[data-nid]');
|
const notifEl = $this.parents('[data-nid]');
|
||||||
const unread = liEl.hasClass('unread');
|
const unread = notifEl.hasClass('unread');
|
||||||
const nid = liEl.attr('data-nid');
|
const nid = notifEl.attr('data-nid');
|
||||||
markNotification(nid, unread, function () {
|
markNotification(nid, unread, function () {
|
||||||
liEl.toggleClass('unread');
|
notifEl.toggleClass('unread');
|
||||||
$this.find('.unread').toggleClass('hidden', unread);
|
$this.find('.unread').toggleClass('hidden', unread);
|
||||||
$this.find('.read').toggleClass('hidden', !unread);
|
$this.find('.read').toggleClass('hidden', !unread);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user