Notification optimization
authorpebeah <itsmepasse@gmail.com>
Tue, 28 May 2013 22:17:45 +0000 (00:17 +0200)
committerpebeah <itsmepasse@gmail.com>
Tue, 28 May 2013 22:17:45 +0000 (00:17 +0200)
see
http://beta.woltlab.com/index.php/Thread/1277-Link-entfernen-bei-Benachr
ichtigungen/

wcfsetup/install/files/js/WCF.User.js

index 7d0bcc8dcd9228de1caf3f87687642d2be8c3d65..0d25bff8f4681191824a155ee39a5525c0c9cd83 100644 (file)
@@ -1255,8 +1255,10 @@ WCF.Notification.UserPanel = WCF.UserPanel.extend({
         */
        _addDefaultItems: function(dropdownMenu) {
                this._addDivider(dropdownMenu);
-               $('<li><a href="' + this._showAllLink + '">' + WCF.Language.get('wcf.user.notification.showAll') + '</a></li>').appendTo(dropdownMenu);
-               this._addDivider(dropdownMenu);
+               if (this._container.data('count')) {
+                       $('<li><a href="' + this._showAllLink + '">' + WCF.Language.get('wcf.user.notification.showAll') + '</a></li>').appendTo(dropdownMenu);
+                       this._addDivider(dropdownMenu);
+               }
                $('<li id="userNotificationsMarkAllAsConfirmed"><a>' + WCF.Language.get('wcf.user.notification.markAllAsConfirmed') + '</a></li>').click($.proxy(this._markAllAsConfirmed, this)).appendTo(dropdownMenu);
        },