diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-10-25 05:27:33 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-10-25 05:27:33 -0400 |
commit | 52a184e31c0ca5618e6d4873625bf3b7716944b3 (patch) | |
tree | 39620359c8311c66b85771f34d0fe30318ffbb7d /ui/jquery.ui.tabs.js | |
parent | 974e5f81964bb2449a5554d1bac1c82beeee9067 (diff) | |
download | jquery-ui-52a184e31c0ca5618e6d4873625bf3b7716944b3.tar.gz jquery-ui-52a184e31c0ca5618e6d4873625bf3b7716944b3.zip |
Tabs: Removed ajaxOptions and cache options. Fixes #7147 - Tabs: Remove ajaxOptions and cache options.
Diffstat (limited to 'ui/jquery.ui.tabs.js')
-rw-r--r-- | ui/jquery.ui.tabs.js | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 0d920c3a1..77dad0892 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -825,7 +825,6 @@ $.widget( "ui.tabs", { } }, - // TODO: Remove this function in 1.10 when ajaxOptions is removed _ajaxSettings: function( anchor, event, eventData ) { var that = this; return { @@ -862,70 +861,6 @@ if ( $.uiBackCompat !== false ) { } }); - // TODO: Remove _ajaxSettings() method when removing this extension - // ajaxOptions and cache options - $.widget( "ui.tabs", $.ui.tabs, { - options: { - ajaxOptions: null, - cache: false - }, - - _create: function() { - this._super(); - - var that = this; - - this._on({ tabsbeforeload: function( event, ui ) { - // tab is already cached - if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) { - event.preventDefault(); - return; - } - - ui.jqXHR.success(function() { - if ( that.options.cache ) { - $.data( ui.tab[ 0 ], "cache.tabs", true ); - } - }); - }}); - }, - - _ajaxSettings: function( anchor, event, ui ) { - var ajaxOptions = this.options.ajaxOptions; - return $.extend( {}, ajaxOptions, { - error: function( xhr, status ) { - try { - // Passing index avoid a race condition when this method is - // called after the user has selected another tab. - // Pass the anchor that initiated this request allows - // loadError to manipulate the tab content panel via $(a.hash) - ajaxOptions.error( - xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] ); - } - catch ( error ) {} - } - }, this._superApply( arguments ) ); - }, - - _setOption: function( key, value ) { - // reset cache if switching from cached to not cached - if ( key === "cache" && value === false ) { - this.anchors.removeData( "cache.tabs" ); - } - this._super( key, value ); - }, - - _destroy: function() { - this.anchors.removeData( "cache.tabs" ); - this._super(); - }, - - url: function( index ){ - this.anchors.eq( index ).removeData( "cache.tabs" ); - this._superApply( arguments ); - } - }); - // abort method $.widget( "ui.tabs", $.ui.tabs, { abort: function() { |