couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 6b158a2
Date Wed, 16 Oct 2013 20:58:27 GMT
Updated Branches:
  refs/heads/master a61b47e4d -> 6b158a2f2


Allow databases with / in the names


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

Branch: refs/heads/master
Commit: 6b158a2f2fa75e15fa2fc4a1f200b386280c9e76
Parents: a3822a9
Author: suelockwood <deathbearbrown@gmail.com>
Authored: Wed Oct 16 16:41:28 2013 -0400
Committer: suelockwood <deathbearbrown@gmail.com>
Committed: Wed Oct 16 16:42:01 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/modules/databases/views.js    | 3 ++-
 src/fauxton/app/modules/documents/routes.js   | 4 ++--
 src/fauxton/app/templates/databases/item.html | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/src/fauxton/app/modules/databases/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/views.js b/src/fauxton/app/modules/databases/views.js
index 749f79c..0f67d36 100644
--- a/src/fauxton/app/modules/databases/views.js
+++ b/src/fauxton/app/modules/databases/views.js
@@ -26,6 +26,7 @@ function(app, Components, FauxtonAPI) {
 
     serialize: function() {
       return {
+        encoded: encodeURIComponent(this.model.get("name")),
         database: this.model
       };
     }
@@ -59,7 +60,7 @@ function(app, Components, FauxtonAPI) {
         // TODO: switch to using a model, or Databases.databaseUrl()
         // Neither of which are in scope right now
         // var db = new Database.Model({id: dbname});
-        var url = ["/database/", dbname, "/_all_docs?limit=10"].join('');
+        var url = ["/database/", encodeURIComponent(dbname), "/_all_docs?limit=10"].join('');
         FauxtonAPI.navigate(url);
       }
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/src/fauxton/app/modules/documents/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/routes.js b/src/fauxton/app/modules/documents/routes.js
index 13b2bc9..df8c07d 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -167,7 +167,7 @@ function(app, FauxtonAPI, Documents, Databases) {
       var docOptions = app.getParams();
       docOptions.include_docs = true;
 
-      this.databaseName = options[0];
+      this.databaseName = encodeURIComponent(options[0]);
 
       this.data = {
         database: new Databases.Model({id:this.databaseName})
@@ -379,7 +379,7 @@ function(app, FauxtonAPI, Documents, Databases) {
     },
 
     initialize: function (route, masterLayout, options) {
-      this.databaseName = options[0];
+      this.databaseName = encodeURIComponent(options[0]);
       this.database = new Databases.Model({id: this.databaseName});
 
       var docOptions = app.getParams();

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/src/fauxton/app/templates/databases/item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/databases/item.html b/src/fauxton/app/templates/databases/item.html
index 8740242..a8801b0 100644
--- a/src/fauxton/app/templates/databases/item.html
+++ b/src/fauxton/app/templates/databases/item.html
@@ -13,7 +13,7 @@ the License.
 -->
 
 <td>
-  <a href="#/database/<%= database.get("name") %>/_all_docs?limit=100"><%=
database.get("name") %></a>
+  <a href="#/database/<%=encoded%>/_all_docs?limit=100"><%= database.get("name")
%></a>
 </td>
 <td><%= database.status.humanSize() %></td>
 <td><%= database.status.numDocs() %></td>


Mime
View raw message