]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Removed select method. Fixes #7156 - Tabs: Remove select method.
authorScott González <scott.gonzalez@gmail.com>
Thu, 25 Oct 2012 09:41:14 +0000 (05:41 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 25 Oct 2012 09:41:14 +0000 (05:41 -0400)
tests/unit/tabs/tabs_deprecated.js
ui/jquery.ui.tabs.js

index 6e84accdf3207d740b4e97fb40340abf2799b8bd..b551b3279263e6fd659082610b3a8299dca1834d 100644 (file)
@@ -391,51 +391,6 @@ test( "remove", function() {
        equal( element.tabs( "option", "active" ), false );
 });
 
-test( "select", function() {
-       expect( 23 );
-
-       var element = $( "#tabs1" ).tabs();
-       state( element, 1, 0, 0 );
-       element.tabs( "select", 1 );
-       state( element, 0, 1, 0 );
-       equal( element.tabs( "option", "active" ), 1, "active" );
-       equal( element.tabs( "option", "selected" ), 1, "selected" );
-       element.tabs( "destroy" );
-
-       element.tabs({ collapsible: true });
-       state( element, 1, 0, 0 );
-       element.tabs( "select", 0 );
-       state( element, 0, 0, 0 );
-       equal( element.tabs( "option", "active" ), false, "active" );
-       equal( element.tabs( "option", "selected" ), -1, "selected" );
-       element.tabs( "destroy" );
-
-       element.tabs({ collapsible: true });
-       element.tabs( "select", -1 );
-       state( element, 0, 0, 0 );
-       equal( element.tabs( "option", "active" ), false, "active" );
-       equal( element.tabs( "option", "selected" ), -1, "selected" );
-       element.tabs( "destroy" );
-
-       element.tabs();
-       state( element, 1, 0, 0 );
-       equal( element.tabs( "option", "active" ), 0, "active" );
-       equal( element.tabs( "option", "selected" ), 0, "selected" );
-       element.tabs( "select", 0 );
-       state( element, 1, 0, 0 );
-       equal( element.tabs( "option", "active" ), 0, "active" );
-       equal( element.tabs( "option", "selected" ), 0, "selected" );
-       element.tabs( "select", -1 );
-       state( element, 1, 0, 0 );
-       equal( element.tabs( "option", "active" ), 0, "active" );
-       equal( element.tabs( "option", "selected" ), 0, "selected" );
-
-       element.tabs( "select", "#fragment-2" );
-       state( element, 0, 1, 0 );
-       equal( element.tabs( "option", "active" ), 1, "active" );
-       equal( element.tabs( "option", "selected" ), 1, "selected" );
-});
-
 asyncTest( "abort", function() {
        expect( 1 );
 
index ed0ca1036abfd02a0a1895b9fb7c0ca6143827e9..10cdaecd4d91f9dd03c4a44d7ed86ad5608896c1 100644 (file)
@@ -1082,21 +1082,6 @@ if ( $.uiBackCompat !== false ) {
                }
        });
 
-       // select method
-       $.widget( "ui.tabs", $.ui.tabs, {
-               select: function( index ) {
-                       index = this._getIndex( index );
-                       if ( index === -1 ) {
-                               if ( this.options.collapsible && this.options.selected !== -1 ) {
-                                       index = this.options.selected;
-                               } else {
-                                       return;
-                               }
-                       }
-                       this.anchors.eq( index ).trigger( this.options.event + this.eventNamespace );
-               }
-       });
-
        // load event
        $.widget( "ui.tabs", $.ui.tabs, {
                _trigger: function( type, event, data ) {