Compare commits
No commits in common. "master" and "1.6.2rc1" have entirely different histories.
|
@ -9,9 +9,9 @@ var fs = require("fs"),
|
|||
extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g;
|
||||
|
||||
var opts = {
|
||||
version: "1.6.2 RC 1",
|
||||
short_version: "1.6.2rc1",
|
||||
final_version: "1.6.2",
|
||||
version: "1.6.1",
|
||||
short_version: "1.6.1",
|
||||
final_version: "1.6.1",
|
||||
categories: []
|
||||
};
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ var r20 = /%20/g,
|
|||
rCRLF = /\r?\n/g,
|
||||
rhash = /#.*$/,
|
||||
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
||||
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
|
||||
rinput = /^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
|
||||
// #7653, #8125, #8152: local protocol detection
|
||||
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
|
||||
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|widget):$/,
|
||||
rnoContent = /^(?:GET|HEAD)$/,
|
||||
rprotocol = /^\/\//,
|
||||
rquery = /\?/,
|
||||
|
@ -644,8 +644,6 @@ jQuery.extend({
|
|||
// If data is available, append data to url
|
||||
if ( 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
|
||||
|
@ -729,7 +727,7 @@ jQuery.extend({
|
|||
transport.send( requestHeaders, done );
|
||||
} catch (e) {
|
||||
// Propagate exception as error if not done
|
||||
if ( state < 2 ) {
|
||||
if ( status < 2 ) {
|
||||
done( -1, e );
|
||||
// Simply rethrow otherwise
|
||||
} else {
|
||||
|
|
|
@ -37,12 +37,12 @@ jQuery.fn.extend({
|
|||
},
|
||||
|
||||
addClass: function( value ) {
|
||||
var classNames, i, l, elem,
|
||||
setClass, c, cl;
|
||||
var classNames, i, l, elem, setClass, c, cl;
|
||||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
return this.each(function( j ) {
|
||||
jQuery( this ).addClass( value.call(this, j, this.className) );
|
||||
var self = jQuery( this );
|
||||
self.addClass( value.call(this, j, self.attr("class") || "") );
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -57,11 +57,11 @@ jQuery.fn.extend({
|
|||
elem.className = value;
|
||||
|
||||
} else {
|
||||
setClass = " " + elem.className + " ";
|
||||
setClass = elem.className;
|
||||
|
||||
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
|
||||
if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
|
||||
setClass += classNames[ c ] + " ";
|
||||
if ( !~setClass.indexOf(classNames[ c ]) ) {
|
||||
setClass += " " + classNames[ c ];
|
||||
}
|
||||
}
|
||||
elem.className = jQuery.trim( setClass );
|
||||
|
@ -78,7 +78,8 @@ jQuery.fn.extend({
|
|||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
return this.each(function( j ) {
|
||||
jQuery( this ).removeClass( value.call(this, j, this.className) );
|
||||
var self = jQuery( this );
|
||||
self.removeClass( value.call(this, j, self.attr("class")) );
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -111,8 +112,9 @@ jQuery.fn.extend({
|
|||
isBool = typeof stateVal === "boolean";
|
||||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
return this.each(function( i ) {
|
||||
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
|
||||
return this.each(function(i) {
|
||||
var self = jQuery(this);
|
||||
self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
|
||||
});
|
||||
}
|
||||
|
||||
|
|
21
src/css.js
21
src/css.js
|
@ -315,20 +315,21 @@ function getWH( elem, name, extra ) {
|
|||
var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
||||
which = name === "width" ? cssWidth : cssHeight;
|
||||
|
||||
if ( extra !== "margin" && extra !== "border" ) {
|
||||
jQuery.each( which, function() {
|
||||
val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
|
||||
if ( !extra ) {
|
||||
val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ( val > 0 ) {
|
||||
if ( extra !== "border" ) {
|
||||
if ( extra === "margin" ) {
|
||||
jQuery.each( which, function() {
|
||||
if ( !extra ) {
|
||||
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;
|
||||
}
|
||||
val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
|
||||
});
|
||||
}
|
||||
|
||||
return val + "px";
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ jQuery.extend({
|
|||
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
||||
returned.promise().then( newDefer.resolve, newDefer.reject );
|
||||
} else {
|
||||
newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
|
||||
newDefer[ action ]( returned );
|
||||
}
|
||||
});
|
||||
} 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 ) {
|
||||
// Use requestAnimationFrame instead of setInterval if available
|
||||
if ( requestAnimationFrame ) {
|
||||
timerId = true;
|
||||
timerId = 1;
|
||||
raf = function() {
|
||||
// When timerId gets set to null at any point, this stops
|
||||
if ( timerId ) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d4f23f8a882d13b71768503e2db9fa33ef169ba0
|
||||
Subproject commit d97b37ec322136406790e75d03333559f38bbecb
|
|
@ -321,40 +321,25 @@ test("jQuery.ajax() - responseText on error", function() {
|
|||
|
||||
test(".ajax() - retry with jQuery.ajax( this )", function() {
|
||||
|
||||
expect( 2 );
|
||||
expect( 1 );
|
||||
|
||||
stop();
|
||||
|
||||
var firstTime = true,
|
||||
previousUrl;
|
||||
var firstTime = 1;
|
||||
|
||||
jQuery.ajax({
|
||||
url: url("data/errorWithText.php"),
|
||||
error: function() {
|
||||
if ( firstTime ) {
|
||||
firstTime = false;
|
||||
firstTime = 0;
|
||||
jQuery.ajax( this );
|
||||
} else {
|
||||
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();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
jQuery.ajax( this );
|
||||
}
|
||||
});
|
||||
start();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
test(".ajax() - headers" , function() {
|
||||
|
|
|
@ -762,8 +762,7 @@ test("val(select) after form.reset() (Bug #2551)", function() {
|
|||
});
|
||||
|
||||
var testAddClass = function(valueObj) {
|
||||
expect(9);
|
||||
|
||||
expect(7);
|
||||
var div = jQuery("div");
|
||||
div.addClass( valueObj("test") );
|
||||
var pass = true;
|
||||
|
@ -792,16 +791,10 @@ var testAddClass = function(valueObj) {
|
|||
div.addClass( valueObj("bar baz") );
|
||||
equals( div.attr("class"), "foo bar baz", "Make sure there isn't too much trimming." );
|
||||
|
||||
div.removeClass();
|
||||
div.removeAttr("class");
|
||||
div.addClass( valueObj("foo") ).addClass( valueObj("foo") )
|
||||
equal( div.attr("class"), "foo", "Do not add the same class twice in separate calls." );
|
||||
|
||||
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.removeAttr("class");
|
||||
div.addClass( valueObj("bar bar") );
|
||||
equal( div.attr("class"), "bar", "Do not add the same class twice in the same call." );
|
||||
};
|
||||
|
@ -966,7 +959,7 @@ test("toggleClass(Function[, boolean])", function() {
|
|||
test("toggleClass(Fucntion[, boolean]) with incoming value", function() {
|
||||
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" );
|
||||
|
||||
e.toggleClass(function(i, val) {
|
||||
|
|
|
@ -275,33 +275,6 @@ test( "jQuery.Deferred.pipe - deferred (fail)", function() {
|
|||
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() {
|
||||
|
||||
expect( 23 );
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.6.3pre
|
||||
1.6.2rc1
|
Loading…
Reference in a new issue