From: Alexander Ebert Date: Thu, 18 Dec 2014 14:58:35 +0000 (+0100) Subject: Added JS-based pagination for phrase management X-Git-Tag: 2.1.0_Beta_2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37654f3346dcc54375c5691022e1e358907cc225;p=GitHub%2FWoltLab%2FWCF.git Added JS-based pagination for phrase management --- diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.Language.js b/wcfsetup/install/files/acp/js/WCF.ACP.Language.js index 78286bfde1..8f11d52372 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.Language.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.Language.js @@ -9,6 +9,9 @@ WCF.ACP.Language = { }; /** * Handles language item list management. + * + * @param integer count + * @param integer pageNo */ WCF.ACP.Language.ItemList = Class.extend({ /** @@ -31,8 +34,11 @@ WCF.ACP.Language.ItemList = Class.extend({ /** * Initializes the WCF.ACP.Style.List class. + * + * @param integer count + * @param integer pageNo */ - init: function() { + init: function(count, pageNo) { this._proxy = new WCF.Action.Proxy({ success: $.proxy(this._success, this) }); @@ -44,6 +50,33 @@ WCF.ACP.Language.ItemList = Class.extend({ var self = this; $button.click(function() { self._click($languageItemID); }); }, this)); + + count = parseInt(count) || 0; + if (count > 100) { + this._createPagination(count, pageNo); + } + }, + + /** + * Creates a pagination for current search result. + * + * @param integer count + * @param integer pageNo + */ + _createPagination: function(count, pageNo) { + $('.contentNavigation').each(function(index, contentNavigation) { + var $contentNavigation = $(contentNavigation); + var $nav = $('