couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject fauxton commit: updated refs/heads/secondary-indexes to ba4c20c
Date Wed, 13 Aug 2014 19:57:26 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/secondary-indexes 17fd138c4 -> ba4c20ce0


Fix for the header on view save


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

Branch: refs/heads/secondary-indexes
Commit: ba4c20ce0afaf2cc7f4dc86f70e19b575d17ac0d
Parents: 17fd138
Author: deathbearbrown <deathbearbrown@gmail.com>
Authored: Wed Aug 13 15:57:30 2014 -0400
Committer: deathbearbrown <deathbearbrown@gmail.com>
Committed: Wed Aug 13 15:57:30 2014 -0400

----------------------------------------------------------------------
 app/addons/indexes/routes-core.js        | 20 ++++++++++++++++++--
 app/addons/indexes/routes-viewindexes.js | 13 +------------
 2 files changed, 19 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ba4c20ce/app/addons/indexes/routes-core.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes-core.js b/app/addons/indexes/routes-core.js
index 65f33bc..402ae99 100644
--- a/app/addons/indexes/routes-core.js
+++ b/app/addons/indexes/routes-core.js
@@ -24,6 +24,11 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) {
     layout: "two_pane",
 
     initialize: function (route, masterLayout, options) {
+      _.bindAll(this);
+      var params = this.createParams(),
+      urlParams = params.urlParams,
+      docParams = params.docParams;
+
       this.databaseName = options[0];
 
       this.data = {
@@ -42,6 +47,19 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) {
           limit: 500
         }
       });
+
+
+      /* --------------------------------------------------
+        Set up right header
+      ----------------------------------------------------*/
+
+      this.rightHeader = this.setView("#api-navbar", new Views.RightHeader({
+        database: this.data.database,
+        model: this.data.database,
+        endpoint: this.data.designDocs.urlRef("apiurl", urlParams),
+        documentation: "docs"
+      }));
+
     },
 
     events: {
@@ -162,8 +180,6 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) {
       this.documentsView.setParams(docParams, urlParams);
 
       this.documentsView.forceRender();
-
-      this.rightHeader.updateApiUrl([collection.urlRef("apiurl", urlParams), "docs"]);
     },
 
     /* --------------------------------------------------

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ba4c20ce/app/addons/indexes/routes-viewindexes.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes-viewindexes.js b/app/addons/indexes/routes-viewindexes.js
index f3bb65b..546d72c 100644
--- a/app/addons/indexes/routes-viewindexes.js
+++ b/app/addons/indexes/routes-viewindexes.js
@@ -37,7 +37,7 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources, RouteCore,
Co
       /* --------------------------------------------------
         remove right header
       ----------------------------------------------------*/
-      this.rightheader && this.rightheader.remove();
+      this.rightHeader && this.rightHeader.remove();
 
       /* --------------------------------------------------
         Insert Preview Screen View
@@ -116,17 +116,6 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources, RouteCore,
Co
 
 
       /* --------------------------------------------------
-        Set up right header
-      ----------------------------------------------------*/
-
-      this.rightheader = this.setView("#api-navbar", new Views.RightHeader({
-        database: this.data.database,
-        model: this.data.database,
-        endpoint: this.data.indexedDocs.urlRef("apiurl", urlParams),
-        documentation: "docs"
-      }));
-
-      /* --------------------------------------------------
         Insert View Editor
       ----------------------------------------------------*/
       this.viewEditor = this.setView("#left-content", new Views.ViewEditor({


Mime
View raw message