couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject svn commit: r752167 - /couchdb/trunk/share/www/database.html
Date Tue, 10 Mar 2009 17:15:08 GMT
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);



Mime
View raw message