lib/epuber/third_party/bower/bower_components/jquery/src/queue.js in epuber-0.6.0 vs lib/epuber/third_party/bower/bower_components/jquery/src/queue.js in epuber-0.7.0
- old
+ new
@@ -1,24 +1,24 @@
-define([
+define( [
"./core",
- "./data/var/data_priv",
+ "./data/var/dataPriv",
"./deferred",
"./callbacks"
-], function( jQuery, data_priv ) {
+], function( jQuery, dataPriv ) {
-jQuery.extend({
+jQuery.extend( {
queue: function( elem, type, data ) {
var queue;
if ( elem ) {
type = ( type || "fx" ) + "queue";
- queue = data_priv.get( elem, type );
+ queue = dataPriv.get( elem, type );
// Speed up dequeue by getting out quickly if this is just a lookup
if ( data ) {
if ( !queue || jQuery.isArray( data ) ) {
- queue = data_priv.access( elem, type, jQuery.makeArray(data) );
+ queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
} else {
queue.push( data );
}
}
return queue || [];
@@ -61,53 +61,54 @@
},
// Not public - generate a queueHooks object, or return the current one
_queueHooks: function( elem, type ) {
var key = type + "queueHooks";
- return data_priv.get( elem, key ) || data_priv.access( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- data_priv.remove( elem, [ type + "queue", key ] );
- })
- });
+ return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
+ empty: jQuery.Callbacks( "once memory" ).add( function() {
+ dataPriv.remove( elem, [ type + "queue", key ] );
+ } )
+ } );
}
-});
+} );
-jQuery.fn.extend({
+jQuery.fn.extend( {
queue: function( type, data ) {
var setter = 2;
if ( typeof type !== "string" ) {
data = type;
type = "fx";
setter--;
}
if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
+ return jQuery.queue( this[ 0 ], type );
}
return data === undefined ?
this :
- this.each(function() {
+ this.each( function() {
var queue = jQuery.queue( this, type, data );
// Ensure a hooks for this queue
jQuery._queueHooks( this, type );
- if ( type === "fx" && queue[0] !== "inprogress" ) {
+ if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
jQuery.dequeue( this, type );
}
- });
+ } );
},
dequeue: function( type ) {
- return this.each(function() {
+ return this.each( function() {
jQuery.dequeue( this, type );
- });
+ } );
},
clearQueue: function( type ) {
return this.queue( type || "fx", [] );
},
+
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise: function( type, obj ) {
var tmp,
count = 1,
@@ -125,18 +126,18 @@
type = undefined;
}
type = type || "fx";
while ( i-- ) {
- tmp = data_priv.get( elements[ i ], type + "queueHooks" );
+ tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
if ( tmp && tmp.empty ) {
count++;
tmp.empty.add( resolve );
}
}
resolve();
return defer.promise( obj );
}
-});
+} );
return jQuery;
-});
+} );