couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r663120 - in /incubator/couchdb/branches/runtimeconfig: ./ share/www/ share/www/browse/ share/www/image/ share/www/script/ share/www/style/ src/couchdb/
Date Wed, 04 Jun 2008 14:27:34 GMT
Author: jan
Date: Wed Jun  4 07:27:33 2008
New Revision: 663120

URL: http://svn.apache.org/viewvc?rev=663120&view=rev
Log:
Merged revisions 662528,662554,662587,662591,662823,663055 via svnmerge from 
https://jan@svn.apache.org/repos/asf/incubator/couchdb/trunk


Modified:
    incubator/couchdb/branches/runtimeconfig/   (props changed)
    incubator/couchdb/branches/runtimeconfig/THANKS
    incubator/couchdb/branches/runtimeconfig/configure.ac
    incubator/couchdb/branches/runtimeconfig/share/www/browse/database.html
    incubator/couchdb/branches/runtimeconfig/share/www/image/logo.png
    incubator/couchdb/branches/runtimeconfig/share/www/index.html
    incubator/couchdb/branches/runtimeconfig/share/www/script/browse.js
    incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js
    incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.couch.js
    incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.resizer.js
    incubator/couchdb/branches/runtimeconfig/share/www/style/layout.css
    incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl

Propchange: incubator/couchdb/branches/runtimeconfig/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun  4 07:27:33 2008
@@ -1 +1 @@
-/incubator/couchdb/trunk:1-662261
+/incubator/couchdb/trunk:1-663114

Modified: incubator/couchdb/branches/runtimeconfig/THANKS
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/THANKS?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/THANKS (original)
+++ incubator/couchdb/branches/runtimeconfig/THANKS Wed Jun  4 07:27:33 2008
@@ -9,6 +9,7 @@
  * Chris Anderson <jchris@grabb.it>
  * William Beh <willbeh@gmail.com>
  * Benoit Chesneau <bchesneau@gmail.com>
+ * Paul Joseph Davis <paul.joseph.davis@gmail.com>
  * Till Klampaeckel <till@klampaeckel.de>
  * Roger Leigh <rleigh@debian.org>
  * Jim Lindley <web@jimlindley.com>

