From 17e0972c889b089719c44d79d81aaa44405be9ce Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 30 Nov 2014 01:47:58 +0100 Subject: [PATCH] Fixed notification update on session keep alive --- wcfsetup/install/files/js/WCF.User.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.User.js b/wcfsetup/install/files/js/WCF.User.js index cd473f9ef7..493dd20db4 100644 --- a/wcfsetup/install/files/js/WCF.User.js +++ b/wcfsetup/install/files/js/WCF.User.js @@ -1589,8 +1589,7 @@ WCF.Notification.UserPanel = WCF.UserPanel.extend({ }, _removeMarkAllAsConfirmed: function() { - $('#userNotificationsMarkAllAsConfirmed').prev('.dropdownDivider').remove(); - $('#userNotificationsMarkAllAsConfirmed').remove(); + $('#userNotificationsMarkAllAsConfirmed').hide().prev('.dropdownDivider').hide(); }, /** @@ -1603,14 +1602,14 @@ WCF.Notification.UserPanel = WCF.UserPanel.extend({ WCF.Dropdown.close('userNotifications'); // revert dropdown to initial state - var $dropdownMenu = WCF.Dropdown.getDropdownMenu('userNotifications'); - var $item = $dropdownMenu.find('.dropdownDivider:eq(0)'); - $item.prevAll().remove(); - $('
  • ' + WCF.Language.get('wcf.global.loading') + '
  • ').insertBefore($item); - this._didLoad = false; + this._resetList(); // update badge this._updateBadge(count); + + if (parseInt(count) > 0) { + $('#userNotificationsMarkAllAsConfirmed').show().prev('.dropdownDivider').show(); + } } }); -- 2.20.1