From 90f2f03294f30592e0db765e23a6b09ec805e4a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 21 Oct 2011 23:50:22 +0200 Subject: [PATCH] Fixing wcfPages-widget The icons where not loaded, because WCF.Icon was not initialized with data at that point. --- .../install/files/acp/templates/packageList.tpl | 10 +++++----- wcfsetup/install/files/js/WCF.js | 15 ++++++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/packageList.tpl b/wcfsetup/install/files/acp/templates/packageList.tpl index 47e9ac2846..83055d3d2e 100644 --- a/wcfsetup/install/files/acp/templates/packageList.tpl +++ b/wcfsetup/install/files/acp/templates/packageList.tpl @@ -10,11 +10,11 @@ {if $pluginsCount > 1} WCF.Icon.addObject({ - 'wcf.icon.arrow.down': 'icon/dropDown1.svg', - 'wcf.icon.next': 'icon/next1.svg', - 'wcf.icon.next.disabled': 'icon/next1D.svg', - 'wcf.icon.previous': 'icon/previous1.svg', - 'wcf.icon.previous.disabled': 'icon/previous1D.svg' + 'wcf.icon.arrow.down': '{@RELATIVE_WCF_DIR}icon/dropDown1.svg', + 'wcf.icon.next': '{@RELATIVE_WCF_DIR}icon/next1.svg', + 'wcf.icon.next.disabled': '{@RELATIVE_WCF_DIR}icon/next1D.svg', + 'wcf.icon.previous': '{@RELATIVE_WCF_DIR}icon/previous1.svg', + 'wcf.icon.previous.disabled': '{@RELATIVE_WCF_DIR}icon/previous1D.svg' }); new WCF.ACP.Package.List({@($pluginsCount / 1)|ceil}); {/if} diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 2dd547084f..3d6c16c121 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2966,11 +2966,11 @@ $.widget('ui.wcfPages', { maxPage: 1, // icons - previousIcon: WCF.Icon.get('wcf.icon.previous'), - previousDisabledIcon: WCF.Icon.get('wcf.icon.previous.disabled'), - arrowDownIcon: WCF.Icon.get('wcf.icon.arrow.down'), - nextIcon: WCF.Icon.get('wcf.icon.next'), - nextDisabledIcon: WCF.Icon.get('wcf.icon.next.disabled'), + previousIcon: null, + previousDisabledIcon: null, + arrowDownIcon: null, + nextIcon: null, + nextDisabledIcon: null, // language // we use options here instead of language variables, because the paginator is not only usable with pages @@ -2984,6 +2984,11 @@ $.widget('ui.wcfPages', { _create: function() { if (this.options.nextPage === null) this.options.nextPage = WCF.Language.get('wcf.global.page.next'); if (this.options.previousPage === null) this.options.previousPage = WCF.Language.get('wcf.global.page.previous'); + if (this.options.previousIcon === null) this.options.previousIcon = WCF.Icon.get('wcf.icon.previous'); + 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'); this.element.addClass('pageNavigation'); -- 2.20.1