You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2013/05/22 09:54:43 UTC

git commit: updated refs/heads/master to 7a93945

Updated Branches:
  refs/heads/master 0b2fbd472 -> 7a939451e


Fauxton - add route and masterlayout to RouteObject initialise


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

Branch: refs/heads/master
Commit: 7a939451eb78c52ecba8df06da60a04cb8a45562
Parents: 0b2fbd4
Author: Garren Smith <ga...@gmail.com>
Authored: Wed May 22 09:54:29 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed May 22 09:54:29 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/addons/stats/views.js       |    3 ---
 src/fauxton/app/api.js                      |    2 +-
 src/fauxton/app/modules/documents/routes.js |    6 +++---
 src/fauxton/app/router.js                   |    3 ++-
 4 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7a939451/src/fauxton/app/addons/stats/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/views.js b/src/fauxton/app/addons/stats/views.js
index 9fda708..9dd9cbc 100644
--- a/src/fauxton/app/addons/stats/views.js
+++ b/src/fauxton/app/addons/stats/views.js
@@ -21,7 +21,6 @@ define([
 ],
 
 function(app, FauxtonAPI,Stats) {
-  console.log(arguments);
   Views = {};
 
   datatypeEventer = {};
@@ -69,8 +68,6 @@ function(app, FauxtonAPI,Stats) {
 
         series = _.filter(series, function(d){return d.y > 0;});
         series = _.sortBy(series, function(d){return -d.y;});
-        console.log('series');
-        console.log(series);
 
         nv.addGraph(function() {
             var width = 550,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7a939451/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index 67c3863..d9f9741 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -163,7 +163,7 @@ function(app, Fauxton) {
   });
 
   FauxtonAPI.setSession = function (newSession) {
-    FauxtonAPI.session = newSession;
+    app.session = FauxtonAPI.session = newSession;
     return FauxtonAPI.session.fetchUser();
   };
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7a939451/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 bb8b193..1a75559 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -28,7 +28,7 @@ function(app, FauxtonAPI, Documents, Databases) {
   var DocEditorRouteObject = FauxtonAPI.RouteObject.extend({
     layout: "one_pane",
 
-    initialize: function(options) {
+    initialize: function(route, masterLayout, options) {
       var databaseName = options[0], docID = options[1];
 
       this.database = this.database || new Databases.Model({id: databaseName});
@@ -180,7 +180,7 @@ function(app, FauxtonAPI, Documents, Databases) {
       "database/:database/new_view": "newViewEditor"
     },
 
-    initialize: function (options) {
+    initialize: function (route, masterLayout, options) {
       var docOptions = app.getParams();
       docOptions.include_docs = true;
 
@@ -299,7 +299,7 @@ function(app, FauxtonAPI, Documents, Databases) {
       "database/:database/_changes(:params)": "changes"
     },
 
-    initialize: function (options) {
+    initialize: function (route, masterLayout, options) {
       this.databaseName = options[0];
       this.database = new Databases.Model({id: this.databaseName});
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/7a939451/src/fauxton/app/router.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/router.js b/src/fauxton/app/router.js
index 7587df6..fea1b32 100644
--- a/src/fauxton/app/router.js
+++ b/src/fauxton/app/router.js
@@ -60,7 +60,7 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents
           var args = Array.prototype.slice.call(arguments);
 
           if (!that.activeRouteObject || !that.activeRouteObject.hasRoute(route)) {
-            that.activeRouteObject = new RouteObject(args);
+            that.activeRouteObject = new RouteObject(route, masterLayout, args);
           }
 
           var routeObject = that.activeRouteObject,
@@ -116,6 +116,7 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents
       this.navBar = app.navBar = new Fauxton.NavBar();
       this.apiBar = app.apiBar = new Fauxton.ApiBar();
       this.auth = app.auth = FauxtonAPI.auth;
+      app.session = FauxtonAPI.session;
 
       app.masterLayout = this.masterLayout = new Layout(this.navBar, this.apiBar);
       app.footer = new Fauxton.Footer({el: "#footer-content"});