Fixed wcfPages display issue and ACP package search navigation
authorAlexander Ebert <ebert@woltlab.com>
Tue, 31 Dec 2013 20:50:40 +0000 (21:50 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 31 Dec 2013 20:50:40 +0000 (21:50 +0100)
Fixes #1512

wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/js/WCF.js

index 0dae783e2927d2eac3d1b34286cc89b2355ff6b6..09b51fd0f1d417fc68bab8db9cb9b7ac0b529439 100644 (file)
@@ -1167,15 +1167,16 @@ WCF.ACP.Package.Search = Class.extend({
                this._packageSearchResultContainer.find('.pageNavigation').wcfPages('destroy').remove();
                
                if (this._pageCount > 1) {
-                       $('<div class="contentNavigation" />').insertBefore(this._packageSearchResultList).wcfPages({
+                       // TODO: Fix ui.wcfPages to properly synchronize multiple instances without triggering events
+                       /*$('<div class="contentNavigation" />').insertBefore(this._packageSearchResultList).wcfPages({
                                activePage: this._pageNo,
                                maxPage: this._pageCount
-                       }).bind('wcfpagesswitched', $.proxy(this._showPage, this));
+                       }).on('wcfpagesswitched', $.proxy(this._showPage, this));*/
                        
                        $('<div class="contentNavigation" />').insertAfter(this._packageSearchResultList).wcfPages({
                                activePage: this._pageNo,
                                maxPage: this._pageCount
-                       }).bind('wcfpagesswitched', $.proxy(this._showPage, this));
+                       }).on('wcfpagesswitched', $.proxy(this._showPage, this));
                }
        },
        
index 5c8a0c33d9fb1534fe6b88e0a8ab8633ac4af208..854ef3818659790f47ab6af70152ce31ef21235f 100755 (executable)
@@ -9990,7 +9990,7 @@ $.widget('ui.wcfPages', {
                        else {
                                var $previousImage = $('<span class="icon icon16 icon-double-angle-left" />');
                                $previousElement.append($previousImage);
-                               $previousElement.addClass('disabled');
+                               $previousElement.addClass('disabled').removeClass('button');
                                $previousImage.addClass('disabled');
                        }
                        
@@ -10078,7 +10078,7 @@ $.widget('ui.wcfPages', {
                        else {
                                var $nextImage = $('<span class="icon icon16 icon-double-angle-right" />');
                                $nextElement.append($nextImage);
-                               $nextElement.addClass('disabled');
+                               $nextElement.addClass('disabled').removeClass('button');
                                $nextImage.addClass('disabled');
                        }