From 308b0778cf7b51c752cb43ca8e5d7df71ca99593 Mon Sep 17 00:00:00 2001 From: hanakin Date: Tue, 25 Apr 2017 18:06:44 -0400 Subject: [PATCH] [ticket/15192] Fix js selectors PHPBB3-15192 --- phpBB/styles/prosilver/template/ajax.js | 10 +++++----- phpBB/styles/prosilver/template/navbar_header.html | 2 +- .../prosilver/template/notification_dropdown.html | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 1bb3aabb9b..a8409b3be8 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -100,7 +100,7 @@ phpbb.addAjaxCallback('mark_topics_read', function(res, updateTopicLinks) { // This callback will mark all notifications read phpbb.addAjaxCallback('notification.mark_all_read', function(res) { if (typeof res.success !== 'undefined') { - phpbb.markNotifications($('#notification_list li.bg2'), 0); + phpbb.markNotifications($('[data-notification-unread="true"]'), 0); phpbb.closeDarkenWrapper(3000); } }); @@ -108,8 +108,8 @@ phpbb.addAjaxCallback('notification.mark_all_read', function(res) { // This callback will mark a notification read phpbb.addAjaxCallback('notification.mark_read', function(res) { if (typeof res.success !== 'undefined') { - var unreadCount = Number($('#notification_list_button strong').html()) - 1; - phpbb.markNotifications($(this).parent('li.bg2'), unreadCount); + var unreadCount = Number($('#notification-button strong').html()) - 1; + phpbb.markNotifications($(this).parent('[data-notification-unread="true"]'), unreadCount); } }); @@ -131,11 +131,11 @@ phpbb.markNotifications = function($popup, unreadCount) { }); // Update the unread count. - $('strong', '#notification_list_button').html(unreadCount); + $('strong', '#notification-button').html(unreadCount); // Remove the Mark all read link and hide notification count if there are no unread notifications. if (!unreadCount) { $('#mark_all_notifications').remove(); - $('#notification_list_button > strong').addClass('hidden'); + $('#notification-button > strong').addClass('hidden'); } // Update page title diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index b8080a6be3..ce3f76ae4e 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -151,7 +151,7 @@