Compare commits
13 commits
Author | SHA1 | Date | |
---|---|---|---|
|
bb7d98f018 | ||
|
e6f8951983 | ||
|
e83fcdcb02 | ||
|
139135a98a | ||
|
5b92a5f5ec | ||
|
e2ab2ba1d5 | ||
|
aa6f8c8cd3 | ||
|
ab1504f14f | ||
|
96501d38a9 | ||
|
124817e668 | ||
|
d59b0f3e27 | ||
|
d269e426e0 | ||
|
138d5b7b81 |
|
@ -9,9 +9,9 @@ var fs = require("fs"),
|
||||||
extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g;
|
extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g;
|
||||||
|
|
||||||
var opts = {
|
var opts = {
|
||||||
version: "1.6.1",
|
version: "1.6.2 RC 1",
|
||||||
short_version: "1.6.1",
|
short_version: "1.6.2rc1",
|
||||||
final_version: "1.6.1",
|
final_version: "1.6.2",
|
||||||
categories: []
|
categories: []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ var r20 = /%20/g,
|
||||||
rCRLF = /\r?\n/g,
|
rCRLF = /\r?\n/g,
|
||||||
rhash = /#.*$/,
|
rhash = /#.*$/,
|
||||||
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
||||||
rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
|
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
|
||||||
// #7653, #8125, #8152: local protocol detection
|
// #7653, #8125, #8152: local protocol detection
|
||||||
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/,
|
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
|
||||||
rnoContent = /^(?:GET|HEAD)$/,
|
rnoContent = /^(?:GET|HEAD)$/,
|
||||||
rprotocol = /^\/\//,
|
rprotocol = /^\/\//,
|
||||||
rquery = /\?/,
|
rquery = /\?/,
|
||||||
|
@ -644,6 +644,8 @@ jQuery.extend({
|
||||||
// If data is available, append data to url
|
// If data is available, append data to url
|
||||||
if ( s.data ) {
|
if ( s.data ) {
|
||||||
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
|
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
|
||||||
|
// #9682: remove data so that it's not used in an eventual retry
|
||||||
|
delete s.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ifModifiedKey before adding the anti-cache parameter
|
// Get ifModifiedKey before adding the anti-cache parameter
|
||||||
|
@ -727,7 +729,7 @@ jQuery.extend({
|
||||||
transport.send( requestHeaders, done );
|
transport.send( requestHeaders, done );
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Propagate exception as error if not done
|
// Propagate exception as error if not done
|
||||||
if ( status < 2 ) {
|
if ( state < 2 ) {
|
||||||
done( -1, e );
|
done( -1, e );
|
||||||
// Simply rethrow otherwise
|
// Simply rethrow otherwise
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -37,12 +37,12 @@ jQuery.fn.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
addClass: function( value ) {
|
addClass: function( value ) {
|
||||||
var classNames, i, l, elem, setClass, c, cl;
|
var classNames, i, l, elem,
|
||||||
|
setClass, c, cl;
|
||||||
|
|
||||||
if ( jQuery.isFunction( value ) ) {
|
if ( jQuery.isFunction( value ) ) {
|
||||||
return this.each(function( j ) {
|
return this.each(function( j ) {
|
||||||
var self = jQuery( this );
|
jQuery( this ).addClass( value.call(this, j, this.className) );
|
||||||
self.addClass( value.call(this, j, self.attr("class") || "") );
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,11 +57,11 @@ jQuery.fn.extend({
|
||||||
elem.className = value;
|
elem.className = value;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
setClass = elem.className;
|
setClass = " " + elem.className + " ";
|
||||||
|
|
||||||
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
|
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
|
||||||
if ( !~setClass.indexOf(classNames[ c ]) ) {
|
if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
|
||||||
setClass += " " + classNames[ c ];
|
setClass += classNames[ c ] + " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elem.className = jQuery.trim( setClass );
|
elem.className = jQuery.trim( setClass );
|
||||||
|
@ -78,8 +78,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
if ( jQuery.isFunction( value ) ) {
|
if ( jQuery.isFunction( value ) ) {
|
||||||
return this.each(function( j ) {
|
return this.each(function( j ) {
|
||||||
var self = jQuery( this );
|
jQuery( this ).removeClass( value.call(this, j, this.className) );
|
||||||
self.removeClass( value.call(this, j, self.attr("class")) );
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,9 +111,8 @@ jQuery.fn.extend({
|
||||||
isBool = typeof stateVal === "boolean";
|
isBool = typeof stateVal === "boolean";
|
||||||
|
|
||||||
if ( jQuery.isFunction( value ) ) {
|
if ( jQuery.isFunction( value ) ) {
|
||||||
return this.each(function(i) {
|
return this.each(function( i ) {
|
||||||
var self = jQuery(this);
|
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
|
||||||
self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
src/css.js
15
src/css.js
|
@ -315,21 +315,20 @@ function getWH( elem, name, extra ) {
|
||||||
var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
||||||
which = name === "width" ? cssWidth : cssHeight;
|
which = name === "width" ? cssWidth : cssHeight;
|
||||||
|
|
||||||
if ( extra !== "margin" && extra !== "border" ) {
|
if ( val > 0 ) {
|
||||||
|
if ( extra !== "border" ) {
|
||||||
jQuery.each( which, function() {
|
jQuery.each( which, function() {
|
||||||
val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
|
|
||||||
if ( !extra ) {
|
if ( !extra ) {
|
||||||
val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
|
val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
|
||||||
}
|
}
|
||||||
|
if ( extra === "margin" ) {
|
||||||
|
val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
|
||||||
|
} else {
|
||||||
|
val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( val > 0 ) {
|
|
||||||
if ( extra === "margin" ) {
|
|
||||||
jQuery.each( which, function() {
|
|
||||||
val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return val + "px";
|
return val + "px";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ jQuery.extend({
|
||||||
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
||||||
returned.promise().then( newDefer.resolve, newDefer.reject );
|
returned.promise().then( newDefer.resolve, newDefer.reject );
|
||||||
} else {
|
} else {
|
||||||
newDefer[ action ]( returned );
|
newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
2
src/effects.js
vendored
2
src/effects.js
vendored
|
@ -411,7 +411,7 @@ jQuery.fx.prototype = {
|
||||||
if ( t() && jQuery.timers.push(t) && !timerId ) {
|
if ( t() && jQuery.timers.push(t) && !timerId ) {
|
||||||
// Use requestAnimationFrame instead of setInterval if available
|
// Use requestAnimationFrame instead of setInterval if available
|
||||||
if ( requestAnimationFrame ) {
|
if ( requestAnimationFrame ) {
|
||||||
timerId = 1;
|
timerId = true;
|
||||||
raf = function() {
|
raf = function() {
|
||||||
// When timerId gets set to null at any point, this stops
|
// When timerId gets set to null at any point, this stops
|
||||||
if ( timerId ) {
|
if ( timerId ) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit d97b37ec322136406790e75d03333559f38bbecb
|
Subproject commit d4f23f8a882d13b71768503e2db9fa33ef169ba0
|
|
@ -321,25 +321,40 @@ test("jQuery.ajax() - responseText on error", function() {
|
||||||
|
|
||||||
test(".ajax() - retry with jQuery.ajax( this )", function() {
|
test(".ajax() - retry with jQuery.ajax( this )", function() {
|
||||||
|
|
||||||
expect( 1 );
|
expect( 2 );
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
|
|
||||||
var firstTime = 1;
|
var firstTime = true,
|
||||||
|
previousUrl;
|
||||||
|
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: url("data/errorWithText.php"),
|
url: url("data/errorWithText.php"),
|
||||||
error: function() {
|
error: function() {
|
||||||
if ( firstTime ) {
|
if ( firstTime ) {
|
||||||
firstTime = 0;
|
firstTime = false;
|
||||||
jQuery.ajax( this );
|
jQuery.ajax( this );
|
||||||
} else {
|
} else {
|
||||||
ok( true , "Test retrying with jQuery.ajax(this) works" );
|
ok( true , "Test retrying with jQuery.ajax(this) works" );
|
||||||
|
jQuery.ajax({
|
||||||
|
url: url("data/errorWithText.php"),
|
||||||
|
data: { x: 1 },
|
||||||
|
beforeSend: function() {
|
||||||
|
if ( !previousUrl ) {
|
||||||
|
previousUrl = this.url;
|
||||||
|
} else {
|
||||||
|
strictEqual( this.url , previousUrl, "url parameters are not re-appended" );
|
||||||
start();
|
start();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
jQuery.ajax( this );
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test(".ajax() - headers" , function() {
|
test(".ajax() - headers" , function() {
|
||||||
|
|
|
@ -762,7 +762,8 @@ test("val(select) after form.reset() (Bug #2551)", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
var testAddClass = function(valueObj) {
|
var testAddClass = function(valueObj) {
|
||||||
expect(7);
|
expect(9);
|
||||||
|
|
||||||
var div = jQuery("div");
|
var div = jQuery("div");
|
||||||
div.addClass( valueObj("test") );
|
div.addClass( valueObj("test") );
|
||||||
var pass = true;
|
var pass = true;
|
||||||
|
@ -791,10 +792,16 @@ var testAddClass = function(valueObj) {
|
||||||
div.addClass( valueObj("bar baz") );
|
div.addClass( valueObj("bar baz") );
|
||||||
equals( div.attr("class"), "foo bar baz", "Make sure there isn't too much trimming." );
|
equals( div.attr("class"), "foo bar baz", "Make sure there isn't too much trimming." );
|
||||||
|
|
||||||
div.removeAttr("class");
|
div.removeClass();
|
||||||
div.addClass( valueObj("foo") ).addClass( valueObj("foo") )
|
div.addClass( valueObj("foo") ).addClass( valueObj("foo") )
|
||||||
equal( div.attr("class"), "foo", "Do not add the same class twice in separate calls." );
|
equal( div.attr("class"), "foo", "Do not add the same class twice in separate calls." );
|
||||||
div.removeAttr("class");
|
|
||||||
|
div.addClass( valueObj("fo") );
|
||||||
|
equal( div.attr("class"), "foo fo", "Adding a similar class does not get interrupted." );
|
||||||
|
div.removeClass().addClass("wrap2");
|
||||||
|
ok( div.addClass("wrap").hasClass("wrap"), "Can add similarly named classes");
|
||||||
|
|
||||||
|
div.removeClass();
|
||||||
div.addClass( valueObj("bar bar") );
|
div.addClass( valueObj("bar bar") );
|
||||||
equal( div.attr("class"), "bar", "Do not add the same class twice in the same call." );
|
equal( div.attr("class"), "bar", "Do not add the same class twice in the same call." );
|
||||||
};
|
};
|
||||||
|
@ -959,7 +966,7 @@ test("toggleClass(Function[, boolean])", function() {
|
||||||
test("toggleClass(Fucntion[, boolean]) with incoming value", function() {
|
test("toggleClass(Fucntion[, boolean]) with incoming value", function() {
|
||||||
expect(14);
|
expect(14);
|
||||||
|
|
||||||
var e = jQuery("#firstp"), old = e.attr("class");
|
var e = jQuery("#firstp"), old = e.attr("class") || "";
|
||||||
ok( !e.is(".test"), "Assert class not present" );
|
ok( !e.is(".test"), "Assert class not present" );
|
||||||
|
|
||||||
e.toggleClass(function(i, val) {
|
e.toggleClass(function(i, val) {
|
||||||
|
|
|
@ -275,6 +275,33 @@ test( "jQuery.Deferred.pipe - deferred (fail)", function() {
|
||||||
strictEqual( value3, 6, "result of filter ok" );
|
strictEqual( value3, 6, "result of filter ok" );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test( "jQuery.Deferred.pipe - context", function() {
|
||||||
|
|
||||||
|
expect(4);
|
||||||
|
|
||||||
|
var context = {};
|
||||||
|
|
||||||
|
jQuery.Deferred().resolveWith( context, [ 2 ] ).pipe(function( value ) {
|
||||||
|
return value * 3;
|
||||||
|
}).done(function( value ) {
|
||||||
|
strictEqual( this, context, "custom context correctly propagated" );
|
||||||
|
strictEqual( value, 6, "proper value received" );
|
||||||
|
});
|
||||||
|
|
||||||
|
var defer = jQuery.Deferred(),
|
||||||
|
piped = defer.pipe(function( value ) {
|
||||||
|
return value * 3;
|
||||||
|
});
|
||||||
|
|
||||||
|
defer.resolve( 2 );
|
||||||
|
|
||||||
|
piped.done(function( value ) {
|
||||||
|
strictEqual( this.promise(), piped, "default context gets updated to latest defer in the chain" );
|
||||||
|
strictEqual( value, 6, "proper value received" );
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
test( "jQuery.when" , function() {
|
test( "jQuery.when" , function() {
|
||||||
|
|
||||||
expect( 23 );
|
expect( 23 );
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.6.2rc1
|
1.6.3pre
|
Loading…
Reference in a new issue