assets/bower_components/jquery-ui/ui/tabs.js in catscope-0.0.3 vs assets/bower_components/jquery-ui/ui/tabs.js in catscope-0.1.0
- old
+ new
@@ -1,10 +1,10 @@
/*!
- * jQuery UI Tabs 1.11.2
+ * jQuery UI Tabs 1.11.4
* http://jqueryui.com
*
- * Copyright 2014 jQuery Foundation and other contributors
+ * Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/tabs/
*/
@@ -23,11 +23,11 @@
factory( jQuery );
}
}(function( $ ) {
return $.widget( "ui.tabs", {
- version: "1.11.2",
+ version: "1.11.4",
delay: 300,
options: {
active: null,
collapsible: false,
event: "click",
@@ -199,12 +199,13 @@
// Focus the appropriate tab, based on which key was pressed
event.preventDefault();
clearTimeout( this.activating );
selectedIndex = this._focusNextTab( selectedIndex, goingForward );
- // Navigating with control key will prevent automatic activation
- if ( !event.ctrlKey ) {
+ // Navigating with control/command key will prevent automatic activation
+ if ( !event.ctrlKey && !event.metaKey ) {
+
// Update aria-selected immediately so that AT think the tab is already selected.
// Otherwise AT may confuse the user by stating that they need to activate the tab,
// but the tab will already be activated by the time the announcement finishes.
focusedTab.attr( "aria-selected", "false" );
this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
@@ -814,10 +815,22 @@
anchor = tab.find( ".ui-tabs-anchor" ),
panel = this._getPanelForTab( tab ),
eventData = {
tab: tab,
panel: panel
+ },
+ complete = function( jqXHR, status ) {
+ if ( status === "abort" ) {
+ that.panels.stop( false, true );
+ }
+
+ tab.removeClass( "ui-tabs-loading" );
+ panel.removeAttr( "aria-busy" );
+
+ if ( jqXHR === that.xhr ) {
+ delete that.xhr;
+ }
};
// not remote
if ( this._isLocal( anchor[ 0 ] ) ) {
return;
@@ -831,31 +844,24 @@
if ( this.xhr && this.xhr.statusText !== "canceled" ) {
tab.addClass( "ui-tabs-loading" );
panel.attr( "aria-busy", "true" );
this.xhr
- .success(function( response ) {
+ .done(function( response, status, jqXHR ) {
// support: jQuery <1.8
// http://bugs.jquery.com/ticket/11778
setTimeout(function() {
panel.html( response );
that._trigger( "load", event, eventData );
+
+ complete( jqXHR, status );
}, 1 );
})
- .complete(function( jqXHR, status ) {
+ .fail(function( jqXHR, status ) {
// support: jQuery <1.8
// http://bugs.jquery.com/ticket/11778
setTimeout(function() {
- if ( status === "abort" ) {
- that.panels.stop( false, true );
- }
-
- tab.removeClass( "ui-tabs-loading" );
- panel.removeAttr( "aria-busy" );
-
- if ( jqXHR === that.xhr ) {
- delete that.xhr;
- }
+ complete( jqXHR, status );
}, 1 );
});
}
},