You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ns...@apache.org on 2009/07/06 02:33:54 UTC

svn commit: r791350 [1/5] - in /couchdb/trunk: etc/couchdb/ share/server/ share/www/ share/www/dialog/ share/www/script/ share/www/script/test/ share/www/style/ src/couchdb/ src/ibrowse/ src/mochiweb/ test/ test/etap/

Author: nslater
Date: Mon Jul  6 00:33:50 2009
New Revision: 791350

URL: http://svn.apache.org/viewvc?rev=791350&view=rev
Log:
trimmed trailing whitespace

Modified:
    couchdb/trunk/etc/couchdb/default.ini.tpl.in
    couchdb/trunk/etc/couchdb/local.ini
    couchdb/trunk/share/server/render.js
    couchdb/trunk/share/server/util.js
    couchdb/trunk/share/server/views.js
    couchdb/trunk/share/www/couch_tests.html
    couchdb/trunk/share/www/dialog/_compact_database.html
    couchdb/trunk/share/www/script/couch.js
    couchdb/trunk/share/www/script/couch_test_runner.js
    couchdb/trunk/share/www/script/futon.browse.js
    couchdb/trunk/share/www/script/jquery.couch.js
    couchdb/trunk/share/www/script/jquery.form.js
    couchdb/trunk/share/www/script/jquery.js
    couchdb/trunk/share/www/script/test/all_docs.js
    couchdb/trunk/share/www/script/test/attachment_names.js
    couchdb/trunk/share/www/script/test/attachment_paths.js
    couchdb/trunk/share/www/script/test/attachment_views.js
    couchdb/trunk/share/www/script/test/attachments.js
    couchdb/trunk/share/www/script/test/basics.js
    couchdb/trunk/share/www/script/test/batch_save.js
    couchdb/trunk/share/www/script/test/bulk_docs.js
    couchdb/trunk/share/www/script/test/changes.js
    couchdb/trunk/share/www/script/test/compact.js
    couchdb/trunk/share/www/script/test/conflicts.js
    couchdb/trunk/share/www/script/test/delayed_commits.js
    couchdb/trunk/share/www/script/test/design_docs.js
    couchdb/trunk/share/www/script/test/design_options.js
    couchdb/trunk/share/www/script/test/design_paths.js
    couchdb/trunk/share/www/script/test/etags_views.js
    couchdb/trunk/share/www/script/test/invalid_docids.js
    couchdb/trunk/share/www/script/test/list_views.js
    couchdb/trunk/share/www/script/test/purge.js
    couchdb/trunk/share/www/script/test/reduce.js
    couchdb/trunk/share/www/script/test/reduce_builtin.js
    couchdb/trunk/share/www/script/test/reduce_false.js
    couchdb/trunk/share/www/script/test/replication.js
    couchdb/trunk/share/www/script/test/rev_stemming.js
    couchdb/trunk/share/www/script/test/security_validation.js
    couchdb/trunk/share/www/script/test/show_documents.js
    couchdb/trunk/share/www/script/test/stats.js
    couchdb/trunk/share/www/script/test/uuids.js
    couchdb/trunk/share/www/script/test/view_collation.js
    couchdb/trunk/share/www/script/test/view_errors.js
    couchdb/trunk/share/www/script/test/view_multi_key_design.js
    couchdb/trunk/share/www/script/test/view_multi_key_temp.js
    couchdb/trunk/share/www/script/test/view_offsets.js
    couchdb/trunk/share/www/script/test/view_pagination.js
    couchdb/trunk/share/www/style/layout.css
    couchdb/trunk/src/couchdb/couch_batch_save.erl
    couchdb/trunk/src/couchdb/couch_batch_save_sup.erl
    couchdb/trunk/src/couchdb/couch_btree.erl
    couchdb/trunk/src/couchdb/couch_config.erl
    couchdb/trunk/src/couchdb/couch_config_writer.erl
    couchdb/trunk/src/couchdb/couch_db.erl
    couchdb/trunk/src/couchdb/couch_db.hrl
    couchdb/trunk/src/couchdb/couch_db_update_notifier_sup.erl
    couchdb/trunk/src/couchdb/couch_db_updater.erl
    couchdb/trunk/src/couchdb/couch_doc.erl
    couchdb/trunk/src/couchdb/couch_erl_driver.c
    couchdb/trunk/src/couchdb/couch_external_manager.erl
    couchdb/trunk/src/couchdb/couch_external_server.erl
    couchdb/trunk/src/couchdb/couch_file.erl
    couchdb/trunk/src/couchdb/couch_httpd.erl
    couchdb/trunk/src/couchdb/couch_httpd_db.erl
    couchdb/trunk/src/couchdb/couch_httpd_external.erl
    couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl
    couchdb/trunk/src/couchdb/couch_httpd_show.erl
    couchdb/trunk/src/couchdb/couch_httpd_view.erl
    couchdb/trunk/src/couchdb/couch_js.c
    couchdb/trunk/src/couchdb/couch_key_tree.erl
    couchdb/trunk/src/couchdb/couch_log.erl
    couchdb/trunk/src/couchdb/couch_query_servers.erl
    couchdb/trunk/src/couchdb/couch_ref_counter.erl
    couchdb/trunk/src/couchdb/couch_rep.erl
    couchdb/trunk/src/couchdb/couch_server.erl
    couchdb/trunk/src/couchdb/couch_server_sup.erl
    couchdb/trunk/src/couchdb/couch_stats_aggregator.erl
    couchdb/trunk/src/couchdb/couch_stats_collector.erl
    couchdb/trunk/src/couchdb/couch_stream.erl
    couchdb/trunk/src/couchdb/couch_task_status.erl
    couchdb/trunk/src/couchdb/couch_util.erl
    couchdb/trunk/src/couchdb/couch_view.erl
    couchdb/trunk/src/couchdb/couch_view_compactor.erl
    couchdb/trunk/src/couchdb/couch_view_group.erl
    couchdb/trunk/src/couchdb/couch_view_updater.erl
    couchdb/trunk/src/couchdb/curlhelper.c
    couchdb/trunk/src/ibrowse/ibrowse.app
    couchdb/trunk/src/ibrowse/ibrowse.erl
    couchdb/trunk/src/ibrowse/ibrowse_app.erl
    couchdb/trunk/src/ibrowse/ibrowse_http_client.erl
    couchdb/trunk/src/ibrowse/ibrowse_lb.erl
    couchdb/trunk/src/ibrowse/ibrowse_lib.erl
    couchdb/trunk/src/ibrowse/ibrowse_sup.erl
    couchdb/trunk/src/ibrowse/ibrowse_test.erl
    couchdb/trunk/src/mochiweb/mochijson.erl
    couchdb/trunk/src/mochiweb/mochijson2.erl
    couchdb/trunk/src/mochiweb/mochinum.erl
    couchdb/trunk/src/mochiweb/mochiweb_charref.erl
    couchdb/trunk/src/mochiweb/mochiweb_cookies.erl
    couchdb/trunk/src/mochiweb/mochiweb_echo.erl
    couchdb/trunk/src/mochiweb/mochiweb_headers.erl
    couchdb/trunk/src/mochiweb/mochiweb_html.erl
    couchdb/trunk/src/mochiweb/mochiweb_request.erl
    couchdb/trunk/src/mochiweb/mochiweb_skel.erl
    couchdb/trunk/src/mochiweb/mochiweb_socket_server.erl
    couchdb/trunk/src/mochiweb/mochiweb_util.erl
    couchdb/trunk/test/couch_config_test.erl
    couchdb/trunk/test/couch_config_writer_test.erl
    couchdb/trunk/test/etap/010-file-basics.t
    couchdb/trunk/test/etap/011-file-headers.t
    couchdb/trunk/test/etap/020-btree-basics.t
    couchdb/trunk/test/etap/021-btree-reductions.t
    couchdb/trunk/test/etap/030-doc-from-json.t
    couchdb/trunk/test/etap/031-doc-to-json.t
    couchdb/trunk/test/etap/040-util.t
    couchdb/trunk/test/etap/050-stream.t
    couchdb/trunk/test/etap/060-kt-merging.t
    couchdb/trunk/test/etap/061-kt-missing-leaves.t
    couchdb/trunk/test/etap/062-kt-remove-leaves.t
    couchdb/trunk/test/etap/063-kt-get-leaves.t
    couchdb/trunk/test/etap/064-kt-counting.t
    couchdb/trunk/test/etap/070-couch-db.t
    couchdb/trunk/test/etap/080-config-get-set.t
    couchdb/trunk/test/etap/081-config-override.t
    couchdb/trunk/test/etap/082-config-register.t
    couchdb/trunk/test/etap/083-config-no-files.t
    couchdb/trunk/test/etap/090-task-status.t
    couchdb/trunk/test/etap/100-ref-counter.t
    couchdb/trunk/test/query_server_spec.rb
    couchdb/trunk/test/test.js

