From: Alexander Ebert Date: Sun, 30 Nov 2014 00:47:58 +0000 (+0100) Subject: Fixed notification update on session keep alive X-Git-Tag: 2.1.0_Beta_1~114 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17e0972c889b089719c44d79d81aaa44405be9ce;p=GitHub%2FWoltLab%2FWCF.git Fixed notification update on session keep alive --- 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(); + } } });