From 282b96ddd9a84b740788c2358ec0f5fedafb7cc6 Mon Sep 17 00:00:00 2001 From: Noah Slater Date: Mon, 6 Jul 2009 00:33:50 +0000 Subject: trimmed trailing whitespace git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791350 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/jquery.js | 148 ++++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 74 deletions(-) (limited to 'share/www/script/jquery.js') diff --git a/share/www/script/jquery.js b/share/www/script/jquery.js index 3a4badd0..9ee8702c 100644 --- a/share/www/script/jquery.js +++ b/share/www/script/jquery.js @@ -11,7 +11,7 @@ */ (function(){ -var +var // Will speed up references to window, and allows munging its name. window = this, // Will speed up references to undefined, and allows munging its name. @@ -399,13 +399,13 @@ jQuery.fn = jQuery.prototype = { }, val: function( value ) { - if ( value === undefined ) { + if ( value === undefined ) { var elem = this[0]; if ( elem ) { if( jQuery.nodeName( elem, 'option' ) ) return (elem.attributes.value || {}).specified ? elem.value : elem.text; - + // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, @@ -434,7 +434,7 @@ jQuery.fn = jQuery.prototype = { } } - return values; + return values; } // Everything else, we just grab the value @@ -513,13 +513,13 @@ jQuery.fn = jQuery.prototype = { if ( first ) for ( var i = 0, l = this.length; i < l; i++ ) callback.call( root(this[i], first), i > 0 ? extra.cloneNode(true) : fragment ); - + if ( scripts ) jQuery.each( scripts, evalScript ); } return this; - + function root( elem, cur ) { return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? (elem.getElementsByTagName("tbody")[0] || @@ -586,7 +586,7 @@ jQuery.extend = jQuery.fn.extend = function() { // Recurse if we're merging object values if ( deep && copy && typeof copy === "object" && !copy.nodeType ) - target[ name ] = jQuery.extend( deep, + target[ name ] = jQuery.extend( deep, // Never move original objects, clone them src || ( copy.length != null ? [ ] : { } ) , copy ); @@ -923,7 +923,7 @@ jQuery.extend({ // IE completely kills leading whitespace when innerHTML is used if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) ) div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild ); - + elem = jQuery.makeArray( div.childNodes ); } @@ -944,7 +944,7 @@ jQuery.extend({ fragment.appendChild( ret[i] ); } } - + return scripts; } @@ -1322,16 +1322,16 @@ jQuery.extend({ }, queue: function( elem, type, data ) { if ( elem ){ - + type = (type || "fx") + "queue"; - + var q = jQuery.data( elem, type ); - + if ( !q || jQuery.isArray(data) ) q = jQuery.data( elem, type, jQuery.makeArray(data) ); else if( data ) q.push( data ); - + } return q; }, @@ -1339,10 +1339,10 @@ jQuery.extend({ dequeue: function( elem, type ){ var queue = jQuery.queue( elem, type ), fn = queue.shift(); - + if( !type || type === "fx" ) fn = queue[0]; - + if( fn !== undefined ) fn.call(elem); } @@ -1384,7 +1384,7 @@ jQuery.fn.extend({ return this.each(function(){ var queue = jQuery.queue( this, type, data ); - + if( type == "fx" && queue.length == 1 ) queue[0].call(this); }); @@ -1412,19 +1412,19 @@ var Sizzle = function(selector, context, results, seed) { if ( context.nodeType !== 1 && context.nodeType !== 9 ) return []; - + if ( !selector || typeof selector !== "string" ) { return results; } var parts = [], m, set, checkSet, check, mode, extra, prune = true; - + // Reset the position of the chunker regexp (start from head) chunker.lastIndex = 0; - + while ( (m = chunker.exec(selector)) !== null ) { parts.push( m[1] ); - + if ( m[2] ) { extra = RegExp.rightContext; break; @@ -1525,7 +1525,7 @@ Sizzle.find = function(expr, context, isXML){ for ( var i = 0, l = Expr.order.length; i < l; i++ ) { var type = Expr.order[i], match; - + if ( (match = Expr.match[ type ].exec( expr )) ) { var left = RegExp.leftContext; @@ -1770,7 +1770,7 @@ var Expr = Sizzle.selectors = { }, ATTR: function(match){ var name = match[1].replace(/\\/g, ""); - + if ( Expr.attrMap[name] ) { match[1] = Expr.attrMap[name]; } @@ -1796,7 +1796,7 @@ var Expr = Sizzle.selectors = { } else if ( Expr.match.POS.test( match[0] ) ) { return true; } - + return match; }, POS: function(match){ @@ -1894,7 +1894,7 @@ var Expr = Sizzle.selectors = { var type = match[1], parent = elem.parentNode; var doneName = match[0]; - + if ( parent && (!parent[ doneName ] || !elem.nodeIndex) ) { var count = 1; @@ -2004,7 +2004,7 @@ var makeArray = function(array, results) { results.push.apply( results, array ); return results; } - + return array; }; @@ -2115,7 +2115,7 @@ if ( document.querySelectorAll ) (function(){ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { return; } - + Sizzle = function(query, context, extra, seed){ context = context || document; @@ -2126,7 +2126,7 @@ if ( document.querySelectorAll ) (function(){ return makeArray( context.querySelectorAll(query), extra ); } catch(e){} } - + return oldSizzle(query, context, extra, seed); }; @@ -2368,7 +2368,7 @@ jQuery.event = { // Get the current list of functions bound to this event var handlers = events[type]; - + if ( jQuery.event.specialAll[type] ) jQuery.event.specialAll[type].setup.call(elem, data, namespaces); @@ -2441,7 +2441,7 @@ jQuery.event = { // Handle the removal of namespaced events if ( namespace.test(events[type][handle].type) ) delete events[type][handle]; - + if ( jQuery.event.specialAll[type] ) jQuery.event.specialAll[type].teardown.call(elem, namespaces); @@ -2508,11 +2508,11 @@ jQuery.event = { // don't do events on text and comment nodes if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 ) return undefined; - + // Clean up in case it is reused event.result = undefined; event.target = elem; - + // Clone the incoming data, if any data = jQuery.makeArray(data); data.unshift( event ); @@ -2559,7 +2559,7 @@ jQuery.event = { // Cache this now, all = true means, any handler all = !namespaces.length && !event.exclusive; - + var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)"); handlers = ( jQuery.data(this, "events") || {} )[event.type]; @@ -2657,7 +2657,7 @@ jQuery.event = { teardown: function() {} } }, - + specialAll: { live: { setup: function( selector, namespaces ){ @@ -2666,12 +2666,12 @@ jQuery.event = { teardown: function( namespaces ){ if ( namespaces.length ) { var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)"); - + jQuery.each( (jQuery.data(this, "events").live || {}), function(){ if ( name.test(this.type) ) remove++; }); - + if ( remove < 1 ) jQuery.event.remove( this, namespaces[0], liveHandler ); } @@ -2684,7 +2684,7 @@ jQuery.Event = function( src ){ // Allow instantiation without the 'new' keyword if( !this.preventDefault ) return new jQuery.Event(src); - + // Event object if( src && src.type ){ this.originalEvent = src; @@ -2696,7 +2696,7 @@ jQuery.Event = function( src ){ // timeStamp is buggy for some events on Firefox(#3843) // So we won't rely on the native value this.timeStamp = now(); - + // Mark it as fixed this[expando] = true; }; @@ -2752,7 +2752,7 @@ var withinElement = function(event) { while ( parent && parent != this ) try { parent = parent.parentNode; } catch(e) { parent = this; } - + if( parent != this ){ // set the correct event type event.type = event.data; @@ -2760,9 +2760,9 @@ var withinElement = function(event) { jQuery.event.handle.apply( this, arguments ); } }; - -jQuery.each({ - mouseover: 'mouseenter', + +jQuery.each({ + mouseover: 'mouseenter', mouseout: 'mouseleave' }, function( orig, fix ){ jQuery.event.special[ fix ] = { @@ -2772,7 +2772,7 @@ jQuery.each({ teardown: function(){ jQuery.event.remove( this, orig, withinElement ); } - }; + }; }); jQuery.fn.extend({ @@ -2811,7 +2811,7 @@ jQuery.fn.extend({ event.stopPropagation(); jQuery.event.trigger( event, data, this[0] ); return event.result; - } + } }, toggle: function( fn ) { @@ -2854,7 +2854,7 @@ jQuery.fn.extend({ return this; }, - + live: function( type, fn ){ var proxy = jQuery.event.proxy( fn ); proxy.guid += this.selector + type; @@ -2863,7 +2863,7 @@ jQuery.fn.extend({ return this; }, - + die: function( type, fn ){ jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null ); return this; @@ -2983,12 +2983,12 @@ jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," + // Prevent memory leaks in IE // And prevent errors on refresh with events like mouseover in other browsers // Window isn't included so as not to unbind existing unload events -jQuery( window ).bind( 'unload', function(){ +jQuery( window ).bind( 'unload', function(){ for ( var id in jQuery.cache ) // Skip the window if ( id != 1 && jQuery.cache[ id ].handle ) jQuery.event.remove( jQuery.cache[ id ].handle.elem ); -}); +}); (function(){ jQuery.support = {}; @@ -3012,32 +3012,32 @@ jQuery( window ).bind( 'unload', function(){ jQuery.support = { // IE strips leading whitespace when .innerHTML is used leadingWhitespace: div.firstChild.nodeType == 3, - + // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: !div.getElementsByTagName("tbody").length, - + // Make sure that you can get all elements in an element // IE 7 always returns no results objectAll: !!div.getElementsByTagName("object")[0] .getElementsByTagName("*").length, - + // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE htmlSerialize: !!div.getElementsByTagName("link").length, - + // Get the style information from getAttribute // (IE uses .cssText insted) style: /red/.test( a.getAttribute("style") ), - + // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: a.getAttribute("href") === "/a", - + // Make sure that element opacity exists // (IE uses filter instead) opacity: a.style.opacity === "0.5", - + // Verify style float existence // (IE uses styleFloat instead of cssFloat) cssFloat: !!a.style.cssFloat, @@ -3047,14 +3047,14 @@ jQuery( window ).bind( 'unload', function(){ noCloneEvent: true, boxModel: null }; - + script.type = "text/javascript"; try { script.appendChild( document.createTextNode( "window." + id + "=1;" ) ); } catch(e){} root.insertBefore( script, root.firstChild ); - + // Make sure that the execution of code works by injecting a script // tag with appendChild/createTextNode // (IE doesn't support this, fails, and uses .text instead) @@ -3199,7 +3199,7 @@ jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".sp var jsc = now(); jQuery.extend({ - + get: function( url, data, callback, type ) { // shift arguments if data argument was ommited if ( jQuery.isFunction( data ) ) { @@ -3585,7 +3585,7 @@ jQuery.extend({ if ( xml && data.documentElement.tagName == "parsererror" ) throw "parsererror"; - + // Allow a pre-filtering function to sanitize the response // s != null is checked to keep backwards compatibility if( s && s.dataFilter ) @@ -3602,7 +3602,7 @@ jQuery.extend({ if ( type == "json" ) data = window["eval"]("(" + data + ")"); } - + return data; }, @@ -3666,30 +3666,30 @@ jQuery.fn.extend({ } else { for ( var i = 0, l = this.length; i < l; i++ ){ var old = jQuery.data(this[i], "olddisplay"); - + this[i].style.display = old || ""; - + if ( jQuery.css(this[i], "display") === "none" ) { var tagName = this[i].tagName, display; - + if ( elemdisplay[ tagName ] ) { display = elemdisplay[ tagName ]; } else { var elem = jQuery("<" + tagName + " />").appendTo("body"); - + display = elem.css("display"); if ( display === "none" ) display = "block"; - + elem.remove(); - + elemdisplay[ tagName ] = display; } - + this[i].style.display = jQuery.data(this[i], "olddisplay", display); } } - + return this; } }, @@ -3732,11 +3732,11 @@ jQuery.fn.extend({ var optall = jQuery.speed(speed, easing, callback); return this[ optall.queue === false ? "each" : "queue" ](function(){ - + var opt = jQuery.extend({}, optall), p, hidden = this.nodeType == 1 && jQuery(this).is(":hidden"), self = this; - + for ( p in prop ) { if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) return opt.complete.call(this); @@ -3990,7 +3990,7 @@ jQuery.fx.prototype = { if ( this.options.hide || this.options.show ) for ( var p in this.options.curAnim ) jQuery.attr(this.elem.style, p, this.options.orig[p]); - + // Execute the complete function this.options.complete.call( this.elem ); } @@ -4044,7 +4044,7 @@ if ( document.documentElement["getBoundingClientRect"] ) left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft; return { top: top, left: left }; }; -else +else jQuery.fn.offset = function() { if ( !this[0] ) return { top: 0, left: 0 }; if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] ); @@ -4134,7 +4134,7 @@ jQuery.fn.extend({ parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset(); // Subtract element margins - // note: when an element has margin: auto the offsetLeft and marginLeft + // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= num( this, 'marginTop' ); offset.left -= num( this, 'marginLeft' ); @@ -4165,7 +4165,7 @@ jQuery.fn.extend({ // Create scrollLeft and scrollTop methods jQuery.each( ['Left', 'Top'], function(i, name) { var method = 'scroll' + name; - + jQuery.fn[ method ] = function(val) { if (!this[0]) return null; @@ -4210,7 +4210,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){ (margin ? num(this, "margin" + tl) + num(this, "margin" + br) : 0); }; - + var type = name.toLowerCase(); jQuery.fn[ type ] = function( size ) { -- cgit v1.2.3