diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-10-25 05:32:02 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-10-25 05:32:02 -0400 |
commit | 723d3e0040c46079cedf3998f4e28edfceed7c74 (patch) | |
tree | f8e0dfbddc42eb4f504aa6599a87e96b215f4367 | |
parent | acdd1917b2ab5a3b5469678d835107152ed5aaef (diff) | |
download | jquery-ui-723d3e0040c46079cedf3998f4e28edfceed7c74.tar.gz jquery-ui-723d3e0040c46079cedf3998f4e28edfceed7c74.zip |
Tabs: Removed fx option. Fixes #8320 - Tabs: Remove fx option.
-rw-r--r-- | tests/unit/tabs/tabs_common_deprecated.js | 1 | ||||
-rw-r--r-- | ui/jquery.ui.tabs.js | 70 |
2 files changed, 0 insertions, 71 deletions
diff --git a/tests/unit/tabs/tabs_common_deprecated.js b/tests/unit/tabs/tabs_common_deprecated.js index 040e8cbf2..8caff1ac5 100644 --- a/tests/unit/tabs/tabs_common_deprecated.js +++ b/tests/unit/tabs/tabs_common_deprecated.js @@ -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 diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index bc911139e..28786e5ce 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -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 ); |