From: Markus Bartz Date: Fri, 13 Jan 2012 20:48:32 +0000 (+0100) Subject: Updated wcfPages to current pagination html structure, etc X-Git-Tag: 2.0.0_Beta_1~1425^2~12^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e98369c49ea2596c0d20b56c1d4cecb12e028884;p=GitHub%2FWoltLab%2FWCF.git Updated wcfPages to current pagination html structure, etc * corrected html and class structure of js pagination * re-added icons to headinclude.tpl * commented out events for page number input, because it's also not working in "normal" pagination for now --- diff --git a/com.woltlab.wcf/template/headInclude.tpl b/com.woltlab.wcf/template/headInclude.tpl index d995fe8c57..42e71c3846 100644 --- a/com.woltlab.wcf/template/headInclude.tpl +++ b/com.woltlab.wcf/template/headInclude.tpl @@ -66,7 +66,12 @@ WCF.Icon.addObject({ 'wcf.icon.loading': '{icon size='S'}spinner{/icon}', 'wcf.icon.opened': '{icon size='S'}opened2{/icon}', - 'wcf.icon.closed': '{icon size='S'}closed2{/icon}' + 'wcf.icon.closed': '{icon size='S'}closed2{/icon}', + 'wcf.icon.previous': '{icon size='S'}previous1{/icon}', + 'wcf.icon.previous.disabled': '{icon size='S'}previous1D{/icon}', + 'wcf.icon.next': '{icon size='S'}next1{/icon}', + 'wcf.icon.next.disabled': '{icon size='S'}next1D{/icon}', + 'wcf.icon.dropdown': '{icon size='S'}dropdown1{/icon}' {event name='javascriptIconImport'} }); diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index b3227b4b0e..0027ca5df8 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -3992,7 +3992,7 @@ $.widget('ui.wcfPages', { if (this.options.previousDisabledIcon === null) this.options.previousDisabledIcon = WCF.Icon.get('wcf.icon.previous.disabled'); if (this.options.nextIcon === null) this.options.nextIcon = WCF.Icon.get('wcf.icon.next'); if (this.options.nextDisabledIcon === null) this.options.nextDisabledIcon = WCF.Icon.get('wcf.icon.next.disabled'); - if (this.options.arrowDownIcon === null) this.options.arrowDownIcon = WCF.Icon.get('wcf.icon.arrow.down'); + if (this.options.arrowDownIcon === null) this.options.arrowDownIcon = WCF.Icon.get('wcf.icon.dropdown'); this.element.addClass('pageNavigation'); @@ -4023,13 +4023,12 @@ $.widget('ui.wcfPages', { this.element.children().remove(); var $pageList = $(''); - this.element.append($pageList); var $previousElement = $('
  • ').addClass('skip'); $pageList.append($previousElement); if (this.options.activePage > 1) { - var $previousLink = $(''); + var $previousLink = $(''); $previousElement.append($previousLink); this._bindSwitchPage($previousLink, this.options.activePage - 1); @@ -4090,22 +4089,28 @@ $.widget('ui.wcfPages', { var $leftChildren = $('
  • '); $pageList.append($leftChildren); - var $leftChildrenLink = $(''); + var $leftChildrenLink = $(''); $leftChildren.append($leftChildrenLink); - $leftChildrenLink.click($.proxy(this._startInput, this)); + // commented all page number input events out, because the normal pagination also + // don't have this function at this moment. This may get completely removed or + // updated as soon as this gets reimplemented in the normal pagination -- Markus Bartz +// $leftChildrenLink.click($.proxy(this._startInput, this)); var $leftChildrenImage = $(''); $leftChildrenLink.append($leftChildrenImage); var $leftChildrenInput = $(''); $leftChildren.append($leftChildrenInput); - $leftChildrenInput.keydown($.proxy(this._handleInput, this)); - $leftChildrenInput.keyup($.proxy(this._handleInput, this)); - $leftChildrenInput.blur($.proxy(this._stopInput, this)); +// $leftChildrenInput.keydown($.proxy(this._handleInput, this)); +// $leftChildrenInput.keyup($.proxy(this._handleInput, this)); +// $leftChildrenInput.blur($.proxy(this._stopInput, this)); var $leftChildrenContainer = $(''); $leftChildren.append($leftChildrenContainer); + var $leftPointerContainer = $(''); + $leftChildrenContainer.append($leftPointerContainer); + var $leftChildrenList = $('
      '); $leftChildrenContainer.append($leftChildrenList); @@ -4133,22 +4138,25 @@ $.widget('ui.wcfPages', { var $rightChildren = $('
    • '); $pageList.append($rightChildren); - var $rightChildrenLink = $(''); + var $rightChildrenLink = $(''); $rightChildren.append($rightChildrenLink); - $rightChildrenLink.click($.proxy(this._startInput, this)); +// $rightChildrenLink.click($.proxy(this._startInput, this)); var $rightChildrenImage = $(''); $rightChildrenLink.append($rightChildrenImage); var $rightChildrenInput = $(''); $rightChildren.append($rightChildrenInput); - $rightChildrenInput.keydown($.proxy(this._handleInput, this)); - $rightChildrenInput.keyup($.proxy(this._handleInput, this)); - $rightChildrenInput.blur($.proxy(this._stopInput, this)); +// $rightChildrenInput.keydown($.proxy(this._handleInput, this)); +// $rightChildrenInput.keyup($.proxy(this._handleInput, this)); +// $rightChildrenInput.blur($.proxy(this._stopInput, this)); var $rightChildrenContainer = $(''); $rightChildren.append($rightChildrenContainer); + var $rightPointerContainer = $(''); + $rightChildrenContainer.append($rightPointerContainer); + var $rightChildrenList = $('
        '); $rightChildrenContainer.append($rightChildrenList); @@ -4170,7 +4178,7 @@ $.widget('ui.wcfPages', { $pageList.append($nextElement); if (this.options.activePage < this.options.maxPage) { - var $nextLink = $('').addClass('ballonTooltip'); + var $nextLink = $(''); $nextElement.append($nextLink); this._bindSwitchPage($nextLink, this.options.activePage + 1); @@ -4182,6 +4190,8 @@ $.widget('ui.wcfPages', { $nextElement.append($nextImage); $nextElement.addClass('disabled'); } + + this.element.append($pageList); } else { // otherwise hide the paginator if not already hidden