Modified: incubator/couchdb/branches/runtimeconfig/configure.ac
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/configure.ac?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/configure.ac (original)
+++ incubator/couchdb/branches/runtimeconfig/configure.ac Wed Jun  4 07:27:33 2008
@@ -104,8 +104,16 @@
     AC_MSG_ERROR([Could not find the `erl' executable. Is Erlang installed?])
 fi
 
-if test $(${ERL} -version 2>&1 | sed "s/[[^0-9]]//g") -le 550; then
-    AC_MSG_ERROR([The installed Erlang version is older than 5.5.0 (R11B).])
+erlang_version_error="The installed Erlang version is less than 5.5.0 (R11B)."
+
+version=$(${ERL} -version 2>&1 | ${SED} "s/[[^0-9]]/ /g")
+
+if test $(echo $version | ${AWK} "{print \$1}") -lt 5; then
+    AC_MSG_ERROR([$erlang_version_error])
+fi
+
+if test $(echo $version | ${AWK} "{print \$2}") -lt 5; then
+    AC_MSG_ERROR([$erlang_version_error])
 fi
 
 AC_PATH_PROG([ERLC], [erlc])

Modified: incubator/couchdb/branches/runtimeconfig/share/www/browse/database.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/browse/database.html?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/browse/database.html [utf-8] (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/browse/database.html [utf-8] Wed Jun
 4 07:27:33 2008
@@ -37,7 +37,7 @@
       $(document).ready(function() {
         $("h1 strong").text(page.db.name);
         $("#viewcode span").click(function() {
-          $("#viewcode").toggleClass("expanded");
+          $("#viewcode").toggleClass("collapsed");
         });
         $("#viewcode button.run").click(function() {
           page.updateDocumentListing();
@@ -51,9 +51,15 @@
         $("#viewcode button.saveas").click(function() {
           page.saveViewAs();
         });
-        $("#viewcode textarea").resizable({
+        $("#viewcode textarea").makeResizable({
           always: true,
-          grippie: $("#viewcode .bottom")
+          grippie: $("#viewcode .bottom"),
+          vertical: true
+        });
+        $("#viewcode td.map").makeResizable({
+          always: true,
+          grippie: $("#viewcode td.splitter"),
+          horizontal: true
         });
 
         // Restore preferences/state from cookies
@@ -108,21 +114,24 @@
         <li><button class="delete">Delete Database</button></li>
       </ul>
 
-      <div id="viewcode" style="display: none">
+      <div id="viewcode" class="collapsed" style="display: none">
         <div class="top">
           <a id="designdoc-link"></a>
           <span id="view-toggle">View Code</span>
         </div>
-        <div class="code map">
-          <label for="viewcode_map">Map Function:</label>
-          <textarea id="viewcode_map" class="map" rows="5" cols="79" spellcheck="false"
wrap="off">function(doc) {
+        <table summary="View functions" cellspacing="0"><tr>
+          <td class="code map">
+            <label for="viewcode_map">Map Function:</label>
+            <textarea id="viewcode_map" class="map" rows="5" cols="20" spellcheck="false"
wrap="off">function(doc) {
   emit(null, doc);
 }</textarea>
-        </div>
-        <div class="code reduce">
-          <label for="viewcode_reduce">Reduce Function (optional):</label>
-          <textarea id="viewcode_reduce" class="reduce" rows="5" cols="79" spellcheck="false"
wrap="off"></textarea>
-        </div>
+          </td>
+          <td class="splitter"></td>
+          <td class="code reduce">
+            <label for="viewcode_reduce">Reduce Function (optional):</label>
+            <textarea id="viewcode_reduce" class="reduce" rows="5" cols="20" spellcheck="false"
wrap="off"></textarea>
+          </td>
+        </tr></table>
         <div class="bottom">
           <button class="save" type="button" disabled>Save</button>
           <button class="saveas" type="button">Save As…</button>

Modified: incubator/couchdb/branches/runtimeconfig/share/www/image/logo.png
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/image/logo.png?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
Binary files - no diff available.

Modified: incubator/couchdb/branches/runtimeconfig/share/www/index.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/index.html?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/index.html [utf-8] (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/index.html [utf-8] Wed Jun  4 07:27:33
2008
@@ -21,7 +21,7 @@
     <style type="text/css">
       html { height: 100%; overflow: hidden; }
       body { background: #fff url(image/bg.png) 100% 0 repeat-y;
-        padding: 0 185px 0 0; height: 100%; overflow: hidden;
+        padding: 0; height: 100%; overflow: hidden;
       }
       * html body { padding-right: 210px; }
       iframe { background: transparent; border: none; width: 100%; height: 100%; }
@@ -82,7 +82,7 @@
   </head>
   <body>
     <a href="browse/index.html" target="content">
-      <img id="logo" src="image/logo.png" width="170" height="151" alt="Apache CouchDB:
Relax">
+      <img id="logo" src="image/logo.png" width="175" height="150" alt="Apache CouchDB:
Relax">
     </a>
     <ul id="nav">
       <li><span>Tools</span><ul>

Modified: incubator/couchdb/branches/runtimeconfig/share/www/script/browse.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/script/browse.js?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/script/browse.js [utf-8] (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/script/browse.js [utf-8] Wed Jun  4
07:27:33 2008
@@ -214,10 +214,14 @@
           }
         },
         success: function(resp) {
-          page.storedViewCode = resp.views[localViewName];
-          $("#viewcode_map").val(page.storedViewCode.map);
-          $("#viewcode_reduce").val(page.storedViewCode.reduce || "");
+          var viewCode = resp.views[localViewName];
+          $("#viewcode_map").val(viewCode.map);
+          $("#viewcode_reduce").val(viewCode.reduce || "");
+          var lines = Math.max(viewCode.map.split("\n").length,
+                               (viewCode.reduce ? viewCode.reduce.split("\n").length : 1));
+          $("#viewcode textarea").attr("rows", Math.min(15, Math.max(3, lines)));
           $("#viewcode button.revert, #viewcode button.save").attr("disabled", "disabled");
+          page.storedViewCode = viewCode;
           if (callback) callback();
         }
       });
@@ -348,6 +352,9 @@
     if (options.count === undefined) {
       options.count = parseInt($("#perpage").val(), 10);
     }
+    if (options.group === undefined) {
+      options.group = true;
+    }
     if ($("#documents thead th.key").is(".desc")) {
       options.descending = true;
       $.cookies.set(dbName + ".desc", "1");
@@ -363,7 +370,7 @@
       if (resp.offset === undefined) {
         resp.offset = 0;
       }
-      if (resp.total_rows !== null && resp.offset > 0) {
+      if (resp.rows !== null && resp.offset > 0) {
         $("#paging a.prev").attr("href", "#" + (resp.offset - options.count)).click(function()
{
           var firstDoc = resp.rows[0];
           page.updateDocumentListing({
@@ -377,7 +384,7 @@
       } else {
         $("#paging a.prev").removeAttr("href");
       }
-      if (resp.total_rows !== null && resp.total_rows - resp.offset > options.count)
{
+      if (resp.rows !== null && resp.total_rows - resp.offset > options.count)
{
         $("#paging a.next").attr("href", "#" + (resp.offset + options.count)).click(function()
{
           var lastDoc = resp.rows[resp.rows.length - 1];
           page.updateDocumentListing({
@@ -392,39 +399,42 @@
         $("#paging a.next").removeAttr("href");
       }
 
-      if (resp.total_rows != null) {
-        for (var i = 0; i < resp.rows.length; i++) {
-          var row = resp.rows[i];
-          var tr = $("<tr></tr>");
-          var key = row.key;
+      for (var i = 0; i < resp.rows.length; i++) {
+        var row = resp.rows[i];
+        var tr = $("<tr></tr>");
+        var key = row.key;
+        if (row.id) {
           $("<td class='key'><a href='document.html?" + encodeURIComponent(db.name)
+
-            "/" + encodeURIComponent(row.id) + "'><em></em><br>" +
+            "/" + encodeURIComponent(row.id) + "'><strong></strong><br>"
+
             "<span class='docid'>ID:&nbsp;" + row.id + "</span></a></td>")
-            .find("em").text(key !== null ? prettyPrintJSON(key, 0, "") : "null").end()
+            .find("strong").text(key !== null ? prettyPrintJSON(key, 0, "") : "null").end()
+            .appendTo(tr);
+        } else {
+          $("<td class='key'><strong></strong></td>")
+            .find("strong").text(key !== null ? prettyPrintJSON(key, 0, "") : "null").end()
             .appendTo(tr);
-          var value = row.value;
-          $("<td class='value'></td>").text(
-            value !== null ? prettyPrintJSON(value, 0, "") : "null"
-          ).appendTo(tr).dblclick(function() {
-            location.href = this.previousSibling.firstChild.href;
-          });
-          tr.appendTo("#documents tbody.content");
         }
-        $("#documents tbody.footer td span").text(
-          "Showing " + Math.min(resp.total_rows, resp.offset + 1) + "-" +
-          (resp.offset + resp.rows.length) + " of " + resp.total_rows +
-          " document" + (resp.total_rows != 1 ? "s" : ""));
-        $("#documents").removeClass("reduced");
-      } else {
-        var tr = $("<tr></tr>");
-        $("<td class='key'></td>").appendTo(tr);
+        var value = row.value;
         $("<td class='value'></td>").text(
-          resp.result !== null ? prettyPrintJSON(resp.result) : "null"
-        ).appendTo(tr);
+          value !== null ? prettyPrintJSON(value, 0, "") : "null"
+        ).appendTo(tr).dblclick(function() {
+          location.href = this.previousSibling.firstChild.href;
+        });
         tr.appendTo("#documents tbody.content");
-        $("#documents tbody.footer td span").text("Showing reduce result");
-        $("#documents").addClass("reduced");
       }
+      var firstNum = 1;
+      var lastNum = totalNum = resp.rows.length;
+      if (resp.total_rows != null) {
+        firstNum = Math.min(resp.total_rows, resp.offset + 1);
+        lastNum = firstNum + resp.rows.length - 1;
+        totalNum = resp.total_rows;
+        $("#paging").show();
+      } else {
+        $("#paging").hide();
+      }
+      $("#documents tbody.footer td span").text(
+        "Showing " + firstNum + "-" + lastNum + " of " + totalNum +
+        " row" + (firstNum != lastNum ? "s" : ""));
       $("#documents tbody tr:odd").addClass("odd");
       $(document.body).removeClass("loading");
     }
@@ -738,7 +748,7 @@
     tools.appendTo(td);
     input.val(prettyPrintJSON(value)).appendTo(td);
     input.each(function() { this.focus(); this.select(); });
-    if (needsTextarea) input.resizable();
+    if (needsTextarea) input.makeResizable({vertical: true});
   }
 
   function _initKey(doc, row, fieldName) {

Modified: incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js [utf-8] (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/script/couch_tests.js [utf-8] Wed Jun
 4 07:27:33 2008
@@ -93,14 +93,14 @@
     T(db.info().doc_count == 6);
 
     var reduceFunction = function(keys, values){
-        return sum(values);
+      return sum(values);
     };
 
     results = db.query(mapFunction, reduceFunction);
 
     T(results.rows[0].value == 33);
 
-   // delete a document
+    // delete a document
     T(db.deleteDoc(existingDoc).ok);
 
     // make sure we can't open the doc

Modified: incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.couch.js?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.couch.js [utf-8] (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.couch.js [utf-8] Wed
Jun  4 07:27:33 2008
@@ -11,7 +11,7 @@
 // the License.
 
 (function($) {
-  $.couch = $.couch || {}
+  $.couch = $.couch || {};
   $.fn.extend($.couch, {
 
     allDbs: function(options) {
@@ -120,7 +120,7 @@
                 alert("An error occurred retrieving a list of all documents: " +
                   resp.reason);
               }
-            },
+            }
           });
         },
         openDoc: function(docId, options) {

Modified: incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.resizer.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.resizer.js?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.resizer.js [utf-8] (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/script/jquery.resizer.js [utf-8] Wed
Jun  4 07:27:33 2008
@@ -12,35 +12,62 @@
 
 (function($) {
 
-  $.fn.resizable = function(options) {
+  $.fn.makeResizable = function(options) {
     options = options || {};
     options.always = options.always || false;
     options.grippie = options.grippie || null;
+    options.horizontal = options.horizontal || false;
+    options.minWidth = options.minWidth || 100;
+    options.maxWidth = options.maxWidth || null;
+    options.vertical = options.vertical || false;
     options.minHeight = options.minHeight || 32;
     options.maxHeight = options.maxHeight || null;
 
-    if (!options.always && $.browser.safari && parseInt($.browser.version)
>= 522)
-      return this; // safari3 and later provides textarea resizing natively
-
     return this.each(function() {
+      if ($(this).is("textarea") && !options.always &&
+          $.browser.safari && parseInt($.browser.version) >= 522)
+        return this; // safari3 and later provides textarea resizing natively
+
       var grippie = options.grippie;
       if (!grippie) grippie = $("<div></div>").appendTo(this.parentNode);
       grippie.addClass("grippie");
+      if (options.horizontal && options.vertical) {
+        grippie.css("cursor", "nwse-resize");
+      } else if (options.horizontal) {
+        grippie.css("cursor", "col-resize");
+      } else if (options.vertical) {
+        grippie.css("cursor", "row-resize");
+      }
+
       var elem = $(this);
       grippie.mousedown(function(e) {
-        var pos = e.screenY;
-        var height = elem.height();
+        var pos = {x: e.screenX, y: e.screenY};
+        var dimensions = {width: elem.width(), height: elem.height()};
         $(document)
           .mousemove(function(e) {
-            var offset = e.screenY - pos;
-            if (offset) {
-              var newHeight = height + offset;
-              if (newHeight >= options.minHeight &&
-                  (!options.maxHeight || newHeight <= options.maxHeight)) {
-                elem.height(newHeight);
-                height = newHeight;
+            if (options.horizontal) {
+              var offset = e.screenX - pos.x;
+              if (offset) {
+                var newWidth = dimensions.width + offset;
+                if (newWidth >= options.minWidth &&
+                    (!options.maxWidth || newWidth <= options.maxWidth)) {
+                  elem.width(newWidth);
+                  dimensions.width = newWidth;
+                }
+                pos.x = e.screenX;
+              }
+            }
+            if (options.vertical) {
+              var offset = e.screenY - pos.y;
+              if (offset) {
+                var newHeight = dimensions.height + offset;
+                if (newHeight >= options.minHeight &&
+                    (!options.maxHeight || newHeight <= options.maxHeight)) {
+                  elem.height(newHeight);
+                  dimensions.height = newHeight;
+                }
+                pos.y = e.screenY;
               }
-              pos = e.screenY;
             }
             document.onselectstart = function() { return false }; // for IE
             return false;

Modified: incubator/couchdb/branches/runtimeconfig/share/www/style/layout.css
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/share/www/style/layout.css?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/share/www/style/layout.css (original)
+++ incubator/couchdb/branches/runtimeconfig/share/www/style/layout.css Wed Jun  4 07:27:33
2008
@@ -113,8 +113,7 @@
 /* Resizer grippies */
 
 div.grippie { background: #e9e9e9 url(../image/grippie.gif) 50% 50% no-repeat;
-  border: 1px solid #aaa; border-top: none; cursor: row-resize;
-  min-height: 10px;
+  border: 1px solid #aaa; border-top: none; min-height: 10px;
 }
 
 /* Suggest results */
@@ -134,7 +133,7 @@
 
 #wrap { padding: 0 20px 3em; }
 
-#logo { position: absolute; top: 20px; right: 20px; }
+#logo { position: absolute; top: 20px; right: 18px; }
 
 #nav { color: #333; font-size: 110%; font-weight: bold; list-style: none;
   margin: 0; overflow: auto; padding: 0; position: absolute; top: 185px;
@@ -164,8 +163,7 @@
 
 #footer { background: #ddd; border-top: 1px solid #bbb; color: #000;
   font-size: 80%; opacity: .7; padding: 5px 10px; position: absolute; right: 0;
-  bottom: 0; height: 1.3em; width: 190px; text-align: right;
-  white-space: nowrap;
+  bottom: 0; min-height: 1.3em; width: 190px; text-align: right;
 }
 #view { position: absolute; left: 0; right: 210px; top: 0; bottom: 0;
   height: 100%;
@@ -249,14 +247,14 @@
 /* View function editing */
 
 #viewcode { background: #fff; border: 1px solid;
-  border-color: #999 #ddd #ddd #999; margin: 0 0 1em; padding: 0 .5em;
+  border-color: #999 #ddd #ddd #999; margin: 0 0 1em; overflow: hidden;
 }
 #viewcode .top, #viewcode .bottom { background-color: #e9e9e9;
   border: 1px solid; border-color: #ddd #ddd #e9e9e9 #ddd; color: #333;
-  margin: 0 -.5em; padding: 0 .5em 2px;
+  padding: 0 .5em 2px;
 }
-#viewcode .top {  color: #aaa; font-size: 95%; }
-#viewcode .top span { background: url(../image/twisty.gif) 0 3px no-repeat;
+#viewcode .top { border-bottom: 1px solid #ddd; color: #aaa; font-size: 95%; }
+#viewcode .top span { background: url(../image/twisty.gif) 0 -96px no-repeat;
   border: none; color: #666; cursor: pointer; display: block; font-size: 90%;
   margin: 0; padding: 2px 0 0 15px;
 }
@@ -264,15 +262,21 @@
   padding: 2px 2px 0 0;
 }
 #viewcode .top a:link, #viewcode .top a:visited { color: #999; }
-#viewcode .code, #viewcode .bottom { display: none; }
-#viewcode .code { float: left; padding: .2em 0; width: 49%; }
-#viewcode .code label { font-size: 90%; color: #999; }
+#viewcode table { border: none; border-collapse: separate; border-spacing: 0;
+  margin: 0; table-layout: fixed; width: 100%; max-width: 100%;
+}
+#viewcode table td { border: none; padding: 0; }
+#viewcode table td.splitter { background: #e9e9e9; width: 4px; }
+#viewcode table td.map { border-right: 1px solid #ccc; }
+#viewcode table td.reduce { border-left: 1px solid #ccc; }
+#viewcode .code label { font-size: 90%; color: #999; padding: 0 .5em;
+  white-space: nowrap;
+}
 #viewcode .code textarea { border: none; border-top: 1px solid #ccc;
-  color: #333; margin: 0 0 .4em; min-height: 50px; max-width: 98%;
-  padding: .2em 0; resize: none;
+  color: #333; margin: 0; min-height: 50px; padding: .4em 0 0; resize: none;
+  width: 100%; overflow: auto;
 }
-#viewcode .code textarea:focus { background: #ffffe9; }
-#viewcode div.map { border-right: 3px double #ccc; margin-right: .5em; }
+#viewcode .code textarea:focus { background: #e9f4ff; }
 #viewcode .bottom { border-bottom: none; clear: left; padding: 1px 3px; }
 #viewcode .bottom button { font-size: 90%; margin: 0 1em 0 0;
   padding-left: 2em; padding-right: 2em;
@@ -284,10 +288,11 @@
   float: right; margin: 0 0 0 1em;
 }
 #viewcode .bottom button.save { font-weight: bold; }
-#viewcode .grippie { background-position: 49% 50%; }
-#viewcode.expanded .top { border-bottom: 1px solid #ddd; }
-#viewcode.expanded .top span { background-position: 0 -96px; }
-#viewcode.expanded .code, #viewcode.expanded .bottom { display: block; }
+#viewcode .grippie { background-position: 50% 50%; }
+#viewcode.collapsed { background: #e9e9e9; }
+#viewcode.collapsed .top { border-bottom: none; }
+#viewcode.collapsed .top span { background-position: 0 3px; }
+#viewcode.collapsed table, #viewcode.collapsed .bottom { display: none; }
 
 /* Database table */
 
@@ -304,18 +309,12 @@
 }
 #documents tbody.content td.key { color: #333; }
 #documents tbody.content td.key a { display: block; }
-#documents tbody.content td.key em { font-style: normal; }
+#documents tbody.content td.key a strong { font-weight: normal; }
 #documents tbody.content td.key span.docid { color: #999;
   font: normal 10px Arial,Helvetica,sans-serif;
 }
 #documents tbody.content td.value { font-size: 10px; }
 
-#documents.reduced th.key, #documents.reduced td.key,
-#documents.reduced #paging {
-  display: none;
-}
-#documents.reduced td.value { white-space: pre; }
-
 /* Document fields table */
 
 #fields { table-layout: fixed; }

Modified: incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl?rev=663120&r1=663119&r2=663120&view=diff
==============================================================================
--- incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl (original)
+++ incubator/couchdb/branches/runtimeconfig/src/couchdb/couch_httpd.erl Wed Jun  4 07:27:33
2008
@@ -204,7 +204,7 @@
 
 handle_db_request(Req, 'POST', {_DbName, Db, []}) ->
     % TODO: Etag handling
-    Json = cjson:decode(Req:recv_body()),
+    Json = cjson:decode(Req:recv_body(?MAX_DOC_SIZE)),
     Doc = couch_doc:from_json_obj(Json),
     DocId = couch_util:new_uuid(),
     {ok, NewRev} = couch_db:update_doc(Db, Doc#doc{id=DocId, revs=[]}, []),
@@ -219,7 +219,7 @@
 
 handle_db_request(Req, 'POST', {_DbName, Db, ["_bulk_docs"]}) ->
     Options = [], % put options here.
-    {obj, JsonProps} = cjson:decode(Req:recv_body()),
+    {obj, JsonProps} = cjson:decode(Req:recv_body(?MAX_DOC_SIZE)),
     DocsArray = proplists:get_value("docs", JsonProps),
     % convert all the doc elements to native docs
     case proplists:get_value("new_edits", JsonProps, true) of
@@ -452,6 +452,12 @@
 
 % Document request handlers
 
+handle_db_request(Req, Method, {DbName, Db, ["_design", DesignName]}) ->
+    % Special case to enable using an unencoded in the URL of design docs, as
+    % slashes in document IDs must otherwise be URL encoded
+    DocId = mochiweb_util:join(["_design", DesignName], "/"),
+    handle_db_request(Req, Method, {DbName, Db, [DocId]});
+
 handle_db_request(Req, Method, {DbName, Db, [DocId]}) ->
     UnquotedDocId = mochiweb_util:unquote(DocId),
     handle_doc_request(Req, Method, DbName, Db, UnquotedDocId);



Mime
View raw message