From: Alexander Ebert Date: Tue, 21 Jun 2016 16:01:00 +0000 (+0200) Subject: Fixed jQuery pagination wrapper X-Git-Tag: 3.0.0_Beta_1~1379 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57903201c6c9aa16ceda76d31692706b155dfe17;p=GitHub%2FWoltLab%2FWCF.git Fixed jQuery pagination wrapper --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 6a4d1639b2..06d40f7f46 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -7804,7 +7804,7 @@ $.widget('ui.wcfPages', { */ _create: function() { require(['WoltLab/WCF/Ui/Pagination'], (function(UiPagination) { - this._api = new UiPagination(this.element, { + this._api = new UiPagination(this.element[0], { activePage: this.options.activePage, maxPage: this.options.maxPage, diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Pagination.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Pagination.js index 927bb280b1..e53eda0685 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Pagination.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Pagination.js @@ -2,7 +2,7 @@ * Callback-based pagination. * * @author Alexander Ebert - * @copyright 2001-2015 WoltLab GmbH + * @copyright 2001-2016 WoltLab GmbH * @license GNU Lesser General Public License * @module WoltLab/WCF/Ui/Pagination */ @@ -12,7 +12,7 @@ define(['Core', 'Language', 'ObjectMap', 'StringUtil', 'WoltLab/WCF/Ui/Page/Jump /** * @constructor */ - function UiPagination(element, options) { this.init(element, options); }; + function UiPagination(element, options) { this.init(element, options); } UiPagination.prototype = { /** * maximum number of displayed page links, should match the PHP implementation @@ -76,7 +76,7 @@ define(['Core', 'Language', 'ObjectMap', 'StringUtil', 'WoltLab/WCF/Ui/Page/Jump } // add first page - list.appendChild(this._createLink(1, this._options)); + list.appendChild(this._createLink(1)); // calculate page links var maxLinks = this.SHOW_LINKS - 4; @@ -118,10 +118,10 @@ define(['Core', 'Language', 'ObjectMap', 'StringUtil', 'WoltLab/WCF/Ui/Page/Jump var jumpToHtml = ''; if (left > 1) { if (left - 1 < 2) { - list.appendChild(this._createLink(2, this._options)); + list.appendChild(this._createLink(2)); } else { - var listItem = elCreate('li'); + listItem = elCreate('li'); listItem.className = 'jumpTo'; listItem.innerHTML = jumpToHtml; list.appendChild(listItem); @@ -132,16 +132,16 @@ define(['Core', 'Language', 'ObjectMap', 'StringUtil', 'WoltLab/WCF/Ui/Page/Jump // visible links for (var i = left + 1; i < right; i++) { - list.appendChild(this._createLink(i, this._options)); + list.appendChild(this._createLink(i)); } // right ... links if (right < this._options.maxPage) { if (this._options.maxPage - right < 2) { - list.appendChild(this._createLink(this._options.maxPage - 1, this._options)); + list.appendChild(this._createLink(this._options.maxPage - 1)); } else { - var listItem = elCreate('li'); + listItem = elCreate('li'); listItem.className = 'jumpTo'; listItem.innerHTML = jumpToHtml; list.appendChild(listItem); @@ -151,7 +151,7 @@ define(['Core', 'Language', 'ObjectMap', 'StringUtil', 'WoltLab/WCF/Ui/Page/Jump } // add last page - list.appendChild(this._createLink(this._options.maxPage, this._options)); + list.appendChild(this._createLink(this._options.maxPage)); // add next button listItem = elCreate('li');