1. Benoit Chesneau
  2. couchdb

Commits

Christpher Lenz  committed fe6bdd9

Update the 'Raw view' link on the Futon database page to reflect the recent view URL change.

  • Participants
  • Parent commits 06e43e0
  • Branches default

Comments (0)

Files changed (1)

File share/www/database.html

View file
       $(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);