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

index 763e0d84e0607ba07ef0a591a97d6285bfef3916..0d381f9e9e2020a39d827a9a84fa9564038e912d 100644 (file)
@@ -19,7 +19,6 @@ TestHelpers.commonWidgetTests( "tabs", {
                beforeLoad: null,
                create: null,
                load: null,
-               remove: null,
-               select: null
+               remove: null
        }
 });
index 5f91f1b526eb39cb6261aa564dcfaa50fb891732..10c86d2541b174cf021fcf8b9b302cace4824257 100644 (file)
@@ -198,46 +198,6 @@ asyncTest( "load", function() {
        }
 });
 
-test( "select", function() {
-       expect( 13 );
-
-       var element = $( "#tabs1" ).tabs({
-                       active: false,
-                       collapsible: true
-               }),
-               anchors = element.find( ".ui-tabs-nav .ui-tabs-anchor" ),
-               panels = element.find( ".ui-tabs-panel" );
-
-       // from collapsed
-       element.one( "tabsselect", function( event, ui ) {
-               ok( !( "originalEvent" in event ), "originalEvent" );
-               strictEqual( ui.tab, anchors[ 0 ], "ui.tab" );
-               strictEqual( ui.panel, panels[ 0 ], "ui.panel" );
-               equal( ui.index, 0, "ui.index" );
-               state( element, 0, 0, 0 );
-       });
-       element.tabs( "option", "active", 0 );
-       state( element, 1, 0, 0 );
-
-       // switching tabs
-       element.one( "tabsselect", function( event, ui ) {
-               equal( event.originalEvent.type, "click", "originalEvent" );
-               strictEqual( ui.tab, anchors[ 1 ], "ui.tab" );
-               strictEqual( ui.panel, panels[ 1 ], "ui.panel" );
-               equal( ui.index, 1, "ui.index" );
-               state( element, 1, 0, 0 );
-       });
-       anchors.eq( 1 ).click();
-       state( element, 0, 1, 0 );
-
-       // collapsing
-       element.one( "tabsselect", function() {
-               ok( false, "collapsing" );
-       });
-       element.tabs( "option", "active", false );
-       state( element, 0, 0, 0 );
-});
-
 module( "tabs (deprecated): methods" );
 
 test( "add", function() {
index 4a82873052f9b8a3a7b22cbbed91ac3e9d1ae0bd..cc9e93b7dd058edbd246f645da2fc2b317c3e6cc 100644 (file)
@@ -1046,27 +1046,6 @@ if ( $.uiBackCompat !== false ) {
                }
        });
 
-       // select event
-       $.widget( "ui.tabs", $.ui.tabs, {
-               options: {
-                       select: null
-               },
-               _trigger: function( type, event, data ) {
-                       var ret = this._superApply( arguments );
-                       if ( !ret ) {
-                               return false;
-                       }
-                       if ( type === "beforeActivate" && data.newTab.length ) {
-                               ret = this._super( "select", event, {
-                                       tab: data.newTab.find( ".ui-tabs-anchor" )[ 0],
-                                       panel: data.newPanel[ 0 ],
-                                       index: data.newTab.closest( "li" ).index()
-                               });
-                       }
-                       return ret;
-               }
-       });
-
        // load event
        $.widget( "ui.tabs", $.ui.tabs, {
                _trigger: function( type, event, data ) {