Modified: couchdb/trunk/etc/couchdb/default.ini.tpl.in
URL: http://svn.apache.org/viewvc/couchdb/trunk/etc/couchdb/default.ini.tpl.in?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/etc/couchdb/default.ini.tpl.in (original)
+++ couchdb/trunk/etc/couchdb/default.ini.tpl.in Mon Jul  6 00:33:50 2009
@@ -72,7 +72,7 @@
 _changes = {couch_httpd_db, handle_changes_req}
 
 ; The external module takes an optional argument allowing you to narrow it to a
-; single script. Otherwise the script name is inferred from the first path section 
+; single script. Otherwise the script name is inferred from the first path section
 ; after _external's own path.
 ; _mypath = {couch_httpd_external, handle_external_req, <<"mykey">>}
 ; _external = {couch_httpd_external, handle_external_req}

Modified: couchdb/trunk/etc/couchdb/local.ini
URL: http://svn.apache.org/viewvc/couchdb/trunk/etc/couchdb/local.ini?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/etc/couchdb/local.ini (original)
+++ couchdb/trunk/etc/couchdb/local.ini Mon Jul  6 00:33:50 2009
@@ -19,9 +19,9 @@
 
 ; To create an admin account uncomment the '[admins]' section below and add a
 ; line in the format 'username = password'. When you next start CouchDB, it
-; will change the password to a hash (so that your passwords don't linger 
-; around in plain-text files). You can add more admin accounts with more 
-; 'username = password' lines. Don't forget to restart CouchDB after 
+; will change the password to a hash (so that your passwords don't linger
+; around in plain-text files). You can add more admin accounts with more
+; 'username = password' lines. Don't forget to restart CouchDB after
 ; changing this.
 ;[admins]
 ;admin = mysecretpassword

Modified: couchdb/trunk/share/server/render.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/render.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/server/render.js (original)
+++ couchdb/trunk/share/server/render.js Mon Jul  6 00:33:50 2009
@@ -121,7 +121,7 @@
     var provides = [];
     for (key in responders) {
       if (mimesByKey[key]) {
-        provides = provides.concat(mimesByKey[key]);        
+        provides = provides.concat(mimesByKey[key]);
       }
     }
     var bestMime = Mimeparse.bestMatch(provides, accept);
@@ -130,7 +130,7 @@
     bestKey = req.query.format;
   }
   var rFunc = responders[bestKey || responders.fallback || "html"];
-  if (rFunc) {    
+  if (rFunc) {
     if (isShow) {
       var resp = maybeWrapResponse(rFunc());
       resp["headers"] = resp["headers"] || {};
@@ -141,7 +141,7 @@
       respTail = rFunc();
     }
   } else {
-    throw({code:406, body:"Not Acceptable: "+accept});    
+    throw({code:406, body:"Not Acceptable: "+accept});
   }
 };
 
@@ -198,7 +198,7 @@
   startResp = startResp || {};
   startResp["headers"] = startResp["headers"] || {};
   startResp["headers"]["Content-Type"] = startResp["headers"]["Content-Type"] || respCT;
-  
+
   respond(["start", chunks, startResp]);
   chunks = [];
   startResp = {};
@@ -221,7 +221,7 @@
     gotRow = true;
     sendStart();
   } else {
-    blowChunks()  
+    blowChunks()
   }
   var line = readline();
   var json = eval(line);
