Fixing wcfPages-widget
authorTim Düsterhus <timwolla@arcor.de>
Fri, 21 Oct 2011 21:50:22 +0000 (23:50 +0200)
committerTim Düsterhus <timwolla@arcor.de>
Fri, 21 Oct 2011 21:50:22 +0000 (23:50 +0200)
The icons where not loaded, because WCF.Icon was not initialized with data at that point.

wcfsetup/install/files/acp/templates/packageList.tpl
wcfsetup/install/files/js/WCF.js

index 47e9ac28469eb1e70d70d82c2644e05ebde4ea9c..83055d3d2ed618acc825b32c8926d7ea81d647a5 100644 (file)
 
                {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}
index 2dd547084f1fa9cac7be20ad33bb50402af8280b..3d6c16c1217bbdf2fd6f07c5aecc394f6e6de282 100644 (file)
@@ -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');