Removed broken remote support for ui.tabs
authorAlexander Ebert <ebert@woltlab.com>
Sun, 12 May 2013 12:25:58 +0000 (14:25 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 12 May 2013 12:25:58 +0000 (14:25 +0200)
wcfsetup/install/files/js/WCF.js

index 7c1a4c90cc77335af622c44c7cf8079ddb6512d9..a915d6c2fd42037cc0017cf4ebb31d0737f8aea8 100755 (executable)
@@ -8485,6 +8485,69 @@ $.widget('ui.wcfTabs', $.ui.tabs, {
                if (!$active || $active === '') $active = 0;
                
                this.select($active);
+       },
+       
+       /**
+        * @see $.ui.tabs.prototype._processTabs()
+        */
+       _processTabs: function() {
+               var that = this;
+
+               this.tablist = this._getList()
+                       .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
+                       .attr( "role", "tablist" );
+
+               this.tabs = this.tablist.find( "> li:has(a[href])" )
+                       .addClass( "ui-state-default ui-corner-top" )
+                       .attr({
+                               role: "tab",
+                               tabIndex: -1
+                       });
+
+               this.anchors = this.tabs.map(function() {
+                               return $( "a", this )[ 0 ];
+                       })
+                       .addClass( "ui-tabs-anchor" )
+                       .attr({
+                               role: "presentation",
+                               tabIndex: -1
+                       });
+
+               this.panels = $();
+
+               this.anchors.each(function( i, anchor ) {
+                       var selector, panel,
+                               anchorId = $( anchor ).uniqueId().attr( "id" ),
+                               tab = $( anchor ).closest( "li" ),
+                               originalAriaControls = tab.attr( "aria-controls" );
+
+                       // inline tab
+                       selector = anchor.hash;
+                       panel = that.element.find( that._sanitizeSelector( selector ) );
+                       
+                       if ( panel.length) {
+                               that.panels = that.panels.add( panel );
+                       }
+                       if ( originalAriaControls ) {
+                               tab.data( "ui-tabs-aria-controls", originalAriaControls );
+                       }
+                       tab.attr({
+                               "aria-controls": selector.substring( 1 ),
+                               "aria-labelledby": anchorId
+                       });
+                       panel.attr( "aria-labelledby", anchorId );
+               });
+
+               this.panels
+                       .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
+                       .attr( "role", "tabpanel" );
+       },
+       
+       /**
+        * @see $.ui.tabs.prototype.load()
+        */
+       load: function( index, event ) {
+               return;
        }
 });