@@ -247,7 +247,7 @@
 var isShow = false;
 var Render = (function() {
   var row_info;
-  
+
   return {
     show : function(funSrc, doc, req) {
       isShow = true;
@@ -295,11 +295,11 @@
       getRow();
     }
     if (typeof resp != "undefined") {
-      chunks.push(resp);      
+      chunks.push(resp);
     } else if (respTail) {
-      chunks.push(respTail);      
+      chunks.push(respTail);
     }
-    blowChunks("end");      
+    blowChunks("end");
   } catch(e) {
     respondError(e, funSrc, htmlErrors);
   }

Modified: couchdb/trunk/share/server/util.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/util.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/server/util.js (original)
+++ couchdb/trunk/share/server/util.js Mon Jul  6 00:33:50 2009
@@ -94,7 +94,7 @@
 // prints the object as JSON, and rescues and logs any toJSON() related errors
 function respond(obj) {
   try {
-    print(toJSON(obj));  
+    print(toJSON(obj));
   } catch(e) {
     log("Error converting object to JSON: " + e.toString());
   }

Modified: couchdb/trunk/share/server/views.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/server/views.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/server/views.js (original)
+++ couchdb/trunk/share/server/views.js Mon Jul  6 00:33:50 2009
@@ -27,7 +27,7 @@
 }
 
 var Views = (function() {
-    
+
   function runReduce(reduceFuns, keys, values, rereduce) {
     for (var i in reduceFuns) {
       reduceFuns[i] = compileFunction(reduceFuns[i]);
@@ -51,7 +51,7 @@
     if (query_config && query_config.reduce_limit &&
           reduce_length > 200 && ((reduce_length * 2) > line.length)) {
       var reduce_preview = "Current output: '"+(reduce_line.substring(0,100) + "'... (first 100 of "+reduce_length+' bytes)');
-      
+
       throw {
         error:"reduce_overflow_error",
         reason: "Reduce output must shrink more rapidly: "+reduce_preview+""
@@ -60,7 +60,7 @@
       print("[true," + reduce_line + "]");
     }
   };
-  
+
   return {
     reduce : function(reduceFuns, kvs) {
       var keys = new Array(kvs.length);

Modified: couchdb/trunk/share/www/couch_tests.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/couch_tests.html?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/couch_tests.html [utf-8] (original)
+++ couchdb/trunk/share/www/couch_tests.html [utf-8] Mon Jul  6 00:33:50 2009
@@ -26,7 +26,7 @@
     <script src="script/futon.js?0.9.0"></script>
     <script src="script/couch_test_runner.js"></script>
     <script>
-      $(function() {        
+      $(function() {
         updateTestsListing();
         $("#toolbar button.run").click(runAllTests);
         $("#toolbar button.load").click(function() {

Modified: couchdb/trunk/share/www/dialog/_compact_database.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/dialog/_compact_database.html?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/dialog/_compact_database.html [utf-8] (original)
+++ couchdb/trunk/share/www/dialog/_compact_database.html [utf-8] Mon Jul  6 00:33:50 2009
@@ -17,7 +17,7 @@
   <fieldset>
     <p class="help">
       Compacting a database removes deleted documents and previous revisions.
-      It is an <strong>irreversible operation</strong> and my take 
+      It is an <strong>irreversible operation</strong> and my take
       a while to complete for large databases.
     </p>
   </fieldset>

Modified: couchdb/trunk/share/www/script/couch.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/couch.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/couch.js [utf-8] Mon Jul  6 00:33:50 2009
@@ -16,11 +16,11 @@
 function CouchDB(name, httpHeaders) {
   this.name = name;
   this.uri = "/" + encodeURIComponent(name) + "/";
-  
+
   // The XMLHttpRequest object from the most recent request. Callers can
   // use this to check result http status and headers.
   this.last_req = null;
-  
+
   this.request = function(method, uri, requestOptions) {
       requestOptions = requestOptions || {}
       requestOptions.headers = combine(requestOptions.headers, httpHeaders)
@@ -48,7 +48,7 @@
     if (doc._id == undefined)
       doc._id = CouchDB.newUuids(1)[0];
 
-    this.last_req = this.request("PUT", this.uri  + 
+    this.last_req = this.request("PUT", this.uri  +
         encodeURIComponent(doc._id) + encodeOptions(options),
         {body: JSON.stringify(doc)});
     CouchDB.maybeThrowError(this.last_req);
@@ -84,7 +84,7 @@
     doc._rev = result.rev; //record rev in input document
     return result;
   }
-  
+
   this.bulkSave = function(docs, options) {
     // first prepoulate the UUIDs for new documents
     var newCount = 0
@@ -119,7 +119,7 @@
       return results;
     }
   }
-  
+
   this.ensureFullCommit = function() {
     this.last_req = this.request("POST", this.uri + "_ensure_full_commit");
     CouchDB.maybeThrowError(this.last_req);
@@ -130,7 +130,7 @@
   this.query = function(mapFun, reduceFun, options, keys) {
     var body = {language: "javascript"};
     if(keys) {
-      body.keys = keys ;      
+      body.keys = keys ;
     }
     if (typeof(mapFun) != "string")
       mapFun = mapFun.toSource ? mapFun.toSource() : "(" + mapFun.toString() + ")";
@@ -154,15 +154,15 @@
 
   this.view = function(viewname, options, keys) {
     var viewParts = viewname.split('/');
-    var viewPath = this.uri + "_design/" + viewParts[0] + "/_view/" 
+    var viewPath = this.uri + "_design/" + viewParts[0] + "/_view/"
         + viewParts[1] + encodeOptions(options);
     if(!keys) {
-      this.last_req = this.request("GET", viewPath);      
+      this.last_req = this.request("GET", viewPath);
     } else {
       this.last_req = this.request("POST", viewPath, {
         headers: {"Content-Type": "application/json"},
         body: JSON.stringify({keys:keys})
-      });      
+      });
     }
     if (this.last_req.status == 404)
       return null;
@@ -183,7 +183,7 @@
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
   }
-  
+
   this.viewCleanup = function() {
     this.last_req = this.request("POST", this.uri + "_view_cleanup");
     CouchDB.maybeThrowError(this.last_req);
@@ -192,17 +192,17 @@
 
   this.allDocs = function(options,keys) {
     if(!keys) {
-      this.last_req = this.request("GET", this.uri + "_all_docs" + encodeOptions(options));      
+      this.last_req = this.request("GET", this.uri + "_all_docs" + encodeOptions(options));
     } else {
       this.last_req = this.request("POST", this.uri + "_all_docs" + encodeOptions(options), {
         headers: {"Content-Type": "application/json"},
         body: JSON.stringify({keys:keys})
-      });      
+      });
     }
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
   }
-  
+
   this.designDocs = function() {
     return this.allDocs({startkey:"_design", endkey:"_design0"});
   };
@@ -210,12 +210,12 @@
   this.allDocsBySeq = function(options,keys) {
     var req = null;
     if(!keys) {
-      req = this.request("GET", this.uri + "_all_docs_by_seq" + encodeOptions(options));      
+      req = this.request("GET", this.uri + "_all_docs_by_seq" + encodeOptions(options));
     } else {
       req = this.request("POST", this.uri + "_all_docs_by_seq" + encodeOptions(options), {
         headers: {"Content-Type": "application/json"},
         body: JSON.stringify({keys:keys})
-      });      
+      });
     }
     CouchDB.maybeThrowError(req);
     return JSON.parse(req.responseText);
@@ -226,7 +226,7 @@
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
   }
-  
+
   this.setDbProperty = function(propId, propValue) {
     this.last_req = this.request("PUT", this.uri + propId,{
       body:JSON.stringify(propValue)
@@ -234,13 +234,13 @@
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
   }
-  
+
   this.getDbProperty = function(propId) {
     this.last_req = this.request("GET", this.uri + propId);
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
   }
-  
+
   this.setAdmins = function(adminsArray) {
     this.last_req = this.request("PUT", this.uri + "_admins",{
       body:JSON.stringify(adminsArray)
@@ -248,13 +248,13 @@
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
   }
-  
+
   this.getAdmins = function() {
     this.last_req = this.request("GET", this.uri + "_admins");
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
   }
-  
+
   // Convert a options object to an url query string.
   // ex: {key:'value',key2:'value2'} becomes '?key="value"&key2="value2"'
   function encodeOptions(options) {
@@ -278,26 +278,26 @@
   function toJSON(obj) {
     return obj !== null ? JSON.stringify(obj) : null;
   }
-  
+
   function combine(object1, object2) {
     if (!object2)
       return object1;
     if (!object1)
       return object2;
-      
+
     for (var name in object2)
       object1[name] = object2[name];
-      
+
     return object1;
   }
-  
-  
+
+
 }
 
 // this is the XMLHttpRequest object from last request made by the following
 // CouchDB.* functions (except for calls to request itself).
 // Use this from callers to check HTTP status or header values of requests.
-CouchDB.last_req = null; 
+CouchDB.last_req = null;
 
 
 CouchDB.allDbs = function() {

Modified: couchdb/trunk/share/www/script/couch_test_runner.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/couch_test_runner.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/couch_test_runner.js (original)
+++ couchdb/trunk/share/www/script/couch_test_runner.js Mon Jul  6 00:33:50 2009
@@ -12,7 +12,7 @@
 
 // *********************** Test Framework of Sorts ************************* //
 
-function loadScript(url) {  
+function loadScript(url) {
   if (typeof document != "undefined") document.write('<script src="'+url+'"></script>');
 };
 

Modified: couchdb/trunk/share/www/script/futon.browse.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/futon.browse.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/futon.browse.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/futon.browse.js [utf-8] Mon Jul  6 00:33:50 2009
@@ -49,7 +49,7 @@
             var dbsOnPage = dbs.slice(offset, offset + maxPerPage);
 
             $.each(dbsOnPage, function(idx, dbName) {
-              $("#databases tbody.content").append("<tr>" + 
+              $("#databases tbody.content").append("<tr>" +
                 "<th><a href='database.html?" + encodeURIComponent(dbName) + "'>" +
                   dbName + "</a></th>" +
                 "<td class='size'></td><td class='count'></td>" +
@@ -504,7 +504,7 @@
             resp.rows = resp.rows.reverse();
           }
           var has_reduce_prev = resp.total_rows === undefined && (descending_reverse ? resp.rows.length > per_page : options.startkey !== undefined);
-          if (resp.rows !== null && (has_reduce_prev || (descending_reverse ? 
+          if (resp.rows !== null && (has_reduce_prev || (descending_reverse ?
             (resp.total_rows - resp.offset > per_page) :
             (resp.offset > 0)))) {
             $("#paging a.prev").attr("href", "#" + (resp.offset - per_page)).click(function() {
@@ -527,8 +527,8 @@
             $("#paging a.prev").removeAttr("href");
           }
           var has_reduce_next = resp.total_rows === undefined && (descending_reverse ? options.startkey !== undefined : resp.rows.length > per_page);
-          if (resp.rows !== null && (has_reduce_next || (descending_reverse ? 
-            (resp.offset - resp.total_rows < per_page) : 
+          if (resp.rows !== null && (has_reduce_next || (descending_reverse ?
+            (resp.offset - resp.total_rows < per_page) :
             (resp.total_rows - resp.offset > per_page)))) {
             $("#paging a.next").attr("href", "#" + (resp.offset + per_page)).click(function() {
               var opt = {
@@ -967,16 +967,16 @@
       }
 
       function _renderAttachmentItem(name, attachment) {
-        var attachmentHref = db.uri + encodeDocId(docId) 
+        var attachmentHref = db.uri + encodeDocId(docId)
           + "/" + encodeAttachment(name);
         var li = $("<li></li>");
         $("<a href='' title='Download file' target='_top'></a>").text(name)
           .attr("href", attachmentHref)
           .wrapInner("<tt></tt>").appendTo(li);
-        $("<span>()</span>").text("" + $.futon.formatSize(attachment.length) + 
+        $("<span>()</span>").text("" + $.futon.formatSize(attachment.length) +
           ", " + attachment.content_type).addClass("info").appendTo(li);
         if (name == "tests.js") {
-          li.find('span.info').append(', <a href="/_utils/couch_tests.html?' 
+          li.find('span.info').append(', <a href="/_utils/couch_tests.html?'
             + attachmentHref + '">open in test runner</a>');
         }
         _initAttachmentItem(name, attachment, li);

Modified: couchdb/trunk/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.couch.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.couch.js [utf-8] Mon Jul  6 00:33:50 2009
@@ -92,7 +92,7 @@
           $.ajax({
             type: "POST", url: this.uri + "_compact",
             contentType: "application/json",
-            dataType: "json", data: "", processData: false, 
+            dataType: "json", data: "", processData: false,
             complete: function(req) {
               var resp = $.httpData(req, "json");
               if (req.status == 202) {
@@ -200,7 +200,7 @@
                   });
                 });
               }
-            });            
+            });
           } else {
             alert("please provide an eachApp function for allApps()");
           }

Modified: couchdb/trunk/share/www/script/jquery.form.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.form.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.form.js (original)
+++ couchdb/trunk/share/www/script/jquery.form.js Mon Jul  6 00:33:50 2009
@@ -13,7 +13,7 @@
 ;(function($) {
 
 /*
-    Usage Note:  
+    Usage Note:
     -----------
     Do not use both ajaxSubmit and ajaxForm on the same form.  These
     functions are intended to be exclusive.  Use ajaxSubmit if you want
@@ -36,13 +36,13 @@
             target: '#output'
         });
     });
-        
+
     When using ajaxForm, the ajaxSubmit function will be invoked for you
-    at the appropriate time.  
+    at the appropriate time.
 */
 
 /**
- * ajaxSubmit() provides a mechanism for immediately submitting 
+ * ajaxSubmit() provides a mechanism for immediately submitting
  * an HTML form using AJAX.
  */
 $.fn.ajaxSubmit = function(options) {
@@ -73,8 +73,8 @@
     if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
         log('ajaxSubmit: submit aborted via beforeSerialize callback');
         return this;
-    }    
-   
+    }
+
     var a = this.formToArray(options.semantic);
     if (options.data) {
         options.extraData = options.data;
@@ -82,7 +82,7 @@
           if(options.data[n] instanceof Array) {
             for (var k in options.data[n])
               a.push( { name: n, value: options.data[n][k] } )
-          }  
+          }
           else
              a.push( { name: n, value: options.data[n] } );
         }
@@ -92,14 +92,14 @@
     if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
         log('ajaxSubmit: submit aborted via beforeSubmit callback');
         return this;
-    }    
+    }
 
     // fire vetoable 'validate' event
     this.trigger('form-submit-validate', [a, this, options, veto]);
     if (veto.veto) {
         log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
         return this;
-    }    
+    }
 
     var q = $.param(a);
 
@@ -137,7 +137,7 @@
             found = true;
 
     // options.iframe allows user to force iframe mode
-   if (options.iframe || found) { 
+   if (options.iframe || found) {
        // hack to fix Safari hang (thanks to Tim Molendijk for this)
        // see:  http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
        if ($.browser.safari && options.closeKeepAlive)
@@ -156,12 +156,12 @@
     // private function for handling file uploads (hat tip to YAHOO!)
     function fileUpload() {
         var form = $form[0];
-        
+
         if ($(':input[name=submit]', form).length) {
             alert('Error: Form elements must not be named "submit".');
             return;
         }
-        
+
         var opts = $.extend({}, $.ajaxSettings, options);
 		var s = jQuery.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts);
 
@@ -169,7 +169,7 @@
         var $io = $('<iframe id="' + id + '" name="' + id + '" />');
         var io = $io[0];
 
-        if ($.browser.msie || $.browser.opera) 
+        if ($.browser.msie || $.browser.opera)
             io.src = 'javascript:false;document.write("");';
         $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
 
@@ -182,8 +182,8 @@
             getAllResponseHeaders: function() {},
             getResponseHeader: function() {},
             setRequestHeader: function() {},
-            abort: function() { 
-                this.aborted = 1; 
+            abort: function() {
+                this.aborted = 1;
                 $io.attr('src','about:blank'); // abort op in progress
             }
         };
@@ -199,7 +199,7 @@
         }
         if (xhr.aborted)
             return;
-        
+
         var cbInvoked = 0;
         var timedOut = 0;
 
@@ -226,7 +226,7 @@
                 method:   'POST',
                 action:   opts.url
             });
-            
+
             // ie borks in some cases when setting encoding
             if (! options.skipEncodingOverride) {
                 $form.attr({
@@ -247,7 +247,7 @@
                         extraInputs.push(
                             $('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
                                 .appendTo(form)[0]);
-            
+
                 // add iframe to doc and submit the form
                 $io.appendTo('body');
                 io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
@@ -263,7 +263,7 @@
 
         function cb() {
             if (cbInvoked++) return;
-            
+
             io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
 
             var operaHack = 0;
@@ -274,7 +274,7 @@
                 var data, doc;
 
                 doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
-                
+
                 if (doc.body == null && !operaHack && $.browser.opera) {
                     // In Opera 9.2.x the iframe DOM is not always traversable when
                     // the onload callback fires so we give Opera 100ms to right itself
@@ -283,7 +283,7 @@
                     setTimeout(cb, 100);
                     return;
                 }
-                
+
                 xhr.responseText = doc.body ? doc.body.innerHTML : null;
                 xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
                 xhr.getResponseHeader = function(header){
@@ -348,7 +348,7 @@
  * The options argument for ajaxForm works exactly as it does for ajaxSubmit.  ajaxForm merely
  * passes the options argument along after properly binding events for submit elements and
  * the form itself.
- */ 
+ */
 $.fn.ajaxForm = function(options) {
     return this.ajaxFormUnbind().bind('submit.form-plugin',function() {
         $(this).ajaxSubmit(options);
@@ -594,10 +594,10 @@
 /**
  * Enables or disables any matching elements.
  */
-$.fn.enable = function(b) { 
+$.fn.enable = function(b) {
     if (b == undefined) b = true;
-    return this.each(function() { 
-        this.disabled = !b 
+    return this.each(function() {
+        this.disabled = !b
     });
 };
 
@@ -607,7 +607,7 @@
  */
 $.fn.selected = function(select) {
     if (select == undefined) select = true;
-    return this.each(function() { 
+    return this.each(function() {
         var t = this.type;
         if (t == 'checkbox' || t == 'radio')
             this.checked = select;

Modified: couchdb/trunk/share/www/script/jquery.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.js [utf-8] Mon Jul  6 00:33:50 2009
@@ -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 @@
 	},
 
 	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 @@
 						}
 					}
 
-					return values;				
+					return values;
 				}
 
 				// Everything else, we just grab the value
@@ -513,13 +513,13 @@
 			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 @@
 
 				// 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 @@
 				// 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 @@
 					fragment.appendChild( ret[i] );
 				}
 			}
-			
+
 			return scripts;
 		}
 
@@ -1322,16 +1322,16 @@
 	},
 	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 @@
 	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 @@
 
 		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 @@
 
 	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 @@
 
 	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 @@
 		},
 		ATTR: function(match){
 			var name = match[1].replace(/\\/g, "");
-			
+
 			if ( Expr.attrMap[name] ) {
 				match[1] = Expr.attrMap[name];
 			}
@@ -1796,7 +1796,7 @@
 			} else if ( Expr.match.POS.test( match[0] ) ) {
 				return true;
 			}
-			
+
 			return match;
 		},
 		POS: function(match){
@@ -1894,7 +1894,7 @@
 			var type = match[1], parent = elem.parentNode;
 
 			var doneName = match[0];
-			
+
 			if ( parent && (!parent[ doneName ] || !elem.nodeIndex) ) {
 				var count = 1;
 
@@ -2004,7 +2004,7 @@
 		results.push.apply( results, array );
 		return results;
 	}
-	
+
 	return array;
 };
 
@@ -2115,7 +2115,7 @@
 	if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
 		return;
 	}
-	
+
 	Sizzle = function(query, context, extra, seed){
 		context = context || document;
 
@@ -2126,7 +2126,7 @@
 				return makeArray( context.querySelectorAll(query), extra );
 			} catch(e){}
 		}
-		
+
 		return oldSizzle(query, context, extra, seed);
 	};
 
@@ -2368,7 +2368,7 @@
 
 			// 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 @@
 								// 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 @@
 			// 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 @@
 
 		// 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 @@
 			teardown: function() {}
 		}
 	},
-	
+
 	specialAll: {
 		live: {
 			setup: function( selector, namespaces ){
@@ -2666,12 +2666,12 @@
 			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 @@
 	// 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 @@
 	// 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 @@
 	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 @@
 		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 @@
 		teardown: function(){
 			jQuery.event.remove( this, orig, withinElement );
 		}
-	};			   
+	};
 });
 
 jQuery.fn.extend({
@@ -2811,7 +2811,7 @@
 			event.stopPropagation();
 			jQuery.event.trigger( event, data, this[0] );
 			return event.result;
-		}		
+		}
 	},
 
 	toggle: function( fn ) {
@@ -2854,7 +2854,7 @@
 
 		return this;
 	},
-	
+
 	live: function( type, fn ){
 		var proxy = jQuery.event.proxy( fn );
 		proxy.guid += this.selector + type;
@@ -2863,7 +2863,7 @@
 
 		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 @@
 // 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.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 <object> 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 @@
 		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 @@
 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 @@
 
 		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 @@
 			if ( type == "json" )
 				data = window["eval"]("(" + data + ")");
 		}
-		
+
 		return data;
 	},
 
@@ -3666,30 +3666,30 @@
 		} 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 @@
 		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 @@
 				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 @@
 			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 @@
 			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 @@
 // 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 @@
 			(margin ?
 				num(this, "margin" + tl) + num(this, "margin" + br) : 0);
 	};
-	
+
 	var type = name.toLowerCase();
 
 	jQuery.fn[ type ] = function( size ) {

Modified: couchdb/trunk/share/www/script/test/all_docs.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/all_docs.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/all_docs.js (original)
+++ couchdb/trunk/share/www/script/test/all_docs.js Mon Jul  6 00:33:50 2009
@@ -15,7 +15,7 @@
   db.deleteDb();
   db.createDb();
   if (debug) debugger;
-  
+
   // Create some more documents.
   // Notice the use of the ok member on the return result.
   T(db.save({_id:"0",a:1,b:1}).ok);
@@ -32,7 +32,7 @@
   for(var i=0; i < rows.length; i++) {
     T(rows[i].id >= "0" && rows[i].id <= "4");
   }
-  
+
   // Check _all_docs with descending=true
   var desc = db.allDocs({descending:true});
   T(desc.total_rows == desc.rows.length);
@@ -40,7 +40,7 @@
   // Check _all_docs offset
   var all = db.allDocs({startkey:"2"});
   T(all.offset == 2);
-  
+
   // check that the docs show up in the seq view in the order they were created
   var all_seq = db.allDocsBySeq();
   var ids = ["0","3","1","2"];
@@ -48,7 +48,7 @@
     var row = all_seq.rows[i];
     T(row.id == ids[i]);
   };
-  
+
   // it should work in reverse as well
   all_seq = db.allDocsBySeq({descending:true});
   ids = ["2","1","3","0"];
@@ -56,13 +56,13 @@
     var row = all_seq.rows[i];
     T(row.id == ids[i]);
   };
-  
+
   // check that deletions also show up right
   var doc1 = db.open("1");
   var deleted = db.deleteDoc(doc1);
   T(deleted.ok);
   all_seq = db.allDocsBySeq();
-  
+
   // the deletion should make doc id 1 have the last seq num
   T(all_seq.rows.length == 4);
   T(all_seq.rows[3].id == "1");
@@ -70,13 +70,13 @@
 
   // is this a bug?
   // T(all_seq.rows.length == all_seq.total_rows);
-  
+
   // do an update
   var doc2 = db.open("3");
   doc2.updated = "totally";
   db.save(doc2);
   all_seq = db.allDocsBySeq();
-  
+
   // the update should make doc id 3 have the last seq num
   T(all_seq.rows.length == 4);
   T(all_seq.rows[3].id == "3");
@@ -90,7 +90,7 @@
   // and on the deleted one, no doc
   T(all_seq.rows[2].value.deleted);
   T(!all_seq.rows[2].doc);
-  
+
   // test the all docs collates sanely
   db.save({_id: "Z", foo: "Z"});
   db.save({_id: "a", foo: "a"});

Modified: couchdb/trunk/share/www/script/test/attachment_names.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/attachment_names.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/attachment_names.js (original)
+++ couchdb/trunk/share/www/script/test/attachment_names.js Mon Jul  6 00:33:50 2009
@@ -10,21 +10,21 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-couchTests.attachment_names = function(debug) { 
-  var db = new CouchDB("test_suite_db"); 
-  db.deleteDb(); 
-  db.createDb(); 
-  if (debug) debugger; 
-
-  var binAttDoc = { 
-    _id: "bin_doc", 
-    _attachments:{ 
-      "foo\x80txt": { 
-        content_type:"text/plain", 
-        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" 
-      } 
-    } 
-  } 
+couchTests.attachment_names = function(debug) {
+  var db = new CouchDB("test_suite_db");
+  db.deleteDb();
+  db.createDb();
+  if (debug) debugger;
+
+  var binAttDoc = {
+    _id: "bin_doc",
+    _attachments:{
+      "foo\x80txt": {
+        content_type:"text/plain",
+        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+      }
+    }
+  }
 
   // inline attachments
   try {
@@ -38,7 +38,7 @@
 
   // standalone docs
   var bin_data = "JHAPDO*AU£PN ){(3u[d 93DQ9¡€])}    ææøo'∂ƒæ≤çæππ•¥∫¶®#†π¶®¥π€ª®˙π8np";
-  
+
   var xhr = (CouchDB.request("PUT", "/test_suite_db/bin_doc3/attachment\x80txt", {
     headers:{"Content-Type":"text/plain;charset=utf-8"},
     body:bin_data
@@ -64,15 +64,15 @@
 
 
   // leading underscores
-  var binAttDoc = { 
-    _id: "bin_doc2", 
-    _attachments:{ 
-      "_foo.txt": { 
-        content_type:"text/plain", 
-        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ=" 
-      } 
-    } 
-  } 
+  var binAttDoc = {
+    _id: "bin_doc2",
+    _attachments:{
+      "_foo.txt": {
+        content_type:"text/plain",
+        data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
+      }
+    }
+  }
 
   try {
     db.save(binAttDoc);
@@ -80,8 +80,8 @@
   } catch (e) {
     TEquals("bad_request", e.error, "attachment_name: leading underscore");
     TEquals("Attachment name can't start with '_'", e.reason, "attachment_name: leading underscore");
-  }  
-  
+  }
+
   // todo: form uploads, waiting for cmlenz' test case for form uploads
 
 };

Modified: couchdb/trunk/share/www/script/test/attachment_paths.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/attachment_paths.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/attachment_paths.js (original)
+++ couchdb/trunk/share/www/script/test/attachment_paths.js Mon Jul  6 00:33:50 2009
@@ -44,14 +44,14 @@
     // lets try it with an escaped attachment id...
     // weird that it's at two urls
     var xhr = CouchDB.request("GET", "/"+dbName+"/bin_doc/foo%2Fbar.txt");
-    T(xhr.status == 200); 
+    T(xhr.status == 200);
     // xhr.responseText == "This is a base64 encoded text"
 
     var xhr = CouchDB.request("GET", "/"+dbName+"/bin_doc/foo/baz.txt");
     T(xhr.status == 404);
 
     var xhr = CouchDB.request("GET", "/"+dbName+"/bin_doc/foo%252Fbaz.txt");
-    T(xhr.status == 200); 
+    T(xhr.status == 200);
     T(xhr.responseText == "We like percent two F.");
 
     // require a _rev to PUT
@@ -59,7 +59,7 @@
       headers:{"Content-Type":"text/plain;charset=utf-8"},
       body:"Just some text"
     });
-    T(xhr.status == 409);    
+    T(xhr.status == 409);
 
     var xhr = CouchDB.request("PUT", "/"+dbName+"/bin_doc/foo/bar2.txt?rev=" + binAttDoc._rev, {
       body:"This is no base64 encoded text",
@@ -77,7 +77,7 @@
     T(binAttDoc._attachments["foo/bar2.txt"].length == 30);
 
     //// now repeat the while thing with a design doc
-  
+
     // first just save a regular doc with an attachment that has a slash in the url.
     // (also gonna run an encoding check case)
     var binAttDoc = {
@@ -120,7 +120,7 @@
     T(xhr.status == 404);
 
     var xhr = CouchDB.request("GET", "/"+dbName+"/_design%2Fbin_doc/foo%252Fbaz.txt");
-    T(xhr.status == 200); 
+    T(xhr.status == 200);
     T(xhr.responseText == "We like percent two F.");
 
     // require a _rev to PUT
@@ -128,7 +128,7 @@
       headers:{"Content-Type":"text/plain;charset=utf-8"},
       body:"Just some text"
     });
-    T(xhr.status == 409);    
+    T(xhr.status == 409);
 
     var xhr = CouchDB.request("PUT", "/"+dbName+"/_design%2Fbin_doc/foo/bar2.txt?rev=" + binAttDoc._rev, {
       body:"This is no base64 encoded text",

Modified: couchdb/trunk/share/www/script/test/attachment_views.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/attachment_views.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/attachment_views.js (original)
+++ couchdb/trunk/share/www/script/test/attachment_views.js Mon Jul  6 00:33:50 2009
@@ -73,7 +73,7 @@
   var reduceFunction = function(key, values) {
     return sum(values);
   }
-  
+
   var result = db.query(mapFunction, reduceFunction);
 
   T(result.rows.length == 1);

Modified: couchdb/trunk/share/www/script/test/attachments.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/attachments.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/attachments.js (original)
+++ couchdb/trunk/share/www/script/test/attachments.js Mon Jul  6 00:33:50 2009
@@ -33,7 +33,7 @@
   T(xhr.responseText == "This is a base64 encoded text");
   T(xhr.getResponseHeader("Content-Type") == "text/plain");
   T(xhr.getResponseHeader("Etag") == '"' + save_response.rev + '"');
-  
+
   // empty attachment
   var binAttDoc2 = {
     _id: "bin_doc2",
@@ -70,7 +70,7 @@
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc2/foo2.txt");
   T(xhr.responseText == "This is no base64 encoded text");
   T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
-  
+
   // test without rev, should fail
   var xhr = CouchDB.request("DELETE", "/test_suite_db/bin_doc2/foo2.txt");
   T(xhr.status == 409);
@@ -78,8 +78,8 @@
   // test with rev, should not fail
   var xhr = CouchDB.request("DELETE", "/test_suite_db/bin_doc2/foo2.txt?rev=" + rev);
   T(xhr.status == 200);
-  
-  
+
+
   // test binary data
   var bin_data = "JHAPDO*AU£PN ){(3u[d 93DQ9¡€])}    ææøo'∂ƒæ≤çæππ•¥∫¶®#†π¶®¥π€ª®˙π8np";
   var xhr = CouchDB.request("PUT", "/test_suite_db/bin_doc3/attachment.txt", {
@@ -88,11 +88,11 @@
   });
   T(xhr.status == 201);
   var rev = JSON.parse(xhr.responseText).rev;
-  
+
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt");
   T(xhr.responseText == bin_data);
   T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
-  
+
   var xhr = CouchDB.request("PUT", "/test_suite_db/bin_doc3/attachment.txt", {
     headers:{"Content-Type":"text/plain;charset=utf-8"},
     body:bin_data
@@ -116,7 +116,7 @@
 
   var xhr = CouchDB.request("DELETE", "/test_suite_db/bin_doc3/attachment.txt?rev=" + rev);
   T(xhr.status == 200);
-  
+
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt");
   T(xhr.status == 404);
 
@@ -137,7 +137,7 @@
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc4/attachment.txt");
   T(xhr.status == 200);
   T(xhr.responseText.length == 0);
-  
+
   // overwrite previsously empty attachment
   var xhr = CouchDB.request("PUT", "/test_suite_db/bin_doc4/attachment.txt?rev=" + rev, {
     headers:{"Content-Type":"text/plain;charset=utf-8"},
@@ -148,8 +148,8 @@
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc4/attachment.txt");
   T(xhr.status == 200);
   T(xhr.responseText == "This is a string");
-  
-  
+
+
   // Attachment sparseness COUCHDB-220
 
   var docs = []
@@ -167,7 +167,7 @@
   }
 
   db.bulkSave(docs);
-  
+
   var before = db.info().disk_size;
 
   // Compact it.
@@ -175,14 +175,14 @@
   T(db.last_req.status == 202);
   // compaction isn't instantaneous, loop until done
   while (db.info().compact_running) {};
-  
+
   var after = db.info().disk_size;
-  
+
   // Compaction should reduce the database slightly, but not
   // orders of magnitude (unless attachments introduce sparseness)
   T(after > before * 0.1, "before: " + before + " after: " + after);
-  
-  
+
+
   // test large attachments - COUCHDB-366
   var lorem = CouchDB.request("GET", "/_utils/script/test/lorem.txt").responseText;
 

Modified: couchdb/trunk/share/www/script/test/basics.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/basics.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/basics.js (original)
+++ couchdb/trunk/share/www/script/test/basics.js Mon Jul  6 00:33:50 2009
@@ -13,7 +13,7 @@
 // Do some basic tests.
 couchTests.basics = function(debug) {
     var result = JSON.parse(CouchDB.request("GET", "/").responseText);
-    T(result.couchdb == "Welcome"); 
+    T(result.couchdb == "Welcome");
 
     var db = new CouchDB("test_suite_db");
     db.deleteDb();
@@ -31,11 +31,11 @@
     // creating a new DB should return Location header
     xhr = CouchDB.request("DELETE", "/test_suite_db");
     xhr = CouchDB.request("PUT", "/test_suite_db");
-    TEquals("/test_suite_db", 
+    TEquals("/test_suite_db",
       xhr.getResponseHeader("Location").substr(-14),
       "should return Location header to newly created document");
 
-    TEquals("http://", 
+    TEquals("http://",
       xhr.getResponseHeader("Location").substr(0, 7),
       "should return absolute Location header to newly created document");
 
@@ -66,7 +66,7 @@
     // make sure you can do a seq=true option
     var doc = db.open(id, {local_seq:true});
     T(doc._local_seq == 1);
-    
+
 
     // Create some more documents.
     // Notice the use of the ok member on the return result.
@@ -161,11 +161,11 @@
     var xhr = CouchDB.request("PUT", "/test_suite_db/newdoc", {
       body: JSON.stringify({"a":1})
     });
-    TEquals("/test_suite_db/newdoc", 
+    TEquals("/test_suite_db/newdoc",
       xhr.getResponseHeader("Location").substr(-21),
       "should return Location header to newly created document");
 
-    TEquals("http://", 
+    TEquals("http://",
       xhr.getResponseHeader("Location").substr(0, 7),
       "should return absolute Location header to newly created document");
 
@@ -182,12 +182,12 @@
   ]
   var test_doc = function(info) {
     var data = JSON.stringify(info[1]);
-    
+
     xhr = CouchDB.request("PUT", "/test_suite_db/" + info[0], {body: data});
     T(xhr.status == 500);
     result = JSON.parse(xhr.responseText);
     T(result.error == "doc_validation");
-    
+
     xhr = CouchDB.request("POST", "/test_suite_db/", {body: data});
     T(xhr.status == 500);
     result = JSON.parse(xhr.responseText);

Modified: couchdb/trunk/share/www/script/test/batch_save.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/batch_save.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/batch_save.js (original)
+++ couchdb/trunk/share/www/script/test/batch_save.js Mon Jul  6 00:33:50 2009
@@ -19,32 +19,32 @@
 
   // commit should work fine with no batches
   T(db.ensureFullCommit().ok);
-  
+
   // PUT a doc with ?batch=ok
   T(db.save({_id:"0",a:1,b:1},  {batch : "ok"}).ok);
 
   // test that response is 200 Accepted
   T(db.last_req.status == 202);
   T(db.last_req.statusText == "Accepted");
-  
+
   T(db.allDocs().total_rows == 0);
 
   restartServer();
-  
+
   // lost the updates
   T(db.allDocs().total_rows == 0);
-  
+
   T(db.save({_id:"0",a:1,b:1},  {batch : "ok"}).ok);
   T(db.save({_id:"1",a:1,b:1},  {batch : "ok"}).ok);
   T(db.save({_id:"2",a:1,b:1},  {batch : "ok"}).ok);
 
   T(db.ensureFullCommit().ok);
   T(db.allDocs().total_rows == 3);
-  
+
   // repeat the tests for POST
   var resp = db.request("POST", db.uri + "?batch=ok", {body: JSON.stringify({a:1})});
   T(JSON.parse(resp.responseText).ok);
-  
+
   // test that response is 200 Accepted
   T(resp.status == 202);
   T(resp.statusText == "Accepted");
@@ -59,5 +59,5 @@
 
   T(db.ensureFullCommit().ok);
   T(db.allDocs().total_rows == 5);
-  
+
 };

Modified: couchdb/trunk/share/www/script/test/bulk_docs.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/bulk_docs.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/bulk_docs.js (original)
+++ couchdb/trunk/share/www/script/test/bulk_docs.js Mon Jul  6 00:33:50 2009
@@ -34,7 +34,7 @@
   T(results.length == 5);
   for (i = 0; i < 5; i++) {
     T(results[i].id == i.toString());
-    
+
     // set the delete flag to delete the docs in the next step
     docs[i]._deleted = true;
   }
@@ -72,7 +72,7 @@
   // Now save the bulk docs, When we use all_or_nothing, we don't get conflict
   // checking, all docs are saved regardless of conflict status, or none are
   // saved.
-  results = db.bulkSave(docs,{all_or_nothing:true});  
+  results = db.bulkSave(docs,{all_or_nothing:true});
   T(results.error === undefined);
 
   var doc = db.open("0", {conflicts:true});
@@ -88,8 +88,8 @@
 
   T(results[0].id != "");
   T(results[0].rev != "");
-  
-  
+
+
   // Regression test for failure on update/delete
   var newdoc = {"_id": "foobar", "body": "baz"};
   T(db.save(newdoc).ok);

Modified: couchdb/trunk/share/www/script/test/changes.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/changes.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/changes.js (original)
+++ couchdb/trunk/share/www/script/test/changes.js Mon Jul  6 00:33:50 2009
@@ -16,98 +16,98 @@
   db.deleteDb();
   db.createDb();
   if (debug) debugger;
-  
+
   var req = CouchDB.request("GET", "/test_suite_db/_changes");
   var resp = JSON.parse(req.responseText);
-  
+
   T(resp.results.length == 0 && resp.last_seq==0)
-  
+
   var docFoo = {_id:"foo", bar:1};
   db.save(docFoo);
-  
+
   req = CouchDB.request("GET", "/test_suite_db/_changes");
   var resp = JSON.parse(req.responseText);
-  
+
   T(resp.results.length == 1 && resp.last_seq==1)
   T(resp.results[0].changes[0].rev == docFoo._rev)
 
-  
+
   req = CouchDB.request("GET", "/test_suite_db/_changes?continuous=true&timeout=10");
   var resp = JSON.parse(req.responseText);
   T(resp.results.length == 1 && resp.last_seq==1)
   T(resp.results[0].changes[0].rev == docFoo._rev)
-  
+
   var xhr;
-  
+
   try {
     xhr = CouchDB.newXhr();
-  } catch (err) {  
+  } catch (err) {
   }
-  
+
   if (xhr) {
     // Only test the continuous stuff if we have a real XHR object
     // with real async support.
-    
+
     var sleep = function(msecs) {
       // by making a slow sync request, we allow the waiting XHR request data
       // to be received.
       var req = CouchDB.request("GET", "/_sleep?time=" + msecs);
       T(JSON.parse(req.responseText).ok == true);
     }
-  
+
     var parse_changes_line = function(line) {
       if (line.charAt(line.length-1) == ",") {
         line = line.substring(0, line.length-1);
       }
       return JSON.parse(line);
     }
-    
-  
+
+
     xhr.open("GET", "/test_suite_db/_changes?continuous=true", true);
     xhr.send("");
-  
+
     var docBar = {_id:"bar", bar:1};
     db.save(docBar);
-  
+
     sleep(100);
     var lines = xhr.responseText.split("\n");
-  
+
     T(lines[0]='{"results":[');
-  
+
     var change = parse_changes_line(lines[1]);
-  
+
     T(change.seq == 1)
     T(change.id == "foo")
-  
+
     change = parse_changes_line(lines[2]);
-  
+
     T(change.seq == 2)
     T(change.id == "bar")
     T(change.changes[0].rev == docBar._rev)
-  
+
     var docBaz = {_id:"baz", baz:1};
     db.save(docBaz);
-  
+
     sleep(100);
     var lines = xhr.responseText.split("\n");
-  
+
     change = parse_changes_line(lines[3]);
-  
+
     T(change.seq == 3);
     T(change.id == "baz");
     T(change.changes[0].rev == docBaz._rev);
-    
-    
+
+
     xhr = CouchDB.newXhr();
-  
+
     //verify the hearbeat newlines are sent
     xhr.open("GET", "/test_suite_db/_changes?continuous=true&heartbeat=10", true);
     xhr.send("");
-    
+
     sleep(100);
-    
+
     var str = xhr.responseText;
-    
+
     T(str.charAt(str.length - 1) == "\n")
     T(str.charAt(str.length - 2) == "\n")
   }

Modified: couchdb/trunk/share/www/script/test/compact.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/compact.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/compact.js (original)
+++ couchdb/trunk/share/www/script/test/compact.js Mon Jul  6 00:33:50 2009
@@ -43,7 +43,7 @@
   T(db.last_req.status == 202);
   // compaction isn't instantaneous, loop until done
   while (db.info().compact_running) {};
-  
+
   T(db.ensureFullCommit().ok);
   restartServer();
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc/foo.txt");
@@ -51,5 +51,5 @@
   T(xhr.getResponseHeader("Content-Type") == "text/plain")
   T(db.info().doc_count == 1);
   T(db.info().disk_size < deletesize);
-  
+
 };

Modified: couchdb/trunk/share/www/script/test/conflicts.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/conflicts.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/conflicts.js (original)
+++ couchdb/trunk/share/www/script/test/conflicts.js Mon Jul  6 00:33:50 2009
@@ -41,7 +41,7 @@
   } catch (e) {
     T(e.error == "conflict");
   }
-   
+
   var bySeq = db.allDocsBySeq();
 
   T( bySeq.rows.length == 1)

Modified: couchdb/trunk/share/www/script/test/delayed_commits.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/delayed_commits.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/delayed_commits.js (original)
+++ couchdb/trunk/share/www/script/test/delayed_commits.js Mon Jul  6 00:33:50 2009
@@ -15,43 +15,43 @@
   db.deleteDb();
   db.createDb();
   if (debug) debugger;
-  
+
   // By default, couchdb doesn't fully commit documents to disk right away,
-  // it waits about a second to batch the full commit flush along with any 
+  // it waits about a second to batch the full commit flush along with any
   // other updates. If it crashes or is restarted you may lose the most
   // recent commits.
-  
+
   T(db.save({_id:"1",a:2,b:4}).ok);
   T(db.open("1") != null);
-  
+
   restartServer();
-  
+
   T(db.open("1") == null); // lost the update.
   // note if we waited > 1 sec before the restart, the doc would likely
   // commit.
-  
-  
+
+
   // Retry the same thing but with full commits on.
-  
+
   var db2 = new CouchDB("test_suite_db", {"X-Couch-Full-Commit":"true"});
-  
+
   T(db2.save({_id:"1",a:2,b:4}).ok);
   T(db2.open("1") != null);
-  
+
   restartServer();
-  
+
   T(db2.open("1") != null);
-  
+
   // You can update but without committing immediately, and then ensure
   // everything is commited in the last step.
-  
+
   T(db.save({_id:"2",a:2,b:4}).ok);
   T(db.open("2") != null);
   T(db.ensureFullCommit().ok);
   restartServer();
-  
+
   T(db.open("2") != null);
-  
+
   // However, it's possible even when flushed, that the server crashed between
   // the update and the commit, and you don't want to check to make sure
   // every doc you updated actually made it to disk. So record the instance
@@ -59,37 +59,37 @@
   // after the flush (the instance start time is returned by the flush
   // operation). if they are the same, we know everything was updated
   // safely.
-  
+
   // First try it with a crash.
-  
+
   var instanceStartTime = db.info().instance_start_time;
-  
+
   T(db.save({_id:"3",a:2,b:4}).ok);
   T(db.open("3") != null);
-  
+
   restartServer();
-  
+
   var commitResult = db.ensureFullCommit();
   T(commitResult.ok && commitResult.instance_start_time != instanceStartTime);
   // start times don't match, meaning the server lost our change
-  
+
   T(db.open("3") == null); // yup lost it
-  
+
   // retry with no server restart
-  
+
   var instanceStartTime = db.info().instance_start_time;
-  
+
   T(db.save({_id:"4",a:2,b:4}).ok);
   T(db.open("4") != null);
-  
+
   var commitResult = db.ensureFullCommit();
   T(commitResult.ok && commitResult.instance_start_time == instanceStartTime);
   // Successful commit, start times match!
-  
+
   restartServer();
-  
+
   T(db.open("4") != null);
-  
+
   // Now test that when we exceed the max_dbs_open, pending commits are safely
   // written.
   T(db.save({_id:"5",foo:"bar"}).ok);
@@ -111,5 +111,5 @@
         dbi.deleteDb();
       }
     });
-  
+
 };

Modified: couchdb/trunk/share/www/script/test/design_docs.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/design_docs.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/design_docs.js (original)
+++ couchdb/trunk/share/www/script/test/design_docs.js Mon Jul  6 00:33:50 2009
@@ -74,16 +74,16 @@
     T(db.ensureFullCommit().ok);
     restartServer();
   };
-    
+
   // test when language not specified, Javascript is implied
   var designDoc2 = {
     _id:"_design/test2",
-    // language: "javascript", 
+    // language: "javascript",
     views: {
       single_doc: {map: "function(doc) { if (doc._id == \"1\") { emit(1, null) }}"}
     }
   };
-  
+
   T(db.save(designDoc2).ok);
   T(db.view("test2/single_doc").total_rows == 1);
 
@@ -113,14 +113,14 @@
   T(db.deleteDoc(designDoc).ok);
   T(db.open(designDoc._id) == null);
   T(db.view("test/no_docs") == null);
-  
+
   T(db.ensureFullCommit().ok);
   restartServer();
   T(db.open(designDoc._id) == null);
   T(db.view("test/no_docs") == null);
-  
+
   // trigger ddoc cleanup
   T(db.viewCleanup().ok);
-  
+
 });
 };

Modified: couchdb/trunk/share/www/script/test/design_options.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/design_options.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/design_options.js (original)
+++ couchdb/trunk/share/www/script/test/design_options.js Mon Jul  6 00:33:50 2009
@@ -26,7 +26,7 @@
     language: "javascript",
     options: {
       include_design: true,
-      local_seq: true        
+      local_seq: true
     },
     views: {
       data: {"map": map},
@@ -63,7 +63,7 @@
   T(db.save(designDoc).ok);
   rows = db.view("bango/data").rows;
   T(rows.length == 0);
-  
+
   // should also have local_seq in the view
   var resp = db.save({});
   rows = db.view("fu/with_seq").rows;

Modified: couchdb/trunk/share/www/script/test/design_paths.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/design_paths.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/design_paths.js (original)
+++ couchdb/trunk/share/www/script/test/design_paths.js Mon Jul  6 00:33:50 2009
@@ -18,7 +18,7 @@
     var dbName = encodeURIComponent(dbNames[i]);
     db.deleteDb();
     db.createDb();
-    
+
     // create a ddoc w bulk_docs
     db.bulkSave([{
       _id : "_design/test",

Modified: couchdb/trunk/share/www/script/test/etags_views.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/etags_views.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/etags_views.js (original)
+++ couchdb/trunk/share/www/script/test/etags_views.js Mon Jul  6 00:33:50 2009
@@ -15,7 +15,7 @@
   db.deleteDb();
   db.createDb();
   if (debug) debugger;
-  
+
   var designDoc = {
     _id:"_design/etags",
     language: "javascript",
@@ -43,7 +43,7 @@
   var xhr;
   var docs = makeDocs(0, 10);
   db.bulkSave(docs);
-  
+
   // verify get w/Etag on map view
   xhr = CouchDB.request("GET", "/test_suite_db/_design/etags/_view/basicView");
   T(xhr.status == 200);
@@ -53,7 +53,7 @@
   });
   T(xhr.status == 304);
   // TODO GET with keys (when that is available)
-  
+
   // reduce view
   xhr = CouchDB.request("GET", "/test_suite_db/_design/etags/_view/withReduce");
   T(xhr.status == 200);
@@ -62,7 +62,7 @@
     headers: {"if-none-match": etag}
   });
   T(xhr.status == 304);
-  
+
   // all docs
   xhr = CouchDB.request("GET", "/test_suite_db/_all_docs");
   T(xhr.status == 200);
@@ -79,7 +79,7 @@
   xhr = CouchDB.request("GET", "/test_suite_db/_all_docs_by_seq", {
     headers: {"if-none-match": etag}
   });
-  T(xhr.status == 304);    
+  T(xhr.status == 304);
 
   // list etag
   // in the list test for now

Modified: couchdb/trunk/share/www/script/test/invalid_docids.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/invalid_docids.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/invalid_docids.js (original)
+++ couchdb/trunk/share/www/script/test/invalid_docids.js Mon Jul  6 00:33:50 2009
@@ -19,7 +19,7 @@
   // Test _local explicitly first.
   T(db.save({"_id": "_local/foo"}).ok);
   T(db.open("_local/foo")._id == "_local/foo");
-  
+
   //Test non-string
   try {
     db.save({"_id": 1});

Modified: couchdb/trunk/share/www/script/test/list_views.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/list_views.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/list_views.js (original)
+++ couchdb/trunk/share/www/script/test/list_views.js Mon Jul  6 00:33:50 2009
@@ -15,7 +15,7 @@
   db.deleteDb();
   db.createDb();
   if (debug) debugger;
-      
+
   var designDoc = {
     _id:"_design/lists",
     language: "javascript",
@@ -44,12 +44,12 @@
         var row;
         while(row = getRow()) {
           log("row: "+toJSON(row));
-          send(row.key);        
+          send(row.key);
         };
         return "tail";
       }),
       basicJSON : stringFun(function(head, req) {
-        start({"headers":{"Content-Type" : "application/json"}}); 
+        start({"headers":{"Content-Type" : "application/json"}});
         send('{"head":'+toJSON(head)+', ');
         send('"req":'+toJSON(req)+', ');
         send('"rows":[');
@@ -144,7 +144,7 @@
         send("head");
         var row;
         while(row = getRow()) {
-          send(row.key);        
+          send(row.key);
         };
         getRow();
         getRow();
@@ -165,13 +165,13 @@
   };
 
   T(db.save(designDoc).ok);
-  
+
   var docs = makeDocs(0, 10);
   db.bulkSave(docs);
-  
+
   var view = db.view('lists/basicView');
   T(view.total_rows == 10);
-  
+
   // standard get
   var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/basicBasic/basicView");
   T(xhr.status == 200, "standard get should be 200");
@@ -214,7 +214,7 @@
   T(!(/Key: 1/.test(xhr.responseText)));
   T(/FirstKey: 3/.test(xhr.responseText));
   T(/LastKey: 9/.test(xhr.responseText));
-  
+
   // with 0 rows
   var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/simpleForm/basicView?startkey=30");
   T(xhr.status == 200, "0 rows");
@@ -231,19 +231,19 @@
   T(xhr.status == 200, "reduce 0 rows");
   T(/Total Rows/.test(xhr.responseText));
   T(/LastKey: undefined/.test(xhr.responseText));
-  
+
   // when there is a reduce present, but not used
   var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/simpleForm/withReduce?reduce=false");
   T(xhr.status == 200, "reduce false");
   T(/Total Rows/.test(xhr.responseText));
   T(/Key: 1/.test(xhr.responseText));
 
-  
+
   // when there is a reduce present, and used
   xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/simpleForm/withReduce?group=true");
   T(xhr.status == 200, "group reduce");
   T(/Key: 1/.test(xhr.responseText));
-  
+
   // there should be etags on reduce as well
   var etag = xhr.getResponseHeader("etag");
   T(etag, "Etags should be served with reduce lists");
@@ -251,11 +251,11 @@
     headers: {"if-none-match": etag}
   });
   T(xhr.status == 304);
-  
+
   // verify the etags expire correctly
   var docs = makeDocs(11, 12);
   db.bulkSave(docs);
-  
+
   xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/simpleForm/withReduce?group=true", {
     headers: {"if-none-match": etag}
   });
@@ -284,7 +284,7 @@
   });
   T(xhr.status == 400);
   T(/query_parse_error/.test(xhr.responseText));
-    
+
   var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/rowError/basicView");
   T(/ReferenceError/.test(xhr.responseText));
 
@@ -292,7 +292,7 @@
   // now with extra qs params
   var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/qsParams/basicView?foo=blam");
   T(xhr.responseText.match(/blam/));
-  
+
   var xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/stopIter/basicView");
   // T(xhr.getResponseHeader("Content-Type") == "text/plain");
   T(xhr.responseText.match(/^head 0 1 2 tail$/) && "basic stop");
@@ -305,7 +305,7 @@
   T(xhr.responseText.match(/^head 0 1 2 tail$/) && "reduce stop");
   xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/stopIter2/withReduce?group=true");
   T(xhr.responseText.match(/^head 0 1 2 tail$/) && "reduce stop 2");
-  
+
   // with accept headers for HTML
   xhr = CouchDB.request("GET", "/test_suite_db/_design/lists/_list/acceptSwitch/basicView", {
     headers: {

Modified: couchdb/trunk/share/www/script/test/purge.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/purge.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/purge.js (original)
+++ couchdb/trunk/share/www/script/test/purge.js Mon Jul  6 00:33:50 2009
@@ -15,7 +15,7 @@
   db.deleteDb();
   db.createDb();
   if (debug) debugger;
-  
+
   /*
    purge is not to be confused with a document deletion.  It removes the
    document and all edit history from the local instance of the database.
@@ -31,7 +31,7 @@
       single_doc: {map: "function(doc) { if (doc._id == \"1\") { emit(1, null) }}"}
     }
   }
-  
+
   T(db.save(designDoc).ok);
 
   db.bulkSave(makeDocs(1, numDocs + 1));
@@ -43,11 +43,11 @@
     T(rows[(2*i)+1].key == i+1);
   }
   T(db.view("test/single_doc").total_rows == 1);
-  
+
   var info = db.info();
   var doc1 = db.open("1");
   var doc2 = db.open("2");
-  
+
   // purge the documents
   var xhr = CouchDB.request("POST", "/test_suite_db/_purge", {
     body: JSON.stringify({"1":[doc1._rev], "2":[doc2._rev]}),
@@ -63,35 +63,35 @@
   var result = JSON.parse(xhr.responseText);
   T(result.purged["1"][0] == doc1._rev);
   T(result.purged["2"][0] == doc2._rev);
-  
+
   T(db.open("1") == null);
   T(db.open("2") == null);
-  
+
   var rows = db.view("test/all_docs_twice").rows;
   for (var i = 2; i < numDocs; i++) {
     T(rows[2*(i-2)].key == i+1);
     T(rows[(2*(i-2))+1].key == i+1);
   }
   T(db.view("test/single_doc").total_rows == 0);
-  
+
   // purge documents twice in a row without loading views
   // (causes full view rebuilds)
-  
+
   var doc3 = db.open("3");
   var doc4 = db.open("4");
-  
+
   xhr = CouchDB.request("POST", "/test_suite_db/_purge", {
     body: JSON.stringify({"3":[doc3._rev]}),
   });
-  
+
   T(xhr.status == 200);
-  
+
   xhr = CouchDB.request("POST", "/test_suite_db/_purge", {
     body: JSON.stringify({"4":[doc4._rev]}),
   });
-  
+
   T(xhr.status == 200);
-  
+
   var rows = db.view("test/all_docs_twice").rows;
   for (var i = 4; i < numDocs; i++) {
     T(rows[2*(i-4)].key == i+1);

Modified: couchdb/trunk/share/www/script/test/reduce.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/reduce.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/reduce.js (original)
+++ couchdb/trunk/share/www/script/test/reduce.js Mon Jul  6 00:33:50 2009
@@ -159,11 +159,11 @@
     docs.push({val:100});
     db.bulkSave(docs);
   }
-  
+
   var results = db.query(map, reduceCombine);
-  
+
   var difference = results.rows[0].value.stdDeviation - 28.722813232690143;
   // account for floating point rounding error
   T(Math.abs(difference) < 0.0000000001);
-  
+
 };

Modified: couchdb/trunk/share/www/script/test/reduce_builtin.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/reduce_builtin.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/reduce_builtin.js (original)
+++ couchdb/trunk/share/www/script/test/reduce_builtin.js Mon Jul  6 00:33:50 2009
@@ -15,11 +15,11 @@
   db.deleteDb();
   db.createDb();
   if (debug) debugger;
-  
+
   var numDocs = 500
   var docs = makeDocs(1,numDocs + 1);
   db.bulkSave(docs);
-  
+
   var summate = function(N) {return (N+1)*N/2;};
 
   // this is the same test as the reduce.js test
@@ -42,7 +42,7 @@
   T(result.rows[0].value == 18);
   result = db.query(map, "_count", {startkey: 4, endkey: 5});
   T(result.rows[0].value == 4);
-  
+
   result = db.query(map, "_sum", {startkey: 4, endkey: 6});
   T(result.rows[0].value == 30);
   result = db.query(map, "_count", {startkey: 4, endkey: 6});
@@ -57,7 +57,7 @@
     result = db.query(map, "_sum", {startkey: i, endkey: numDocs - i});
     T(result.rows[0].value == 2*(summate(numDocs-i) - summate(i-1)));
   }
-  
+
   db.deleteDb();
   db.createDb();
 
@@ -88,7 +88,7 @@
     for (var b=0; b < builtins.length; b++) {
       var fun = builtins[b];
       var results = db.query(map, fun, {group:true});
-      
+
       //group by exact key match
       T(equals(results.rows[0], {key:["a"],value:20*i}));
       T(equals(results.rows[1], {key:["a","b"],value:20*i}));
@@ -114,6 +114,6 @@
       T(equals(results.rows[4], {key:["d","a"],value:10*i}));
       T(equals(results.rows[5], {key:["d","b"],value:10*i}));
       T(equals(results.rows[6], {key:["d","c"],value:10*i}));
-    };    
+    };
   }
 }
\ No newline at end of file

Modified: couchdb/trunk/share/www/script/test/reduce_false.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/test/reduce_false.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/test/reduce_false.js (original)
+++ couchdb/trunk/share/www/script/test/reduce_false.js Mon Jul  6 00:33:50 2009
@@ -34,7 +34,7 @@
   // Test that the reduce works
   var res = db.view('test/summate');
   T(res.rows.length == 1 && res.rows[0].value == summate(5));
-  
+
   //Test that we get our docs back
   res = db.view('test/summate', {reduce: false});
   T(res.rows.length == 5);