From ef995fd92585d81021880de05cabfecb27f825a6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 12 May 2013 14:25:58 +0200 Subject: [PATCH] Removed broken remote support for ui.tabs --- wcfsetup/install/files/js/WCF.js | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 7c1a4c90cc..a915d6c2fd 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -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; } }); -- 2.20.1