Index: trunk/phase3/js2/js2stopgap.js |
— | — | @@ -9,9 +9,9 @@ |
10 | 10 | * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) |
11 | 11 | * Revision: 6246 |
12 | 12 | */ |
13 | | -( function() { |
| 13 | +(function(){ |
14 | 14 | |
15 | | -var |
| 15 | +var |
16 | 16 | // Will speed up references to window, and allows munging its name. |
17 | 17 | window = this, |
18 | 18 | // Will speed up references to undefined, and allows munging its name. |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | // (both of which we optimize for) |
32 | 32 | quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, |
33 | 33 | // Is it a simple selector |
34 | | - isSimple = /^.[^:# \[\.,]*$/; |
| 34 | + isSimple = /^.[^:#\[\.,]*$/; |
35 | 35 | |
36 | 36 | jQuery.fn = jQuery.prototype = { |
37 | 37 | init: function( selector, context ) { |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | var match = quickExpr.exec( selector ); |
52 | 52 | |
53 | 53 | // Verify a match, and that no context was specified for #id |
54 | | - if ( match && ( match[1] || !context ) ) { |
| 54 | + if ( match && (match[1] || !context) ) { |
55 | 55 | |
56 | 56 | // HANDLE: $(html) -> $(array) |
57 | 57 | if ( match[1] ) |
— | — | @@ -88,9 +88,9 @@ |
89 | 89 | this.context = selector.context; |
90 | 90 | } |
91 | 91 | |
92 | | - return this.setArray( jQuery.isArray( selector ) ? |
| 92 | + return this.setArray(jQuery.isArray( selector ) ? |
93 | 93 | selector : |
94 | | - jQuery.makeArray( selector ) ); |
| 94 | + jQuery.makeArray(selector)); |
95 | 95 | }, |
96 | 96 | |
97 | 97 | // Start with an empty selector |
— | — | @@ -128,7 +128,7 @@ |
129 | 129 | ret.context = this.context; |
130 | 130 | |
131 | 131 | if ( name === "find" ) |
132 | | - ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; |
| 132 | + ret.selector = this.selector + (this.selector ? " " : "") + selector; |
133 | 133 | else if ( name ) |
134 | 134 | ret.selector = this.selector + "." + name + "(" + selector + ")"; |
135 | 135 | |
— | — | @@ -174,12 +174,12 @@ |
175 | 175 | return this[0] && jQuery[ type || "attr" ]( this[0], name ); |
176 | 176 | |
177 | 177 | else { |
178 | | - options = { }; |
| 178 | + options = {}; |
179 | 179 | options[ name ] = value; |
180 | 180 | } |
181 | 181 | |
182 | 182 | // Check to see if we're setting style values |
183 | | - return this.each( function( i ) { |
| 183 | + return this.each(function(i){ |
184 | 184 | // Set all the styles |
185 | 185 | for ( name in options ) |
186 | 186 | jQuery.attr( |
— | — | @@ -188,30 +188,30 @@ |
189 | 189 | this, |
190 | 190 | name, jQuery.prop( this, options[ name ], type, i, name ) |
191 | 191 | ); |
192 | | - } ); |
| 192 | + }); |
193 | 193 | }, |
194 | 194 | |
195 | 195 | css: function( key, value ) { |
196 | 196 | // ignore negative width and height values |
197 | | - if ( ( key == 'width' || key == 'height' ) && parseFloat( value ) < 0 ) |
| 197 | + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) |
198 | 198 | value = undefined; |
199 | 199 | return this.attr( key, value, "curCSS" ); |
200 | 200 | }, |
201 | 201 | |
202 | 202 | text: function( text ) { |
203 | 203 | if ( typeof text !== "object" && text != null ) |
204 | | - return this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( text ) ); |
| 204 | + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); |
205 | 205 | |
206 | 206 | var ret = ""; |
207 | 207 | |
208 | | - jQuery.each( text || this, function() { |
209 | | - jQuery.each( this.childNodes, function() { |
| 208 | + jQuery.each( text || this, function(){ |
| 209 | + jQuery.each( this.childNodes, function(){ |
210 | 210 | if ( this.nodeType != 8 ) |
211 | 211 | ret += this.nodeType != 1 ? |
212 | 212 | this.nodeValue : |
213 | 213 | jQuery.fn.text( [ this ] ); |
214 | | - } ); |
215 | | - } ); |
| 214 | + }); |
| 215 | + }); |
216 | 216 | |
217 | 217 | return ret; |
218 | 218 | }, |
— | — | @@ -219,60 +219,60 @@ |
220 | 220 | wrapAll: function( html ) { |
221 | 221 | if ( this[0] ) { |
222 | 222 | // The elements to wrap the target around |
223 | | - var wrap = jQuery( html, this[0].ownerDocument ). clone (); |
| 223 | + var wrap = jQuery( html, this[0].ownerDocument ).clone(); |
224 | 224 | |
225 | 225 | if ( this[0].parentNode ) |
226 | 226 | wrap.insertBefore( this[0] ); |
227 | 227 | |
228 | | - wrap.map( function() { |
| 228 | + wrap.map(function(){ |
229 | 229 | var elem = this; |
230 | 230 | |
231 | 231 | while ( elem.firstChild ) |
232 | 232 | elem = elem.firstChild; |
233 | 233 | |
234 | 234 | return elem; |
235 | | - } ).append( this ); |
| 235 | + }).append(this); |
236 | 236 | } |
237 | 237 | |
238 | 238 | return this; |
239 | 239 | }, |
240 | 240 | |
241 | 241 | wrapInner: function( html ) { |
242 | | - return this.each( function() { |
| 242 | + return this.each(function(){ |
243 | 243 | jQuery( this ).contents().wrapAll( html ); |
244 | | - } ); |
| 244 | + }); |
245 | 245 | }, |
246 | 246 | |
247 | 247 | wrap: function( html ) { |
248 | | - return this.each( function() { |
| 248 | + return this.each(function(){ |
249 | 249 | jQuery( this ).wrapAll( html ); |
250 | | - } ); |
| 250 | + }); |
251 | 251 | }, |
252 | 252 | |
253 | 253 | append: function() { |
254 | | - return this.domManip( arguments, true, function( elem ) { |
255 | | - if ( this.nodeType == 1 ) |
| 254 | + return this.domManip(arguments, true, function(elem){ |
| 255 | + if (this.nodeType == 1) |
256 | 256 | this.appendChild( elem ); |
257 | | - } ); |
| 257 | + }); |
258 | 258 | }, |
259 | 259 | |
260 | 260 | prepend: function() { |
261 | | - return this.domManip( arguments, true, function( elem ) { |
262 | | - if ( this.nodeType == 1 ) |
| 261 | + return this.domManip(arguments, true, function(elem){ |
| 262 | + if (this.nodeType == 1) |
263 | 263 | this.insertBefore( elem, this.firstChild ); |
264 | | - } ); |
| 264 | + }); |
265 | 265 | }, |
266 | 266 | |
267 | 267 | before: function() { |
268 | | - return this.domManip( arguments, false, function( elem ) { |
| 268 | + return this.domManip(arguments, false, function(elem){ |
269 | 269 | this.parentNode.insertBefore( elem, this ); |
270 | | - } ); |
| 270 | + }); |
271 | 271 | }, |
272 | 272 | |
273 | 273 | after: function() { |
274 | | - return this.domManip( arguments, false, function( elem ) { |
| 274 | + return this.domManip(arguments, false, function(elem){ |
275 | 275 | this.parentNode.insertBefore( elem, this.nextSibling ); |
276 | | - } ); |
| 276 | + }); |
277 | 277 | }, |
278 | 278 | |
279 | 279 | end: function() { |
— | — | @@ -292,16 +292,16 @@ |
293 | 293 | jQuery.find( selector, this[0], ret ); |
294 | 294 | return ret; |
295 | 295 | } else { |
296 | | - return this.pushStack( jQuery.unique( jQuery.map( this, function( elem ) { |
| 296 | + return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ |
297 | 297 | return jQuery.find( selector, elem ); |
298 | | - } ) ), "find", selector ); |
| 298 | + })), "find", selector ); |
299 | 299 | } |
300 | 300 | }, |
301 | 301 | |
302 | | - clone : function( events ) { |
| 302 | + clone: function( events ) { |
303 | 303 | // Do the clone |
304 | | - var ret = this.map( function() { |
305 | | - if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc( this ) ) { |
| 304 | + var ret = this.map(function(){ |
| 305 | + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { |
306 | 306 | // IE copies events bound via attachEvent when |
307 | 307 | // using cloneNode. Calling detachEvent on the |
308 | 308 | // clone will also remove the events from the orignal |
— | — | @@ -312,21 +312,21 @@ |
313 | 313 | // the name attribute on an input). |
314 | 314 | var html = this.outerHTML; |
315 | 315 | if ( !html ) { |
316 | | - var div = this.ownerDocument.createElement( "div" ); |
317 | | - div.appendChild( this.cloneNode( true ) ); |
| 316 | + var div = this.ownerDocument.createElement("div"); |
| 317 | + div.appendChild( this.cloneNode(true) ); |
318 | 318 | html = div.innerHTML; |
319 | 319 | } |
320 | 320 | |
321 | | - return jQuery.clean( [ html.replace( / jQuery\d+="(?:\d+|null)"/g, "" ).replace( /^\s*/, "" ) ] )[0]; |
| 321 | + return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; |
322 | 322 | } else |
323 | | - return this.cloneNode( true ); |
324 | | - } ); |
| 323 | + return this.cloneNode(true); |
| 324 | + }); |
325 | 325 | |
326 | 326 | // Copy the events from the original to the clone |
327 | 327 | if ( events === true ) { |
328 | | - var orig = this.find( "*" ).andSelf(), i = 0; |
| 328 | + var orig = this.find("*").andSelf(), i = 0; |
329 | 329 | |
330 | | - ret.find( "*" ).andSelf().each( function() { |
| 330 | + ret.find("*").andSelf().each(function(){ |
331 | 331 | if ( this.nodeName !== orig[i].nodeName ) |
332 | 332 | return; |
333 | 333 | |
— | — | @@ -339,7 +339,7 @@ |
340 | 340 | } |
341 | 341 | |
342 | 342 | i++; |
343 | | - } ); |
| 343 | + }); |
344 | 344 | } |
345 | 345 | |
346 | 346 | // Return the cloned set |
— | — | @@ -349,30 +349,30 @@ |
350 | 350 | filter: function( selector ) { |
351 | 351 | return this.pushStack( |
352 | 352 | jQuery.isFunction( selector ) && |
353 | | - jQuery.grep( this, function( elem, i ) { |
| 353 | + jQuery.grep(this, function(elem, i){ |
354 | 354 | return selector.call( elem, i ); |
355 | | - } ) || |
| 355 | + }) || |
356 | 356 | |
357 | | - jQuery.multiFilter( selector, jQuery.grep( this, function( elem ) { |
| 357 | + jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ |
358 | 358 | return elem.nodeType === 1; |
359 | | - } ) ), "filter", selector ); |
| 359 | + }) ), "filter", selector ); |
360 | 360 | }, |
361 | 361 | |
362 | 362 | closest: function( selector ) { |
363 | | - var pos = jQuery.expr.match.POS.test( selector ) ? jQuery( selector ) : null, |
| 363 | + var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, |
364 | 364 | closer = 0; |
365 | 365 | |
366 | | - return this.map( function() { |
| 366 | + return this.map(function(){ |
367 | 367 | var cur = this; |
368 | 368 | while ( cur && cur.ownerDocument ) { |
369 | | - if ( pos ? pos.index( cur ) > - 1 : jQuery( cur ).is( selector ) ) { |
370 | | - jQuery.data( cur, "closest", closer ); |
| 369 | + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { |
| 370 | + jQuery.data(cur, "closest", closer); |
371 | 371 | return cur; |
372 | 372 | } |
373 | 373 | cur = cur.parentNode; |
374 | 374 | closer++; |
375 | 375 | } |
376 | | - } ); |
| 376 | + }); |
377 | 377 | }, |
378 | 378 | |
379 | 379 | not: function( selector ) { |
— | — | @@ -384,9 +384,9 @@ |
385 | 385 | selector = jQuery.multiFilter( selector, this ); |
386 | 386 | |
387 | 387 | var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; |
388 | | - return this.filter( function() { |
| 388 | + return this.filter(function() { |
389 | 389 | return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; |
390 | | - } ); |
| 390 | + }); |
391 | 391 | }, |
392 | 392 | |
393 | 393 | add: function( selector ) { |
— | — | @@ -395,7 +395,7 @@ |
396 | 396 | typeof selector === "string" ? |
397 | 397 | jQuery( selector ) : |
398 | 398 | jQuery.makeArray( selector ) |
399 | | - ) ) ); |
| 399 | + ))); |
400 | 400 | }, |
401 | 401 | |
402 | 402 | is: function( selector ) { |
— | — | @@ -407,12 +407,12 @@ |
408 | 408 | }, |
409 | 409 | |
410 | 410 | val: function( value ) { |
411 | | - if ( value === undefined ) { |
| 411 | + if ( value === undefined ) { |
412 | 412 | var elem = this[0]; |
413 | 413 | |
414 | 414 | if ( elem ) { |
415 | | - if ( jQuery.nodeName( elem, 'option' ) ) |
416 | | - return ( elem.attributes.value || { } ).specified ? elem.value : elem.text; |
| 415 | + if( jQuery.nodeName( elem, 'option' ) ) |
| 416 | + return (elem.attributes.value || {}).specified ? elem.value : elem.text; |
417 | 417 | |
418 | 418 | // We need to handle select boxes special |
419 | 419 | if ( jQuery.nodeName( elem, "select" ) ) { |
— | — | @@ -431,7 +431,7 @@ |
432 | 432 | |
433 | 433 | if ( option.selected ) { |
434 | 434 | // Get the specifc value for the option |
435 | | - value = jQuery( option ).val(); |
| 435 | + value = jQuery(option).val(); |
436 | 436 | |
437 | 437 | // We don't need an array for one selects |
438 | 438 | if ( one ) |
— | — | @@ -442,11 +442,11 @@ |
443 | 443 | } |
444 | 444 | } |
445 | 445 | |
446 | | - return values; |
| 446 | + return values; |
447 | 447 | } |
448 | 448 | |
449 | 449 | // Everything else, we just grab the value |
450 | | - return ( elem.value || "" ).replace( /\r/g, "" ); |
| 450 | + return (elem.value || "").replace(/\r/g, ""); |
451 | 451 | |
452 | 452 | } |
453 | 453 | |
— | — | @@ -456,35 +456,35 @@ |
457 | 457 | if ( typeof value === "number" ) |
458 | 458 | value += ''; |
459 | 459 | |
460 | | - return this.each( function() { |
| 460 | + return this.each(function(){ |
461 | 461 | if ( this.nodeType != 1 ) |
462 | 462 | return; |
463 | 463 | |
464 | | - if ( jQuery.isArray( value ) && /radio|checkbox/ .test( this.type ) ) |
465 | | - this.checked = ( jQuery.inArray( this.value, value ) >= 0 || |
466 | | - jQuery.inArray( this.name, value ) >= 0 ); |
| 464 | + if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) |
| 465 | + this.checked = (jQuery.inArray(this.value, value) >= 0 || |
| 466 | + jQuery.inArray(this.name, value) >= 0); |
467 | 467 | |
468 | 468 | else if ( jQuery.nodeName( this, "select" ) ) { |
469 | | - var values = jQuery.makeArray( value ); |
| 469 | + var values = jQuery.makeArray(value); |
470 | 470 | |
471 | | - jQuery( "option", this ).each( function() { |
472 | | - this.selected = ( jQuery.inArray( this.value, values ) >= 0 || |
473 | | - jQuery.inArray( this.text, values ) >= 0 ); |
474 | | - } ); |
| 471 | + jQuery( "option", this ).each(function(){ |
| 472 | + this.selected = (jQuery.inArray( this.value, values ) >= 0 || |
| 473 | + jQuery.inArray( this.text, values ) >= 0); |
| 474 | + }); |
475 | 475 | |
476 | 476 | if ( !values.length ) |
477 | | - this.selectedIndex = - 1; |
| 477 | + this.selectedIndex = -1; |
478 | 478 | |
479 | 479 | } else |
480 | 480 | this.value = value; |
481 | | - } ); |
| 481 | + }); |
482 | 482 | }, |
483 | 483 | |
484 | 484 | html: function( value ) { |
485 | 485 | return value === undefined ? |
486 | | - ( this[0] ? |
487 | | - this[0].innerHTML.replace( / jQuery\d+="(?:\d+|null)"/g, "" ) : |
488 | | - null ) : |
| 486 | + (this[0] ? |
| 487 | + this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : |
| 488 | + null) : |
489 | 489 | this.empty().append( value ); |
490 | 490 | }, |
491 | 491 | |
— | — | @@ -493,18 +493,18 @@ |
494 | 494 | }, |
495 | 495 | |
496 | 496 | eq: function( i ) { |
497 | | - return this.slice( i, + i + 1 ); |
| 497 | + return this.slice( i, +i + 1 ); |
498 | 498 | }, |
499 | 499 | |
500 | 500 | slice: function() { |
501 | 501 | return this.pushStack( Array.prototype.slice.apply( this, arguments ), |
502 | | - "slice", Array.prototype.slice.call( arguments ).join( "," ) ); |
| 502 | + "slice", Array.prototype.slice.call(arguments).join(",") ); |
503 | 503 | }, |
504 | 504 | |
505 | 505 | map: function( callback ) { |
506 | | - return this.pushStack( jQuery.map( this, function( elem, i ) { |
| 506 | + return this.pushStack( jQuery.map(this, function(elem, i){ |
507 | 507 | return callback.call( elem, i, elem ); |
508 | | - } ) ); |
| 508 | + })); |
509 | 509 | }, |
510 | 510 | |
511 | 511 | andSelf: function() { |
— | — | @@ -513,14 +513,14 @@ |
514 | 514 | |
515 | 515 | domManip: function( args, table, callback ) { |
516 | 516 | if ( this[0] ) { |
517 | | - var fragment = ( this[0].ownerDocument || this[0] ).createDocumentFragment(), |
518 | | - scripts = jQuery.clean( args, ( this[0].ownerDocument || this[0] ), fragment ), |
| 517 | + var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), |
| 518 | + scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), |
519 | 519 | first = fragment.firstChild; |
520 | 520 | |
521 | 521 | if ( first ) |
522 | 522 | for ( var i = 0, l = this.length; i < l; i++ ) |
523 | | - callback.call( root( this[i], first ), this.length > 1 || i > 0 ? |
524 | | - fragment.cloneNode( true ) : fragment ); |
| 523 | + callback.call( root(this[i], first), this.length > 1 || i > 0 ? |
| 524 | + fragment.cloneNode(true) : fragment ); |
525 | 525 | |
526 | 526 | if ( scripts ) |
527 | 527 | jQuery.each( scripts, evalScript ); |
— | — | @@ -529,9 +529,9 @@ |
530 | 530 | return this; |
531 | 531 | |
532 | 532 | function root( elem, cur ) { |
533 | | - return table && jQuery.nodeName( elem, "table" ) && jQuery.nodeName( cur, "tr" ) ? |
534 | | - ( elem.getElementsByTagName( "tbody" )[0] || |
535 | | - elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) ) : |
| 533 | + return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? |
| 534 | + (elem.getElementsByTagName("tbody")[0] || |
| 535 | + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : |
536 | 536 | elem; |
537 | 537 | } |
538 | 538 | } |
— | — | @@ -542,11 +542,11 @@ |
543 | 543 | |
544 | 544 | function evalScript( i, elem ) { |
545 | 545 | if ( elem.src ) |
546 | | - jQuery.ajax( { |
| 546 | + jQuery.ajax({ |
547 | 547 | url: elem.src, |
548 | 548 | async: false, |
549 | 549 | dataType: "script" |
550 | | - } ); |
| 550 | + }); |
551 | 551 | |
552 | 552 | else |
553 | 553 | jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); |
— | — | @@ -555,25 +555,25 @@ |
556 | 556 | elem.parentNode.removeChild( elem ); |
557 | 557 | } |
558 | 558 | |
559 | | -function now() { |
560 | | - return + new Date; |
| 559 | +function now(){ |
| 560 | + return +new Date; |
561 | 561 | } |
562 | 562 | |
563 | 563 | jQuery.extend = jQuery.fn.extend = function() { |
564 | 564 | // copy reference to target object |
565 | | - var target = arguments[0] || { }, i = 1, length = arguments.length, deep = false, options; |
| 565 | + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; |
566 | 566 | |
567 | 567 | // Handle a deep copy situation |
568 | 568 | if ( typeof target === "boolean" ) { |
569 | 569 | deep = target; |
570 | | - target = arguments[1] || { }; |
| 570 | + target = arguments[1] || {}; |
571 | 571 | // skip the boolean and the target |
572 | 572 | i = 2; |
573 | 573 | } |
574 | 574 | |
575 | 575 | // Handle case when target is a string or something (possible in deep copy) |
576 | | - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) |
577 | | - target = { }; |
| 576 | + if ( typeof target !== "object" && !jQuery.isFunction(target) ) |
| 577 | + target = {}; |
578 | 578 | |
579 | 579 | // extend jQuery itself if only one argument is passed |
580 | 580 | if ( length == i ) { |
— | — | @@ -583,7 +583,7 @@ |
584 | 584 | |
585 | 585 | for ( ; i < length; i++ ) |
586 | 586 | // Only deal with non-null/undefined values |
587 | | - if ( ( options = arguments[ i ] ) != null ) |
| 587 | + if ( (options = arguments[ i ]) != null ) |
588 | 588 | // Extend the base object |
589 | 589 | for ( var name in options ) { |
590 | 590 | var src = target[ name ], copy = options[ name ]; |
— | — | @@ -594,7 +594,7 @@ |
595 | 595 | |
596 | 596 | // Recurse if we're merging object values |
597 | 597 | if ( deep && copy && typeof copy === "object" && !copy.nodeType ) |
598 | | - target[ name ] = jQuery.extend( deep, |
| 598 | + target[ name ] = jQuery.extend( deep, |
599 | 599 | // Never move original objects, clone them |
600 | 600 | src || ( copy.length != null ? [ ] : { } ) |
601 | 601 | , copy ); |
— | — | @@ -610,12 +610,12 @@ |
611 | 611 | }; |
612 | 612 | |
613 | 613 | // exclude the following css properties to add px |
614 | | -var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, |
| 614 | +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, |
615 | 615 | // cache defaultView |
616 | | - defaultView = document.defaultView || { }, |
| 616 | + defaultView = document.defaultView || {}, |
617 | 617 | toString = Object.prototype.toString; |
618 | 618 | |
619 | | -jQuery.extend( { |
| 619 | +jQuery.extend({ |
620 | 620 | noConflict: function( deep ) { |
621 | 621 | window.$ = _$; |
622 | 622 | |
— | — | @@ -629,11 +629,11 @@ |
630 | 630 | // Since version 1.3, DOM methods and functions like alert |
631 | 631 | // aren't supported. They return false on IE (#2968). |
632 | 632 | isFunction: function( obj ) { |
633 | | - return toString.call( obj ) === "[object Function]"; |
| 633 | + return toString.call(obj) === "[object Function]"; |
634 | 634 | }, |
635 | 635 | |
636 | 636 | isArray: function( obj ) { |
637 | | - return toString.call( obj ) === "[object Array]"; |
| 637 | + return toString.call(obj) === "[object Array]"; |
638 | 638 | }, |
639 | 639 | |
640 | 640 | // check if an element is in a (or is an) XML document |
— | — | @@ -644,11 +644,11 @@ |
645 | 645 | |
646 | 646 | // Evalulates a script in a global context |
647 | 647 | globalEval: function( data ) { |
648 | | - if ( data && /\S/.test( data ) ) { |
| 648 | + if ( data && /\S/.test(data) ) { |
649 | 649 | // Inspired by code by Andrea Giammarchi |
650 | 650 | // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html |
651 | | - var head = document.getElementsByTagName( "head" )[0] || document.documentElement, |
652 | | - script = document.createElement( "script" ); |
| 651 | + var head = document.getElementsByTagName("head")[0] || document.documentElement, |
| 652 | + script = document.createElement("script"); |
653 | 653 | |
654 | 654 | script.type = "text/javascript"; |
655 | 655 | if ( jQuery.support.scriptEval ) |
— | — | @@ -689,7 +689,7 @@ |
690 | 690 | break; |
691 | 691 | } else |
692 | 692 | for ( var value = object[0]; |
693 | | - i < length && callback.call( value, i, value ) !== false; value = object[++i] ) { } |
| 693 | + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} |
694 | 694 | } |
695 | 695 | |
696 | 696 | return object; |
— | — | @@ -709,31 +709,31 @@ |
710 | 710 | className: { |
711 | 711 | // internal only, use addClass("class") |
712 | 712 | add: function( elem, classNames ) { |
713 | | - jQuery.each( ( classNames || "" ).split( /\s+/ ), function( i, className ) { |
| 713 | + jQuery.each((classNames || "").split(/\s+/), function(i, className){ |
714 | 714 | if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) |
715 | | - elem.className += ( elem.className ? " " : "" ) + className; |
716 | | - } ); |
| 715 | + elem.className += (elem.className ? " " : "") + className; |
| 716 | + }); |
717 | 717 | }, |
718 | 718 | |
719 | 719 | // internal only, use removeClass("class") |
720 | 720 | remove: function( elem, classNames ) { |
721 | | - if ( elem.nodeType == 1 ) |
| 721 | + if (elem.nodeType == 1) |
722 | 722 | elem.className = classNames !== undefined ? |
723 | | - jQuery.grep( elem.className.split( /\s+/ ), function( className ) { |
| 723 | + jQuery.grep(elem.className.split(/\s+/), function(className){ |
724 | 724 | return !jQuery.className.has( classNames, className ); |
725 | | - } ).join( " " ) : |
| 725 | + }).join(" ") : |
726 | 726 | ""; |
727 | 727 | }, |
728 | 728 | |
729 | 729 | // internal only, use hasClass("class") |
730 | 730 | has: function( elem, className ) { |
731 | | - return elem && jQuery.inArray( className, ( elem.className || elem ).toString().split( /\s+/ ) ) > -1; |
| 731 | + return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; |
732 | 732 | } |
733 | 733 | }, |
734 | 734 | |
735 | 735 | // A method for quickly swapping in/out CSS properties to get correct calculations |
736 | 736 | swap: function( elem, options, callback ) { |
737 | | - var old = { }; |
| 737 | + var old = {}; |
738 | 738 | // Remember the old values, and insert the new ones |
739 | 739 | for ( var name in options ) { |
740 | 740 | old[ name ] = elem.style[ name ]; |
— | — | @@ -759,12 +759,12 @@ |
760 | 760 | |
761 | 761 | jQuery.each( which, function() { |
762 | 762 | if ( !extra ) |
763 | | - val -= parseFloat( jQuery.curCSS( elem, "padding" + this, true ) ) || 0; |
| 763 | + val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; |
764 | 764 | if ( extra === "margin" ) |
765 | | - val += parseFloat( jQuery.curCSS( elem, "margin" + this, true ) ) || 0; |
| 765 | + val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; |
766 | 766 | else |
767 | | - val -= parseFloat( jQuery.curCSS( elem, "border" + this + "Width", true ) ) || 0; |
768 | | - } ); |
| 767 | + val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; |
| 768 | + }); |
769 | 769 | } |
770 | 770 | |
771 | 771 | if ( elem.offsetWidth !== 0 ) |
— | — | @@ -772,7 +772,7 @@ |
773 | 773 | else |
774 | 774 | jQuery.swap( elem, props, getWH ); |
775 | 775 | |
776 | | - return Math.max( 0, Math.round( val ) ); |
| 776 | + return Math.max(0, Math.round(val)); |
777 | 777 | } |
778 | 778 | |
779 | 779 | return jQuery.curCSS( elem, name, force ); |
— | — | @@ -815,9 +815,9 @@ |
816 | 816 | ret = "1"; |
817 | 817 | |
818 | 818 | } else if ( elem.currentStyle ) { |
819 | | - var camelCase = name.replace( /\-(\w)/g, function( all, letter ) { |
| 819 | + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ |
820 | 820 | return letter.toUpperCase(); |
821 | | - } ); |
| 821 | + }); |
822 | 822 | |
823 | 823 | ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; |
824 | 824 | |
— | — | @@ -9506,4 +9506,4 @@ |
9507 | 9507 | } |
9508 | 9508 | |
9509 | 9509 | // Define a dummy mvJsLoader.doLoad() function |
9510 | | -mvJsLoader = { doLoad: function( deps, callback ) { callback(); } }; |
| 9510 | +mvJsLoader = { doLoad: function( deps, callback ) { callback(); } }; |
\ No newline at end of file |
Index: trunk/phase3/js2/js2stopgap.min.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | |
3 | 3 | (function(){var |
4 | | -window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:# \[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;} |
| 4 | +window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;} |
5 | 5 | if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]) |
6 | 6 | selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]) |
7 | 7 | return jQuery().find(selector);var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else |