From: Alexander Ebert Date: Fri, 2 May 2014 16:04:05 +0000 (+0200) Subject: Improved WCF.System.Page.Multiple X-Git-Tag: 2.1.0_Alpha_1~847 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66ed9925cef3ca7bca83d700074293465457c6a6;p=GitHub%2FWoltLab%2FWCF.git Improved WCF.System.Page.Multiple --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index c603d7c577..a9e9fa6213 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -1218,9 +1218,7 @@ WCF.ACP.Package.Search = Class.extend({ } }); -WCF.ACP.Package.Server = { - -}; +WCF.ACP.Package.Server = { }; WCF.ACP.Package.Server.Installation = Class.extend({ _proxy: null, diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 05c3ff9184..234578599d 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -6660,6 +6660,7 @@ WCF.System.Page.Multiple = Class.extend({ _options: { }, _pageNo: 1, _pages: 0, + _previousPageNo: 0, init: function(options) { this._options = $.extend({ @@ -6670,6 +6671,17 @@ WCF.System.Page.Multiple = Class.extend({ // callbacks loadItems: null }, options); + + this._cache = { }; + this._pageNo = 1; + this._pages = 0; + this._previousPageNo = 0; + + if (this._pagination.data('pages')) { + this._pagination.wcfPages({ + maxPage: this._pagination.data('pages') + }).on('wcfpagesswitched', $.proxy(this._showPage, this)); + } }, /** @@ -6698,7 +6710,7 @@ WCF.System.Page.Multiple = Class.extend({ } } else { - this._loadItems(); + this._options.loadItems(); } }, @@ -6707,6 +6719,10 @@ WCF.System.Page.Multiple = Class.extend({ activePage: pageNo, template: template }); + }, + + getPageNo: function() { + return this._pageNo; } });