Updated to use new dialog API, removed old API
authorAlexander Ebert <ebert@woltlab.com>
Thu, 24 Nov 2011 23:43:57 +0000 (00:43 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 24 Nov 2011 23:43:57 +0000 (00:43 +0100)
wcfsetup/install/files/acp/js/WCF.ACP.js
wcfsetup/install/files/acp/templates/packageInstallationConfirm.tpl
wcfsetup/install/files/acp/templates/packageInstallationSetup.tpl
wcfsetup/install/files/acp/templates/packageListDetailed.tpl
wcfsetup/install/files/js/WCF.js

index d1fbca6a62e865ff366b51d9ef7a5ce4f823a669..3e2b319f858935f70b06c9a26bd170da8caea216 100644 (file)
@@ -123,16 +123,49 @@ WCF.ACP.Menu.prototype = {
        }
 };
 
+/**
+ * Namespace for ACP package management.
+ */
 WCF.ACP.Package = {};
 
+/**
+ * Paginated package list.
+ * 
+ * @param      integer         pages
+ */
 WCF.ACP.Package.List = function(pages) { this.init(pages); };
 WCF.ACP.Package.List.prototype = {
+       /**
+        * page cache
+        * @var object
+        */
        _pages: {},
+
+       /**
+        * plugin list references
+        * @var object
+        */
        _pluginLists: [],
+
+       /**
+        * action proxy
+        * @var WCF.Action.Proxy
+        */
        _proxy: null,
+
+       /**
+        * target container
+        * @var jQuery
+        */
        _template: null,
        
+       /**
+        * Initializes the package list.
+        * 
+        * @param       integer         pages
+        */
        init: function(pages) {
+               // handle pagination
                $('.pluginList').each($.proxy(function(index, pluginList) {
                        var $wcfPages = $(pluginList).wcfPages({
                                activePage: 1,
@@ -142,6 +175,7 @@ WCF.ACP.Package.List.prototype = {
                        this._pluginLists.push($wcfPages);
                }, this));
                
+               // initialize
                if (this._pluginLists.length > 0) {
                        this._proxy = new WCF.Action.Proxy({
                                success: $.proxy(this._success, this)
@@ -150,18 +184,31 @@ WCF.ACP.Package.List.prototype = {
                }
        },
        
+       /**
+        * Caches currently active page.
+        * 
+        * @param       object          event
+        * @param       object          data
+        */
        _cachePage: function(event, data) {
                if (!this._pages[data.currentPage]) {
                        this._pages[data.currentPage] = $('#plugins ol').html();
                }
        },
        
+       /**
+        * Loads the request page using AJAX.
+        * 
+        * @param       object          event
+        * @param       object          data
+        */
        _loadPage: function(event, data) {
                // update active page
                for (var $i = 0, $size = this._pluginLists.length; $i < $size; $i++) {
                        this._pluginLists[$i].wcfPages('overridePage', data.activePage);
                }
                
+               // load page from cache if applicable
                if (this._pages[data.activePage]) {
                        this._template.html(this._pages[data.activePage]);
                        return;
@@ -178,6 +225,13 @@ WCF.ACP.Package.List.prototype = {
                this._proxy.sendRequest();
        },
        
+       /**
+        * Displays the fetched page.
+        * 
+        * @param       object          data
+        * @param       string          textStatus
+        * @param       jQuery          jqXHR
+        */
        _success: function(data, textStatus, jqXHR) {
                this._pages[data.returnValues.activePage] = data.returnValues.template;
                this._loadPage(null, { activePage: data.returnValues.activePage });
@@ -191,8 +245,8 @@ WCF.ACP.Package.List.prototype = {
  * @param      integer         queueID
  * @param      boolean         initialize
  */
-WCF.ACP.PackageInstallation = function(actionName, queueID, initialize) { this.init(actionName, queueID, initialize); };
-WCF.ACP.PackageInstallation.prototype = {
+WCF.ACP.Package.Installation = function(actionName, queueID, initialize) { this.init(actionName, queueID, initialize); };
+WCF.ACP.Package.Installation.prototype = {
        /**
         * package installation type
         * 
@@ -200,6 +254,10 @@ WCF.ACP.PackageInstallation.prototype = {
         */
        _actionName: '',
 
+       /**
+        * dialog api
+        * @var $.ui.wcfDialog
+        */
        _api: null,
 
        /**
@@ -209,6 +267,12 @@ WCF.ACP.PackageInstallation.prototype = {
         */
        _dialog: null,
        
+       /**
+        * action proxy
+        * @var WCF.Action.Proxy
+        */
+       _proxy: null,
+
        /**
         * queue id
         *
@@ -226,7 +290,11 @@ WCF.ACP.PackageInstallation.prototype = {
        init: function(actionName, queueID, initialize) {
                this._actionName = WCF.String.ucfirst(actionName) + 'Package';
                this._queueID = queueID;
-               
+               this._proxy = new WCF.Action.Proxy({
+                       success: $.proxy(this._handleResponse, this),
+                       url: 'index.php/' + this._actionName + '/?t=' + SECURITY_TOKEN + SID_ARG_2ND
+               });
+
                if (initialize) {
                        $('#submitButton').click($.proxy(function(event) {
                                this.prepareInstallation();
@@ -239,53 +307,54 @@ WCF.ACP.PackageInstallation.prototype = {
         * Prepares installation dialog.
         */
        prepareInstallation: function() {
-               this._api = WCF.showAJAXDialog('packageInstallationDialog', true, {
-                       ajax: {
-                               url: 'index.php/' + this._actionName + '/?t=' + SECURITY_TOKEN + SID_ARG_2ND,
-                               type: 'POST',
-                               data: { queueID: this._queueID, step: 'prepare' },
-                               success: $.proxy(this._handleResponse, this)
-                       },
+               var $dialog = WCF.showAJAXDialog('packageInstallationDialog', true, {
+                       url: 'index.php/' + this._actionName + '/?t=' + SECURITY_TOKEN + SID_ARG_2ND,
+                       data: { queueID: this._queueID, step: 'prepare' },
+                       success: $.proxy(this._handleResponse, this),
                        preventClose: true,
                        hideTitle: true
                });
+
+               this._api = $dialog.data('wcfDialog');
        },
        
        /**
         * Executes response instructions.
+        * 
+        * @param       object          data
+        * @param       string          textStatus
+        * @param       jQuery          jqXHR
         */
-       _handleResponse: function() {
+       _handleResponse: function(data. textStatus, jqXHR) {
                if (this._dialog == null) {
                        this._dialog = $('#packageInstallationDialog');
                }
                
-               var $data = this._dialog.data('responseData');
-               
                // receive new queue id
-               if ($data.queueID) {
-                       this._queueID = $data.queueID;
+               if (data.queueID) {
+                       this._queueID = data.queueID;
                }
                
                // update progress
-               if ($data.progress) {
-                       $('#packageInstallationProgress').attr('value', $data.progress).text($data.progress + '%');
-                       $('#packageInstallationProgressLabel').text($data.progress + '%');
+               if (data.progress) {
+                       $('#packageInstallationProgress').attr('value', data.progress).text(data.progress + '%');
+                       $('#packageInstallationProgressLabel').text(data.progress + '%');
                }
 
                // update action
-               if ($data.currentAction) {
-                       $('#packageInstallationAction').html($data.currentAction);
+               if (data.currentAction) {
+                       $('#packageInstallationAction').html(data.currentAction);
                }
                
                // handle success
-               if ($data.step == 'success') {
+               if (data.step == 'success') {
                        this._purgeTemplateContent(function() {
                                var $id = WCF.getRandomID();
                                $('#packageInstallationInnerContent').append('<div class="formSubmit"><input type="button" id="' + $id + '" value="' + WCF.Language.get('wcf.global.button.next') + '" class="default" /></div>');
                                
-                               $('#' + $id).click($.proxy(function() {
+                               $('#' + $id).click(function() {
                                        window.location.href = "index.php/PackageList/" + SID_ARG_1ST;
-                               }, this));
+                               });
                                
                                $('#packageInstallationInnerContentContainer').wcfBlindIn();
                        });
@@ -294,24 +363,24 @@ WCF.ACP.PackageInstallation.prototype = {
                }
                
                // update template
-               if ($data.template && !$data.ignoreTemplate) {
-                       this._dialog.html($data.template);
-                       this._api.redraw();
+               if (data.template && !data.ignoreTemplate) {
+                       this._dialog.html(data.template);
+                       this._api.render();
                }
                
                // handle inner template
-               if ($data.innerTemplate) {
-                       $('#packageInstallationInnerContent').html($data.innerTemplate);
+               if (data.innerTemplate) {
+                       $('#packageInstallationInnerContent').html(data.innerTemplate);
                        
                        // create button to handle next step
-                       if ($data.step && $data.node) {
+                       if (data.step && data.node) {
                                var $id = WCF.getRandomID();
                                $('#packageInstallationInnerContent').append('<div class="formSubmit"><input type="button" id="' + $id + '" value="' + WCF.Language.get('wcf.global.button.next') + '" class="default" /></div>');
                                
                                $('#' + $id).click($.proxy(function() {
                                        // collect form values
                                        var $additionalData = {};
-                                       $('#packageInstallationInnerContent').find('input').each(function(index, inputElement) {
+                                       $('#packageInstallationInnerContent input').each(function(index, inputElement) {
                                                var $inputElement = $(inputElement);
                                                var $type = $inputElement.attr('type');
                                                
@@ -322,24 +391,24 @@ WCF.ACP.PackageInstallation.prototype = {
                                                $additionalData[$inputElement.attr('name')] = $inputElement.val();
                                        });
                                        
-                                       this._executeStep($data.step, $data.node, $additionalData);
+                                       this._executeStep(data.step, data.node, $additionalData);
                                }, this));
                        }
                        
                        $('#packageInstallationInnerContentContainer').wcfBlindIn();
                        
-                       this._api.redraw();
+                       this._api.render();
                        return;
                }
                
                // purge content
                this._purgeTemplateContent($.proxy(function() {
-                       // redraw container
-                       this._api.redraw();
+                       // render container
+                       this._api.render();
                        
                        // execute next step
-                       if ($data.step && $data.node) {
-                               this._executeStep($data.step, $data.node);
+                       if (data.step && data.node) {
+                               this._executeStep(data.step, data.node);
                        }
                }, this));
        },
@@ -353,7 +422,7 @@ WCF.ACP.PackageInstallation.prototype = {
                if ($('#packageInstallationInnerContent').children().length > 1) {
                        $('#packageInstallationInnerContentContainer').wcfBlindOut('vertical', $.proxy(function() {
                                $('#packageInstallationInnerContent').empty();
-                               this._api.redraw();
+                               this._api.render();
                                
                                // execute callback
                                callback();
@@ -379,20 +448,9 @@ WCF.ACP.PackageInstallation.prototype = {
                        queueID: this._queueID,
                        step: step
                }, additionalData);
-               
-               $.ajax({
-                       url: 'index.php/' + this._actionName + '/?t=' + SECURITY_TOKEN + SID_ARG_2ND,
-                       dataType: 'json',
-                       type: 'POST',
-                       data: $data,
-                       success: $.proxy(function(data) {
-                               this._dialog.data('responseData', data);
-                               this._handleResponse();
-                       }, this),
-                       error: function(transport) {
-                               alert(transport.responseText);
-                       }
-               });
+
+               this._proxy.setOption('data', $data);
+               this._proxy.sendRequest();
        }
 };
 
@@ -401,12 +459,12 @@ WCF.ACP.PackageInstallation.prototype = {
  * 
  * @param      jQuery          elements
  */
-WCF.ACP.PackageUninstallation = function(elements) { this.init(elements); };
-WCF.ACP.PackageUninstallation.prototype = {
+WCF.ACP.Package.Uninstallation = function(elements) { this.init(elements); };
+WCF.ACP.Package.Uninstallation.prototype = {
        /**
-        * WCF.ACP.PackageInstallation object
+        * WCF.ACP.Package.Installation object
         * 
-        * @var WCF.ACP.PackageInstallation
+        * @var WCF.ACP.Package.Installation
         */
        _installation: null,
        
@@ -434,16 +492,13 @@ WCF.ACP.PackageUninstallation.prototype = {
                var packageID = $element.data('objectID');
                
                if (confirm(WCF.Language.get('wcf.acp.package.view.button.uninstall.sure'))) {
-                       this._installation = new WCF.ACP.PackageInstallation('uninstall', 0, false);
+                       this._installation = new WCF.ACP.Package.Installation('uninstall', 0, false);
                        
                        // initialize dialog
                        WCF.showAJAXDialog('packageInstallationDialog', true, {
-                               ajax: {
-                                       url: 'index.php/UninstallPackage/?t=' + SECURITY_TOKEN + SID_ARG_2ND,
-                                       type: 'POST',
-                                       data: { packageID: packageID, step: 'prepare' },
-                                       success: $.proxy(this._installation._handleResponse, this._installation)
-                               },
+                               url: 'index.php/UninstallPackage/?t=' + SECURITY_TOKEN + SID_ARG_2ND,
+                               data: { packageID: packageID, step: 'prepare' },
+                               success: $.proxy(this._installation._handleResponse, this._installation),
                                preventClose: true,
                                hideTitle: true
                        });
@@ -715,7 +770,7 @@ WCF.ACP.Worker.prototype = {
                        
                        $('#workerInnerContentContainer').wcfBlindIn();
                        
-                       this._dialog.wcfDialog('redraw');
+                       this._dialog.wcfDialog('render');
                }
        }
 };
index 0769390449cbdef64b2fc3ed430ed12b1a25f23c..d1a64eac8197059425cc59cb3c080278d636a1b1 100644 (file)
@@ -3,7 +3,7 @@
 <script type="text/javascript">
        //<![CDATA[
        $(function() {
-               var packageInstallation = new WCF.ACP.PackageInstallation('install', {@$queueID}, true);
+               var packageInstallation = new WCF.ACP.Package.Installation('install', {@$queueID}, true);
        });
        //]]>
 </script>
index a08e9e41417c548c8e436422f2f049990ee8d985..7205be99a7f9ba6d5df5d6a1b0cdafcb4c560019 100644 (file)
@@ -2,7 +2,7 @@
 
 <script type="text/javascript">
        //<![CDATA[
-       $installation = new WCF.ACP.PackageInstallation('install', {@$queueID}, false);
+       $installation = new WCF.ACP.Package.Installation('install', {@$queueID}, false);
        $installation.prepareInstallation();
        //]]>
 </script>
index 73a26ba3465881c41b158d325340b59fbc5a20f6..c7cd5fb8f81d039ebb6a8ec47b724ff886c27908 100644 (file)
@@ -5,7 +5,7 @@
        $(function() {
                WCF.Language.add('wcf.acp.package.view.button.uninstall.sure', '{lang}wcf.acp.package.view.button.uninstall.sure{/lang}');
                
-               new WCF.ACP.PackageUninstallation($('.packageRow .uninstallButton'));
+               new WCF.ACP.Package.Uninstallation($('.packageRow .uninstallButton'));
        });
        //]]>
 </script>
index d10bde64c1da797e2bc6aab0c3ea2787e96646a0..32ff80ffcd8ff830cf8377ebe08263df6b93fbe1 100644 (file)
@@ -259,11 +259,18 @@ $.fn.extend({
        },
        
        /**
+        * CAUTION:     This method does not work properly, you should not rely
+        *              on it for now. It seems to work with the old jQuery UI-
+        *              based dialog, but no longer works with usual elements.
+        *              I will either try to fix it or remove it later, thus
+        *              this method will be deprecated for now.      -Alexander
+        * 
         * Applies a grow-effect by resizing element while moving the element
         * appropriately. Make sure the passed data.content element contains
         * all elements which affect this indirectly, this includes outer
         * containers which may apply an obstrusive padding.
         * 
+        * @deprecated
         * @param       object          data
         * @param       object          options
         * @return      jQuery
@@ -409,33 +416,20 @@ $.extend(WCF, {
         */
        _idCounter: 0,
 
-       /**
-        * Set to true after first dialog was initialized
-        * @var boolean
-        */
-       _didInitDialogs: false,
-       
        /**
         * Shows a modal dialog with a built-in AJAX-loader.
         * 
         * @param       string          dialogID
         * @param       boolean         resetDialog
-        * @return      $.ui.wcfAJAXDialog
+        * @return      jQuery
         */
        showAJAXDialog: function(dialogID, resetDialog) {
-               if (!this._didInitDialogs) {
-                       $('.ui-widget-overlay').live('click', function() {
-                               $('.ui-dialog-titlebar-close').trigger('click');
-                       });
-                       this._didInitDialogs = true;
-               }
-               
                if (!dialogID) {
                        dialogID = this.getRandomID();
                }
                
                if (!$.wcfIsset(dialogID)) {
-                       $('body').append($('<div id="' + dialogID + '"></div>'));
+                       $('<div id="' + dialogID + '"></div>').appendTo(document.body);
                }
                
                var dialog = $('#' + $.wcfEscapeID(dialogID));
@@ -444,10 +438,10 @@ $.extend(WCF, {
                        dialog.empty();
                }
                
-               dialog.addClass('overlayLoading');
-               
                var dialogOptions = arguments[2] || {};
-               return dialog.wcfAJAXDialog(dialogOptions);
+               dialog.wcfDialog(dialogOptions);
+
+               return dialog;
        },
        
        /**
@@ -460,13 +454,6 @@ $.extend(WCF, {
                // load content via AJAX, see showAJAXDialog() instead
                if (!$.wcfIsset(dialogID)) return;
 
-               if (!this._didInitDialogs) {
-                       $('.ui-widget-overlay').live('click', function() {
-                               $('.ui-dialog-titlebar-close').trigger('click');
-                       });
-                       this._didInitDialogs = true;
-               }
-               
                var $dialog = $('#' + $.wcfEscapeID(dialogID));
                if (moveToBody) {
                        $dialog.remove().appendTo($('body'));
@@ -3439,263 +3426,6 @@ $.widget('ui.wcfDialog', {
        }
 });
 
-
-/**
- * Basic implementation for WCF dialogs.
- */
-$.widget('ui.wcfDialog_old', $.ui.dialog, {
-       _init: function() {
-               this.options.autoOpen = true;
-               this.options.hide = {
-                       effect: 'fade'
-               };
-
-               if (this.options.hideTitle) {
-                       // remove title element
-                       this.element.prev().empty().remove();
-               }
-
-               this.options.close = function() {
-                       // "display: inline-block" is set by stylesheet, but additionally flagged
-                       // with important, thus we have to force the dialog to stay hidden
-                       $(this).parent('.ui-dialog').css({ display: 'none !important'});
-               };
-               
-               this.options.height = 'auto';
-               this.options.minHeight = 0;
-               this.options.modal = true;
-               this.options.width = 'auto';
-               
-               $.ui.dialog.prototype._init.apply(this, arguments);
-               
-               // center dialog on resize
-               $(window).resize($.proxy(function() {
-                       this.option('position', 'center');
-               }, this));
-       },
-
-       /**
-        * Redraws dialog, should be executed everytime content is changed.
-        */
-       redraw: function() {
-               var $dimensions = this.element.getDimensions();
-               
-               if ($dimensions.height > 200) {
-                       this.element.wcfGrow({
-                               content: this.element,//.html(),
-                               parent: this.element.parent('.ui-dialog')
-                       }, {
-                               duration: 600,
-                               complete: function() {
-                                       $(this).css({ height: 'auto' });
-                               }
-                       });
-               }
-       }
-});
-
-/**
- * Basic implementation for WCF dialogs loading content
- * via AJAX before calling dialog itself.
- */
-$.widget('ui.wcfAJAXDialog_old', $.ui.dialog, {
-       /**
-        * Indicates wether callback was already executed
-        * 
-        * @var boolean
-        */
-       _callbackExecuted: false,
-       
-       /**
-        * Initializes AJAX-request to fetch content.
-        */
-       _init: function() {
-               if (this.options.ajax) {
-                       this._loadContent();
-               }
-               
-               // force dialog to be placed centered
-               this.options.position = {
-                       my: 'center center',
-                       at: 'center center'
-               };
-               
-               // dialog should display a spinner-like image, thus immediately fire up dialog
-               this.options.autoOpen = true;
-               this.options.width = 'auto';
-               this.options.minHeight = 80;
-               
-               // disable ability to move dialog
-               this.options.resizable = false;
-               this.options.draggable = false;
-               
-               this.options.modal = true;
-               this.options.hide = {
-                       effect: 'fade'
-               };
-               
-               this.options.close = function() {
-                       // "display: inline-block" is set by stylesheet, but additionally flagged
-                       // with important, thus we have to force the dialog to stay hidden
-                       $(this).parent('.ui-dialog').css({ display: 'none !important'});
-               };
-               
-               if (this.options.preventClose) {
-                       this.options.closeOnEscape = false;
-               }
-               
-               $.ui.dialog.prototype._init.apply(this, arguments);
-               
-               // remove complete node instead of removing node-by-node
-               if (this.options.hideTitle && this.options.preventClose) {
-                       this.element.parent('.ui-dialog').find('div.ui-dialog-titlebar').empty().remove();
-               }
-               else {
-                       if (this.options.hideTitle) {
-                               // remove title element
-                               $('#ui-dialog-title-' + this.element.attr('id')).empty().remove();
-                       }
-                       
-                       if (this.options.preventClose) {
-                               // remove close-button
-                               this.element.parent('.ui-dialog').find('a.ui-dialog-titlebar-close').empty().remove();
-                       }
-               }
-               
-               // center dialog on window resize
-               $(window).resize($.proxy(function() {
-                       this.option('position', 'center');
-               }, this));
-       },
-       
-       /**
-        * Loads content via AJAX.
-        * 
-        * @todo        Enforce JSON
-        */
-       _loadContent: function() {
-               var $type = 'GET';
-               if (this.options.ajax.type) {
-                       $type = this.options.ajax.type;
-                       
-                       if (this.options.ajax.type != 'GET' && this.options.ajax.type != 'POST') {
-                               $type = 'GET';
-                       }
-               }
-               
-               var $data = this.options.ajax.data || {};
-               
-               $.ajax({
-                       url: this.options.ajax.url,
-                       context: this,
-                       dataType: 'json',
-                       type: $type,
-                       data: $data,
-                       success: $.proxy(this._createDialog, this),
-                       error: $.proxy(this._showError, this)
-               });
-       },
-
-       _showError: function(transport) {
-               var $iframe = $('<div><iframe></iframe></div>').appendTo($('body')).wcfDialog();
-               $iframe = $iframe.children('iframe');
-               $iframe.contents().find('body').append(transport.responseText);
-
-               // force dimensions
-               $iframe.css({ height: '500px', width: '860px' });
-
-               // DO NOT execute redraw until it properly works with iframes. Sadly
-               // cloning the item causes the content to be lost, resulting in zero
-               // dimensions. Fix this!
-
-               // redraw dialog
-               $iframe.parent('div').wcfDialog('redraw');
-       },
-       
-       /**
-        * Inserts content.
-        * 
-        * @param       string          data
-        */
-       _createDialog: function(data) {
-               data.ignoreTemplate = true;
-               this.element.data('responseData', data);
-
-               // work-around for AJAXProxy's different return values
-               
-               this.element.wcfGrow({
-                       content: this._getResponseValue('template'),
-                       parent: this.element.parent('.ui-dialog')
-               }, {
-                       duration: 600,
-                       complete: $.proxy(function(data) {
-                               this.element.css({
-                                       height: 'auto'
-                               });
-                               
-                               // prevent double execution due to two complete-calls (two times animate)
-                               if (this._callbackExecuted) {
-                                       return;
-                               }
-                               
-                               this._callbackExecuted = true;
-                               
-                               this.element.removeClass('overlayLoading');
-                               this.element.html(this._getResponseValue('template'));
-                               
-                               if (this.options.ajax.success) {
-                                       this.options.ajax.success();
-                               }
-                       }, this)
-               });
-       },
-
-       /**
-        * Returns specific AJAX response value.
-        * 
-        * @param       string          key
-        * @return      mixed
-        */
-       _getResponseValue: function(key) {
-               var $data = this.element.data('responseData');
-
-               // no response data stored
-               if (!$data) {
-                       return null;
-               }
-
-               // AJAXProxy
-               if ($data.returnValues && $data.returnValues[key]) {
-                       return $data.returnValues[key];
-               }
-               // PackageInstallation
-               else if ($data[key]) {
-                       return $data[key];
-               }
-
-               return null;
-       },
-       
-       /**
-        * Redraws dialog, should be executed everytime content is changed.
-        */
-       redraw: function() {
-               var $dimensions = this.element.getDimensions();
-               
-               if ($dimensions.height > 200) {
-                       this.element.wcfGrow({
-                               content: this.element,//.html(),
-                               parent: this.element.parent('.ui-dialog')
-                       }, {
-                               duration: 600,
-                               complete: function() {
-                                       $(this).css({ height: 'auto' });
-                               }
-                       });
-               }
-       }
-});
-
 /**
  * Custom tab menu implementation for WCF.
  */