couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [2/3] fauxton commit: updated refs/heads/master to 63d7ecb
Date Thu, 18 Sep 2014 09:09:02 GMT
Fix api bar in documents page


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

Branch: refs/heads/master
Commit: 77712123488f3f30f952dd1a0114e9ab0c97f216
Parents: 0d671c7
Author: Garren Smith <garren.smith@gmail.com>
Authored: Wed Sep 17 11:34:47 2014 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Thu Sep 18 11:06:03 2014 +0200

----------------------------------------------------------------------
 app/addons/databases/resources.js | 2 +-
 app/addons/documents/views.js     | 6 +++++-
 app/addons/fauxton/components.js  | 1 -
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/77712123/app/addons/databases/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/resources.js b/app/addons/databases/resources.js
index fa8a435..159f03a 100644
--- a/app/addons/databases/resources.js
+++ b/app/addons/databases/resources.js
@@ -59,7 +59,7 @@ function(app, FauxtonAPI, Documents) {
       } else if (context === "changes") {
         return "/database/" + this.safeID() + "/_changes?descending=true&limit=100&include_docs=true";
       } else if (context === "changes-apiurl") { 
-        return window.location.origin + "/database/" + this.safeID() + "/_changes?descending=true&limit=100&include_docs=true";
+        return window.location.origin + "/" + this.safeID() + "/_changes?descending=true&limit=100&include_docs=true";
       } else if (context === "app") {
         return "/database/" + this.safeID();
       } else {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/77712123/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 01accb6..bda8256 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -98,12 +98,16 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
       }));*/
 
       //Moved the apibar view into the components file so you can include it in your views
-      this.apiBar = this.insertView("#header-api-bar", new Components.ApiBar({}));
+      this.apiBar = this.insertView("#header-api-bar", new Components.ApiBar({
+        endpoint: this.apiEndpoints[0],
+        documentation: this.apiEndpoints[1]
+      }));
     },
 
     updateApiUrl: function(api){
       //this will update the api bar when the route changes
       //you can find the method that updates it in components.js Components.ApiBar()
+      this.apiEndpoints = api;
       this.apiBar && this.apiBar.update(api);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/77712123/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index 74f6c74..5d0ea90 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -157,7 +157,6 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       this.$el.removeClass('hide');
     },
     update: function(endpoint) {
-      this.show();
       this.endpoint = endpoint[0];
       this.documentation = endpoint[1];
       this.render();


Mime
View raw message