Skip to content
Permalink
Browse files

Tabs: Removed spinner option. Fixes #7151 - Tabs: Remove spinner option.

  • Loading branch information...
scottgonzalez committed Oct 25, 2012
1 parent a9053d9 commit 6a00d418bc8346df7124708125056ad4717ce89c
Showing with 0 additions and 45 deletions.
  1. +0 −1 tests/unit/tabs/tabs_common_deprecated.js
  2. +0 −18 tests/unit/tabs/tabs_deprecated.js
  3. +0 −26 ui/jquery.ui.tabs.js
@@ -9,7 +9,6 @@ TestHelpers.commonWidgetTests( "tabs", {
idPrefix: "ui-tabs-",
panelTemplate: "<div></div>",
show: null,
spinner: "<em>Loading&#8230;</em>",
tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>",

// callbacks
@@ -66,24 +66,6 @@ test( "tabTemplate + panelTemplate", function() {
ok( element.find( "#new" ).hasClass( "customPanel" ), "panel custom class" );
});

asyncTest( "spinner", function() {
expect( 2 );

var element = $( "#tabs2" ).tabs();

element.one( "tabsbeforeload", function() {
equal( element.find( ".ui-tabs-nav li:eq(2) em" ).length, 1, "beforeload" );
});
element.one( "tabsload", function() {
// wait until after the load finishes before checking for the spinner to be removed
setTimeout(function() {
equal( element.find( ".ui-tabs-nav li:eq(2) em" ).length, 0, "load" );
start();
}, 1 );
});
element.tabs( "option", "active", 2 );
});

module( "tabs (deprecated): events" );

asyncTest( "load", function() {
@@ -863,32 +863,6 @@ if ( $.uiBackCompat !== false ) {
}
});

// spinner
$.widget( "ui.tabs", $.ui.tabs, {
options: {
spinner: "<em>Loading&#8230;</em>"
},
_create: function() {
this._super();
this._on({
tabsbeforeload: function( event, ui ) {
// Don't react to nested tabs or tabs that don't use a spinner
if ( event.target !== this.element[ 0 ] ||
!this.options.spinner ) {
return;
}

var span = ui.tab.find( "span" ),
html = span.html();
span.html( this.options.spinner );
ui.jqXHR.complete(function() {
span.html( html );
});
}
});
}
});

// add/remove methods and events
$.widget( "ui.tabs", $.ui.tabs, {
options: {

0 comments on commit 6a00d41

Please sign in to comment.
You can’t perform that action at this time.