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/07/22 16:45:47 UTC

git commit: updated refs/heads/master to 635022b

Updated Branches:
  refs/heads/master 917d89884 -> 635022b27


Fauxton fixes

* Remove unnecessary console.logs
* Add error response to couchserver
* Before render only triggers after view establish


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

Branch: refs/heads/master
Commit: 635022b27cf72efe82bc30f56393070f2b842615
Parents: 917d898
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Jul 22 16:43:16 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Jul 22 16:45:16 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/api.js                         | 2 +-
 src/fauxton/app/modules/documents/resources.js | 1 -
 src/fauxton/app/modules/documents/routes.js    | 1 -
 src/fauxton/tasks/couchserver.js               | 4 +++-
 4 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/635022b2/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index 0f3923e..c4aaaf4 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -284,8 +284,8 @@ function(app, Fauxton) {
         _.each(routeObject.getViews(), function(view, selector) {
           if(view.hasRendered()) { return; }
           if (!view.disableLoader){ $(selector).addClass(view.loaderClassname);}
-          masterLayout.setView(selector, view);
           FauxtonAPI.when(view.establish()).then(function(resp) {
+            masterLayout.setView(selector, view);
             if (!view.disableLoader) $(selector).removeClass(view.loaderClassname);
             masterLayout.renderView(selector);
             }, function(resp) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/635022b2/src/fauxton/app/modules/documents/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/resources.js b/src/fauxton/app/modules/documents/resources.js
index 8fc384e..ef4e1a0 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -109,7 +109,6 @@ function(app, FauxtonAPI) {
       var doc = this.get('doc');
 
       if (doc) {
-        console.log('DOC', doc);
         return new Documents.Doc(doc, {database: this.database});
       } 
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/635022b2/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 a49fa91..caad827 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -73,7 +73,6 @@ function(app, FauxtonAPI, Documents, Databases) {
 
     reRenderDoc: function () {
       this.docView.forceRender();
-      console.log('rerender');
     },
 
     field_editor: function(events) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/635022b2/src/fauxton/tasks/couchserver.js
----------------------------------------------------------------------
diff --git a/src/fauxton/tasks/couchserver.js b/src/fauxton/tasks/couchserver.js
index baf2b30..d9c2a88 100644
--- a/src/fauxton/tasks/couchserver.js
+++ b/src/fauxton/tasks/couchserver.js
@@ -51,7 +51,7 @@ module.exports = function (grunt) {
         filePath = path.join('./',req.url);
       } else if (!!url.match(/\.css|img/)) {
         filePath = path.join(dist_dir,req.url);
-      } else if (!!url.match(/\/js/)) {
+      } else if (!!url.match(/\/js\//)) {
         // serve any javascript or files from dist debug dir
         filePath = path.join(dist_dir,req.url);
       } else if (!!url.match(/\.js$|\.html$/)) {
@@ -70,6 +70,8 @@ module.exports = function (grunt) {
             } else {
               log.writeln('ERROR', filePath, err);
             }
+
+            res.end(err.message);
           })
           .pipe(res);
       }