You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by cm...@apache.org on 2009/03/10 18:15:08 UTC

svn commit: r752167 - /couchdb/trunk/share/www/database.html

Author: cmlenz
Date: Tue Mar 10 17:15:06 2009
New Revision: 752167

URL: http://svn.apache.org/viewvc?rev=752167&view=rev
Log:
Update the 'Raw view' link on the Futon database page to reflect the recent view URL change.

Modified:
    couchdb/trunk/share/www/database.html

Modified: couchdb/trunk/share/www/database.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/database.html?rev=752167&r1=752166&r2=752167&view=diff
==============================================================================
--- couchdb/trunk/share/www/database.html [utf-8] (original)
+++ couchdb/trunk/share/www/database.html [utf-8] Tue Mar 10 17:15:06 2009
@@ -39,7 +39,12 @@
       $(function() {
         if (page.redirecting) return;
         $("h1 strong").text(page.db.name);
-        var viewPath = (page.viewName || "_all_docs").replace(/^_design\//, "_view/");
+        var viewPath = page.viewName || "_all_docs";
+        if (/^_design\//.test(viewPath)) {
+          var parts = viewPath.split("/");
+          parts.splice(2, 0, "_view");
+          viewPath = parts.join("/");
+        }
         if (viewPath != "_temp_view" && viewPath != "_design_docs") {
           $("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
             "/" + viewPath);