Some minor optimizations
authorAlexander Ebert <ebert@woltlab.com>
Sun, 12 Jul 2015 12:06:38 +0000 (14:06 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 12 Jul 2015 12:06:38 +0000 (14:06 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Ui/TabMenu.js

index ca63d04fc50081d3f456b427c0cf0e0dbc6b4004..b5114615514173860c5aba2d7c38d5a2906314cd 100644 (file)
@@ -29,16 +29,16 @@ define(['Dictionary', 'Dom/ChangeListener', 'Dom/Util', './TabMenu/Simple'], fun
                 * Initializes available tab menus.
                 */
                _init: function() {
-                       var tabMenus = document.querySelectorAll('.tabMenuContainer:not(.staticTabMenuContainer)');
+                       var container, containerId, returnValue, tabMenu, tabMenus = document.querySelectorAll('.tabMenuContainer:not(.staticTabMenuContainer)');
                        for (var i = 0, length = tabMenus.length; i < length; i++) {
-                               var container = tabMenus[i];
-                               var containerId = DomUtil.identify(container);
+                               container = tabMenus[i];
+                               containerId = DomUtil.identify(container);
                                
                                if (_tabMenus.has(containerId)) {
                                        continue;
                                }
                                
-                               var tabMenu = new SimpleTabMenu(container), returnValue;
+                               tabMenu = new SimpleTabMenu(container);
                                if (tabMenu.validate()) {
                                        returnValue = tabMenu.init();