couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject fauxton commit: updated refs/heads/master to dee7baa
Date Mon, 06 Oct 2014 12:11:01 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master cef13dc04 -> dee7baa94


COUCHDB-2354 - Fix search and API boxes vanishing


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

Branch: refs/heads/master
Commit: dee7baa94fae301967e4813b1ffe9e34bd134cd6
Parents: cef13dc
Author: Christian Hogan <github@infliction.org>
Authored: Mon Oct 6 06:40:06 2014 -0400
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon Oct 6 14:09:36 2014 +0200

----------------------------------------------------------------------
 app/addons/databases/routes.js               |  6 ------
 app/addons/documents/routes-documents.js     | 17 +++++++++++++----
 app/addons/documents/views.js                | 13 -------------
 app/templates/layouts/with_tabs_sidebar.html |  3 ++-
 assets/less/fauxton.less                     | 21 ++++++++++++++++++++-
 5 files changed, 35 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dee7baa9/app/addons/databases/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/routes.js b/app/addons/databases/routes.js
index 8bf8b5c..3194122 100644
--- a/app/addons/databases/routes.js
+++ b/app/addons/databases/routes.js
@@ -50,12 +50,6 @@ function(app, FauxtonAPI, Databases, Views) {
         collection: this.databases
       }));
 
-      this.rightHeader = this.setView("#api-navbar", new Views.RightAllDBsHeader({
-        collection: this.databases,
-        endpoint: this.databases.url("apiurl"),
-        documentation: this.databases.documentation()
-      }));
-
       this.databasesView.setPage(dbPage);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dee7baa9/app/addons/documents/routes-documents.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-documents.js b/app/addons/documents/routes-documents.js
index 36bf4ed..c39c722 100644
--- a/app/addons/documents/routes-documents.js
+++ b/app/addons/documents/routes-documents.js
@@ -108,7 +108,7 @@ function(app, FauxtonAPI, Documents, Changes, Index, DocEditor, Databases,
Resou
         }
       });
 
-      this.rightHeader = this.setView("#api-navbar", new Documents.Views.RightAllDocsHeader({
+      this.rightHeader = this.setView("#right-header", new Documents.Views.RightAllDocsHeader({
          database: this.database
       }));
 
@@ -256,8 +256,11 @@ function(app, FauxtonAPI, Documents, Changes, Index, DocEditor, Databases,
Resou
         params: urlParams,
         bulkDeleteDocsCollection: new Documents.BulkDeleteDocCollection([], {databaseId:
this.database.get('id')})
       }));
+      
+      this.apiUrl = function() {
+       return [this.database.allDocs.urlRef("apiurl", urlParams), this.database.allDocs.documentation()];
+      };
 
-      this.rightHeader.updateApiUrl([this.database.allDocs.urlRef("apiurl", urlParams), this.database.allDocs.documentation()]);
     },
 
     viewFn: function (databaseName, ddoc, view) {
@@ -302,7 +305,9 @@ function(app, FauxtonAPI, Documents, Changes, Index, DocEditor, Databases,
Resou
 
       this.sidebar.setSelectedTab(app.utils.removeSpecialCharacters(ddoc) + '_' + app.utils.removeSpecialCharacters(view));
 
-      this.rightHeader.updateApiUrl([this.indexedDocs.urlRef("apiurl", urlParams), "docs"]);
+      this.apiUrl = function() {
+       return [this.indexedDocs.urlRef("apiurl", urlParams), "docs"];
+      };
     },
 
     ddocInfo: function (designDoc, designDocs, view) {
@@ -467,7 +472,11 @@ function(app, FauxtonAPI, Documents, Changes, Index, DocEditor, Databases,
Resou
       this.sidebar.setSelectedTab('changes');
 
       this.leftheader.updateCrumbs(crumbs.changes(this.database));
-      this.rightHeader.updateApiUrl([this.database.url("changes-apiurl"), this.database.documentation()]);
+
+      this.apiUrl = function () {
+        return [this.database.url("changes-apiurl"), this.database.documentation()];
+      };
+
     },
 
     addFilter: function (filter) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dee7baa9/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index fe6ce47..8db2e3c 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -96,19 +96,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
         hasReduce: false,
         showPreview: false,
       }));*/
-
-      //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({
-        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);
     },
 
     serialize: function() {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dee7baa9/app/templates/layouts/with_tabs_sidebar.html
----------------------------------------------------------------------
diff --git a/app/templates/layouts/with_tabs_sidebar.html b/app/templates/layouts/with_tabs_sidebar.html
index 125f75c..8b4d58b 100644
--- a/app/templates/layouts/with_tabs_sidebar.html
+++ b/app/templates/layouts/with_tabs_sidebar.html
@@ -17,7 +17,8 @@ the License.
   <div id="global-notifications" class="container errors-container window-resizeable"></div>
   <header class="fixed-header row-fluid">
     <div id="breadcrumbs" class="sidebar"></div>
-    <div id="api-navbar" class="window-resizeable"></div>
+    <div id="api-navbar"></div>
+    <div id="right-header" class="window-resizeable"></div>
   </header>
 
   <div class="with-sidebar content-area">

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/dee7baa9/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/assets/less/fauxton.less b/assets/less/fauxton.less
index 827feee..097b83e 100644
--- a/assets/less/fauxton.less
+++ b/assets/less/fauxton.less
@@ -1088,13 +1088,25 @@ div.add-dropdown {
   }
   .two-pane &,
   .with-sidebar & {
-    #api-navbar{
+    #right-header {
       > div {
         .bottom-shadow-border;
         height: 60px;
       }
       .left-shadow-border;
     }
+    #api-navbar{
+      position: relative;
+      float: right;
+      left: -220px;
+      z-index: 200;
+      > div {
+        height: 60px;
+      }
+    }
+    #header-api-bar {
+	  width: 87px;
+    }
     #breadcrumbs{
       .bottom-shadow-border;
     }
@@ -1110,6 +1122,13 @@ div.add-dropdown {
   }
 }
 
+#right-header {
+  height: 60px;
+  position: absolute;
+  /* these styles are for the new header*/
+  .right-header{
+  }
+}
 #api-navbar{
   height: 60px;
   position: absolute;


Mime
View raw message