couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject git commit: updated refs/heads/ENCODE-EVERYTHING to 1e30c49
Date Mon, 23 Dec 2013 13:59:46 GMT
Updated Branches:
  refs/heads/ENCODE-EVERYTHING 204ca74f3 -> 1e30c49f3


regex fix


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/1e30c49f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/1e30c49f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/1e30c49f

Branch: refs/heads/ENCODE-EVERYTHING
Commit: 1e30c49f339050e129ffe41dceac1ccb2bb43383
Parents: 204ca74
Author: suelockwood <deathbear@apache.org>
Authored: Fri Dec 20 19:53:54 2013 -0500
Committer: suelockwood <deathbear@apache.org>
Committed: Sat Dec 21 17:35:10 2013 -0500

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/resources.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1e30c49f/src/fauxton/app/modules/documents/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js
index 8e97f95..f833ded 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -142,7 +142,8 @@ function(app, FauxtonAPI) {
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
       if (this.isDdoc()){
-        return this.id;
+        var ddoc = this.id.replace(/^_design\//,"");
+        return "_design/"+app.mixins.safeURLName(ddoc);
       }else{
         return app.mixins.safeURLName(this.id);
       }
@@ -215,7 +216,7 @@ function(app, FauxtonAPI) {
     // treated separately. For instance, we could default into the
     // json editor for docs, or into a ddoc specific page.
     safeID: function() {
-      var ddoc = this.id.replace(/_design\//,"");
+      var ddoc = this.id.replace(/^_design\//,"");
       return "_design/"+app.mixins.safeURLName(ddoc);
     }
 


Mime
View raw message