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

index 040e8cbf2fef3d1311834bb6d0a927a202080799..8caff1ac5c22b3e4dc7bd266106ff0b84ce3c718 100644 (file)
@@ -7,7 +7,6 @@ TestHelpers.commonWidgetTests( "tabs", {
                event: "click",
                heightStyle: "content",
                hide: null,
-               fx: null,
                idPrefix: "ui-tabs-",
                panelTemplate: "<div></div>",
                // show: null, // conflicts with old show callback
index bc911139e0fc3045ee36decccecf25c9b7b1b0ba..28786e5ceeabee155177e25f71c12e1ff34e066c 100644 (file)
@@ -1207,76 +1207,6 @@ if ( $.uiBackCompat !== false ) {
                        return this._super( type, event, _data );
                }
        });
-
-       // fx option
-       // The new animation options (show, hide) conflict with the old show callback.
-       // The old fx option wins over show/hide anyway (always favor back-compat).
-       // If a user wants to use the new animation API, they must give up the old API.
-       $.widget( "ui.tabs", $.ui.tabs, {
-               options: {
-                       fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 }
-               },
-
-               _getFx: function() {
-                       var hide, show,
-                               fx = this.options.fx;
-
-                       if ( fx ) {
-                               if ( $.isArray( fx ) ) {
-                                       hide = fx[ 0 ];
-                                       show = fx[ 1 ];
-                               } else {
-                                       hide = show = fx;
-                               }
-                       }
-
-                       return fx ? { show: show, hide: hide } : null;
-               },
-
-               _toggle: function( event, eventData ) {
-                       var that = this,
-                               toShow = eventData.newPanel,
-                               toHide = eventData.oldPanel,
-                               fx = this._getFx();
-
-                       if ( !fx ) {
-                               return this._super( event, eventData );
-                       }
-
-                       that.running = true;
-
-                       function complete() {
-                               that.running = false;
-                               that._trigger( "activate", event, eventData );
-                       }
-
-                       function show() {
-                               eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
-                               if ( toShow.length && fx.show ) {
-                                       toShow
-                                               .animate( fx.show, fx.show.duration, function() {
-                                                       complete();
-                                               });
-                               } else {
-                                       toShow.show();
-                                       complete();
-                               }
-                       }
-
-                       // start out by hiding, then showing, then completing
-                       if ( toHide.length && fx.hide ) {
-                               toHide.animate( fx.hide, fx.hide.duration, function() {
-                                       eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
-                                       show();
-                               });
-                       } else {
-                               eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
-                               toHide.hide();
-                               show();
-                       }
-               }
-       });
 }
 
 })( jQuery );