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/10/28 17:13:18 UTC

[01/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Updated Branches:
  refs/heads/1853-fauxton-route-events 819cacabd -> b70b7aead (forced update)


move erlang-version.escript to EXTRA_DIST


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

Branch: refs/heads/1853-fauxton-route-events
Commit: db743ae66957294d4eb1e6d3b972463da00c1501
Parents: 4a0044f
Author: Jan Lehnardt <ja...@apache.org>
Authored: Fri Oct 4 16:00:39 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Fri Oct 4 16:00:39 2013 +0200

----------------------------------------------------------------------
 bin/Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/db743ae6/bin/Makefile.am
----------------------------------------------------------------------
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 59c69ba..aeb0953 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -15,7 +15,7 @@ MAKE_SAFE = $(MAKE)
 if WINDOWS
 bin_SCRIPTS = couchdb.bat
 else
-bin_SCRIPTS = couchdb couch-config erlang-version.escript
+bin_SCRIPTS = couchdb couch-config
 endif
 
 man1dir = $(mandir)/man1
@@ -32,7 +32,7 @@ endif
 
 BUILT_SOURCES = $(man_file_build)
 
-EXTRA_DIST = $(man_file_build)
+EXTRA_DIST = $(man_file_build) erlang-version.escript
 
 CLEANFILES = $(bin_SCRIPTS) $(man_file_build) $(noinst_SCRIPTS)
 


[08/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
the last line is intentionally left blank to appease POSIX gods


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 100b18216df81ba2a41d5528bc81ff5b8443364d
Parents: f35c03f
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Oct 7 18:17:13 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Oct 7 18:17:13 2013 +0200

----------------------------------------------------------------------
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/100b1821/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index fe9b6d3..f8466b0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,4 +32,4 @@ EXTRA_DIST = \
   my-first-couchdb-plugin/README.md \
   my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src \
   my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl \
-  my-first-couchdb-plugin/test/my_first_couchdb_plugin_tests.erl
\ No newline at end of file
+  my-first-couchdb-plugin/test/my_first_couchdb_plugin_tests.erl


[43/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Highlight possible_ancestors field for /db/_revs_diff response


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

Branch: refs/heads/1853-fauxton-route-events
Commit: fcc6ea9765703e1f774eb095894848427c8a6f19
Parents: e3b0c24
Author: Alexander Shorin <kx...@apache.org>
Authored: Fri Oct 25 21:07:24 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Fri Oct 25 21:07:24 2013 +0400

----------------------------------------------------------------------
 share/doc/src/api/database/misc.rst | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/fcc6ea97/share/doc/src/api/database/misc.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/misc.rst b/share/doc/src/api/database/misc.rst
index e69ce8a..71d1fd9 100644
--- a/share/doc/src/api/database/misc.rst
+++ b/share/doc/src/api/database/misc.rst
@@ -202,9 +202,9 @@ database must be examined.
 
   - In the request, a value is an array of revision IDs for that document.
 
-  - In the response, a value is an object with a "missing": key, whose value
+  - In the response, a value is an object with a ``missing``: key, whose value
     is a list of revision IDs for that document (the ones that are not stored
-    in the database) and optionally a "possible_ancestors" key, whose value is
+    in the database) and optionally a ``possible_ancestors`` key, whose value is
     an array of revision IDs that are known that might be ancestors of
     the missing revisions.
 
@@ -215,7 +215,9 @@ database must be examined.
   :<json object: Mapping of document ID to list of revisions to lookup
   :>header Content-Type: - :mimetype:`application/json`
                          - :mimetype:`text/plain; charset=utf-8`
-  :>json object missing_revs: Mapping of document ID to list of missed revisions
+  :>json array missing: List of missed revisions for specified document
+  :>json array possible_ancestors: List of revisions that *may be* ancestors
+    for specified document and his current revision in requested database
   :code 200: Request completed successfully
   :code 400: Invalid database name or JSON payload
 
@@ -232,7 +234,8 @@ database must be examined.
     {
       "190f721ca3411be7aa9477db5f948bbb": [
         "3-bb72a7682290f94a985f7afac8b27137",
-        "4-10265e5a26d807a3cfa459cf1a82ef2e"
+        "4-10265e5a26d807a3cfa459cf1a82ef2e",
+        "5-067a00dff5e02add41819138abb3284d"
       ]
     }
 
@@ -250,7 +253,11 @@ database must be examined.
     {
       "190f721ca3411be7aa9477db5f948bbb": {
         "missing": [
-          "3-bb72a7682290f94a985f7afac8b27137"
+          "3-bb72a7682290f94a985f7afac8b27137",
+          "5-067a00dff5e02add41819138abb3284d"
+        ],
+        "possible_ancestors": [
+          "4-10265e5a26d807a3cfa459cf1a82ef2e"
         ]
       }
     }


[07/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
[my-first-couchdb-plugin] remove note about ex-Makefile.dist


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

Branch: refs/heads/1853-fauxton-route-events
Commit: f35c03f78a4b8ef90d47aab04fa776175ffbb03a
Parents: cf4f3c9
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Oct 7 17:36:01 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Oct 7 17:36:01 2013 +0200

----------------------------------------------------------------------
 src/my-first-couchdb-plugin/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f35c03f7/src/my-first-couchdb-plugin/README.md
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/README.md b/src/my-first-couchdb-plugin/README.md
index bce2124..814ef3b 100644
--- a/src/my-first-couchdb-plugin/README.md
+++ b/src/my-first-couchdb-plugin/README.md
@@ -36,7 +36,7 @@ Next, install *rebar* from <https://github.com/rebar/rebar>. Rebar is a build to
 
 It doesn’t do much, but you get your first module going. Let’s try to compile it.
 
-`my_first_couchdb_plugin` comes with a `Makefile.dist` that helps you with common tasks. To make your life easier, rename it from `Makefile.dist` to `Makefile`.
+`my_first_couchdb_plugin` comes with a `Makefile` that helps you with common tasks.
 
 To compile your code, simply run:
 


[12/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
[build] ship Vagrantfile in releases


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

Branch: refs/heads/1853-fauxton-route-events
Commit: dddd617db674f6083d2ddb9585154cbafb0d3cb9
Parents: 0b9fef6
Author: Jan Lehnardt <ja...@apache.org>
Authored: Thu Oct 10 14:06:03 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Thu Oct 10 14:06:03 2013 +0200

----------------------------------------------------------------------
 Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/dddd617d/Makefile.am
----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index 527cf18..22809f8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,7 +42,8 @@ EXTRA_DIST = \
     build-aux/dist-error \
     build-aux/sphinx-build \
     build-aux/sphinx-touch \
-    license.skip
+    license.skip \
+    Vagrantfile
 
 AUTHORS.gz: AUTHORS
 	gzip -9 < $< > $@


[29/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Eventually we should clean up these layout files to see which ones actually use tabs


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

Branch: refs/heads/1853-fauxton-route-events
Commit: db3610361fdb0f9089de7cdb9047d401f9221446
Parents: cc94a0d
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 17 13:17:32 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 17 13:17:32 2013 -0400

----------------------------------------------------------------------
 .../app/templates/layouts/one_pane_notabs.html  | 27 ++++++++++++++++++++
 1 file changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/db361036/src/fauxton/app/templates/layouts/one_pane_notabs.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/layouts/one_pane_notabs.html b/src/fauxton/app/templates/layouts/one_pane_notabs.html
new file mode 100644
index 0000000..f58661f
--- /dev/null
+++ b/src/fauxton/app/templates/layouts/one_pane_notabs.html
@@ -0,0 +1,27 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<div id="primary-navbar"></div>
+<div id="dashboard" class="container-fluid one-pane">
+  <div class="fixed-header">
+    <div id="breadcrumbs"></div>
+    <div id="api-navbar"></div>
+  </div>
+
+
+  <div class="row-fluid content-area">
+    <div id="dashboard-content" class="window-resizeable"></div>
+  </div>
+</div>
+


[13/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Api URL documentation fix.
Adding documentation to the models/collections
Hide API url if there is no url on that route


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 5a10e82461393b8ec628f220c40aa51bff8610b5
Parents: dddd617
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 10 11:37:38 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 10 13:40:17 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/addons/activetasks/resources.js |  1 +
 src/fauxton/app/addons/activetasks/routes.js    |  8 +++---
 src/fauxton/app/addons/config/resources.js      |  5 ++--
 src/fauxton/app/addons/config/routes.js         |  2 +-
 src/fauxton/app/addons/logs/resources.js        |  2 ++
 src/fauxton/app/addons/logs/routes.js           |  2 +-
 src/fauxton/app/addons/replication/resources.js |  1 +
 src/fauxton/app/addons/replication/route.js     |  3 ++-
 src/fauxton/app/addons/stats/resources.js       |  3 ++-
 src/fauxton/app/addons/stats/routes.js          |  4 ++-
 src/fauxton/app/api.js                          |  6 ++++-
 src/fauxton/app/helpers.js                      | 14 +++++++---
 src/fauxton/app/modules/databases/resources.js  |  8 +++++-
 src/fauxton/app/modules/databases/routes.js     |  2 +-
 src/fauxton/app/modules/documents/resources.js  | 27 ++++++++++++++------
 src/fauxton/app/modules/documents/routes.js     |  8 +++---
 src/fauxton/app/modules/fauxton/base.js         | 19 +++++++++++---
 src/fauxton/app/templates/fauxton/api_bar.html  |  2 +-
 18 files changed, 82 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/activetasks/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/resources.js b/src/fauxton/app/addons/activetasks/resources.js
index 6d892dd..5646eec 100644
--- a/src/fauxton/app/addons/activetasks/resources.js
+++ b/src/fauxton/app/addons/activetasks/resources.js
@@ -37,6 +37,7 @@ function (app, backbone, Fauxton) {
       "indexer": "Indexer",
       "view_compaction": "View Compaction"
     },
+    documentation: "_active_tasks",
     url: function () {
       return app.host + '/_active_tasks';
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/activetasks/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/routes.js b/src/fauxton/app/addons/activetasks/routes.js
index 03ece47..e0454b7 100644
--- a/src/fauxton/app/addons/activetasks/routes.js
+++ b/src/fauxton/app/addons/activetasks/routes.js
@@ -30,23 +30,23 @@ function (app, FauxtonAPI, Activetasks, Views) {
     {"name": "Active tasks", "link": "activetasks"}
     ],
     apiUrl: function(){
-      return app.host+"/_active_tasks";
+      return [this.newtasks.url(), this.newtasks.documentation];
     }, 
 
     roles: ["_admin"],
 
     defaultView: function(id){
-      var newtasks = new Activetasks.Tasks({
+     this.newtasks = new Activetasks.Tasks({
         currentView: "all", 
         id:'activeTasks'
       });
       this.setView("#sidebar-content", new Views.TabMenu({
         currentView: "all",
-        model: newtasks
+        model: this.newtasks
       })); 
 
       this.setView("#dashboard-content", new Views.DataSection({
-        model: newtasks,
+        model: this.newtasks,
         currentView: "all"
       })); 
     }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/config/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/config/resources.js b/src/fauxton/app/addons/config/resources.js
index db26bb7..14d2474 100644
--- a/src/fauxton/app/addons/config/resources.js
+++ b/src/fauxton/app/addons/config/resources.js
@@ -21,7 +21,8 @@ function (app, FauxtonAPI) {
 
   Config.Model = Backbone.Model.extend({});
   Config.OptionModel = Backbone.Model.extend({
-
+    documentation: "config",
+    
     url: function () {
       return app.host + '/_config/' + this.get("section") + '/' + this.get("name");
     },
@@ -49,7 +50,7 @@ function (app, FauxtonAPI) {
 
   Config.Collection = Backbone.Collection.extend({
     model: Config.Model,
-
+    documentation: "config",
     url: function () {
       return app.host + '/_config';
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/config/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/config/routes.js b/src/fauxton/app/addons/config/routes.js
index f521c53..6af8157 100644
--- a/src/fauxton/app/addons/config/routes.js
+++ b/src/fauxton/app/addons/config/routes.js
@@ -37,7 +37,7 @@ function(app, FauxtonAPI, Config) {
     ],
 
     apiUrl: function () {
-      this.configs.url();
+      return [this.configs.url(), this.configs.documentation];
     },
 
     routes: {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/logs/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/logs/resources.js b/src/fauxton/app/addons/logs/resources.js
index 072290b..3a47b92 100644
--- a/src/fauxton/app/addons/logs/resources.js
+++ b/src/fauxton/app/addons/logs/resources.js
@@ -51,6 +51,8 @@ function (app, FauxtonAPI, Backbone) {
     initialize: function (options) {
       this.params = {bytes: 5000};
     },
+    
+    documentation: "log",
 
     url: function () {
       query = "?" + $.param(this.params);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/logs/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/logs/routes.js b/src/fauxton/app/addons/logs/routes.js
index 7c498b0..5c937af 100644
--- a/src/fauxton/app/addons/logs/routes.js
+++ b/src/fauxton/app/addons/logs/routes.js
@@ -37,7 +37,7 @@ function(app, FauxtonAPI, Log) {
     roles: ["_admin"],
 
     apiUrl: function() {
-      return this.logs.url();
+      return [this.logs.url(), this.logs.documentation];
     },
 
     initialize: function () {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/replication/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/resources.js b/src/fauxton/app/addons/replication/resources.js
index 38ae139..14f255a 100644
--- a/src/fauxton/app/addons/replication/resources.js
+++ b/src/fauxton/app/addons/replication/resources.js
@@ -59,6 +59,7 @@ function (app, FauxtonAPI, ActiveTasks) {
   });
 
   Replication.Replicate = Backbone.Model.extend({
+    documentation: "replication_doc",
     url: function(){
       return app.host + "/_replicate";
     }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/replication/route.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/replication/route.js b/src/fauxton/app/addons/replication/route.js
index 7ea318c..17368f8 100644
--- a/src/fauxton/app/addons/replication/route.js
+++ b/src/fauxton/app/addons/replication/route.js
@@ -26,7 +26,7 @@ function(app, FauxtonAPI, Replication, Views) {
     },
     selectedHeader: "Replication",
     apiUrl: function() {
-      return app.host+"/_replication";
+      return [this.replication.url(), this.replication.documentation];
     },
     crumbs: [
       {"name": "Replicate changes from: ", "link": "replication"}
@@ -34,6 +34,7 @@ function(app, FauxtonAPI, Replication, Views) {
     defaultView: function(dbname){
 			this.databases = new Replication.DBList({});
       this.tasks = new Replication.Tasks({id: "ReplicationTasks"});
+      this.replication = new Replication.Replicate({});
 			this.setView("#dashboard-content", new Views.ReplicationForm({
         selectedDB: dbname ||"",
 				collection: this.databases,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/stats/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/resources.js b/src/fauxton/app/addons/stats/resources.js
index 94be6bb..a761e6b 100644
--- a/src/fauxton/app/addons/stats/resources.js
+++ b/src/fauxton/app/addons/stats/resources.js
@@ -23,7 +23,8 @@ function (app, FauxtonAPI, backbone, _, Fauxton) {
 
   Stats.Collection = Backbone.Collection.extend({
     model: Backbone.Model,
-    url: "/_stats",
+    documentation: "stats",
+    url: app.host+"/_stats",
     parse: function(resp) {
       return _.flatten(_.map(resp, function(doc, key) {
         return _.map(doc, function(v, k){

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/addons/stats/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/routes.js b/src/fauxton/app/addons/stats/routes.js
index 2eeced4..971c111 100644
--- a/src/fauxton/app/addons/stats/routes.js
+++ b/src/fauxton/app/addons/stats/routes.js
@@ -52,7 +52,9 @@ function(app, FauxtonAPI, Stats) {
       return [this.stats.fetch()];
     },
 
-    apiUrl: "_stats"
+    apiUrl: function(){
+      return [ this.stats.url, this.stats.documentation]; 
+    }
   });
 
   Stats.RouteObjects = [StatsRouteObject];

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index 9c2b523..d9f66fe 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -363,7 +363,11 @@ function(app, Fauxton) {
           });
       });
 
-      if (this.get('apiUrl')) masterLayout.apiBar.update(this.get('apiUrl'));
+      if (this.get('apiUrl')){
+        masterLayout.apiBar.update(this.get('apiUrl'));
+      } else {
+        masterLayout.apiBar.hide();
+      }
 
       // Track that we've done a full initial render
       this.renderedState = true;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/helpers.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/helpers.js b/src/fauxton/app/helpers.js
index a8e0698..73a37ca 100644
--- a/src/fauxton/app/helpers.js
+++ b/src/fauxton/app/helpers.js
@@ -35,18 +35,24 @@ function() {
   // Get the URL for documentation, wiki, wherever we store it.
   // update the URLs in documentation_urls.js 
   Helpers.docs =  {
-    "docs": "http://docs.couchdb.org/en/latest/index.html",
+    "docs": "http://docs.couchdb.org/en/latest/intro/api.html#documents",
+    "all_dbs": "http://docs.couchdb.org/en/latest/api/server/common.html?highlight=all_dbs#get--_all_dbs",
     "replication_doc": "http://docs.couchdb.org/en/latest/replication/replicator.html#basics",
     "design_doc": "http://docs.couchdb.org/en/latest/couchapp/ddocs.html#design-docs",
     "view_functions": "http://docs.couchdb.org/en/latest/couchapp/ddocs.html#view-functions",
     "map_functions": "http://docs.couchdb.org/en/latest/couchapp/ddocs.html#map-functions",
     "reduce_functions": "http://docs.couchdb.org/en/latest/couchapp/ddocs.html#reduce-and-rereduce-functions",
     "api_reference": "http://docs.couchdb.org/en/latest/http-api.html",
-    "database_permission": "http://docs.couchdb.org/en/latest/api/database/security.html#db-security"
+    "database_permission": "http://docs.couchdb.org/en/latest/api/database/security.html#db-security",
+    "stats": "http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#get--_stats",
+    "_active_tasks": "http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#active-tasks",
+    "log": "http://docs.couchdb.org/en/latest/api/server/common.html?highlight=stats#log",
+    "config": "http://docs.couchdb.org/en/latest/config/index.html",
+    "views": "http://docs.couchdb.org/en/latest/intro/overview.html#views"
   }; 
   
-  Helpers.getDocUrl = function(doc){
-    return Helpers.docs[doc] || '#';
+  Helpers.getDocUrl = function(docKey){
+    return Helpers.docs[docKey] || '#';
   };
 
   // File size pretty printing, taken from futon.format.js

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/modules/databases/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/resources.js b/src/fauxton/app/modules/databases/resources.js
index f613cdf..6678d49 100644
--- a/src/fauxton/app/modules/databases/resources.js
+++ b/src/fauxton/app/modules/databases/resources.js
@@ -29,6 +29,10 @@ function(app, FauxtonAPI, Documents) {
       });
     },
 
+    documentation: function(){
+      return "all_dbs";
+    },
+    
     buildAllDocs: function(params) {
       this.allDocs = new Documents.AllDocs(null, {
         database: this,
@@ -137,7 +141,9 @@ function(app, FauxtonAPI, Documents) {
   // TODO: shared databases - read from the user doc
   Databases.List = Backbone.Collection.extend({
     model: Databases.Model,
-
+    documentation: function(){
+      return "all_dbs";
+    },
     url: function() {
       return app.host + "/_all_dbs";
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/modules/databases/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/routes.js b/src/fauxton/app/modules/databases/routes.js
index 1977264..ac50b4b 100644
--- a/src/fauxton/app/modules/databases/routes.js
+++ b/src/fauxton/app/modules/databases/routes.js
@@ -37,7 +37,7 @@ function(app, FauxtonAPI, Databases, Views) {
     },
 
     apiUrl: function() {
-      return this.databases.url();
+      return [this.databases.url(), this.databases.documentation()];
     },
 
     selectedHeader: "Databases",

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/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 bbacb0f..901ba83 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -21,7 +21,9 @@ function(app, FauxtonAPI) {
 
   Documents.Doc = Backbone.Model.extend({
     idAttribute: "_id",
-
+    documentation: function(){
+      return "docs";
+    },
     url: function(context) {
       if (context === "app") {
         return this.getDatabase().url("app") + "/" + this.safeID();
@@ -191,7 +193,9 @@ function(app, FauxtonAPI) {
 
   Documents.DdocInfo = Backbone.Model.extend({
     idAttribute: "_id",
-
+    documentation: function(){
+      return "docs";
+    },
     initialize: function (_attrs, options) {
       this.database = options.database;
     },
@@ -220,7 +224,9 @@ function(app, FauxtonAPI) {
 
       return this.id.match(/^_design/) ? "design doc" : "doc";
     },
-
+    documentation: function(){
+      return "docs";
+    },
     url: function(context) {
       if (!this.isEditable()) return false;
 
@@ -249,13 +255,15 @@ function(app, FauxtonAPI) {
       });
 
       return deferred.promise();
-    },
+    }
 
   });
 
   Documents.AllDocs = Backbone.Collection.extend({
     model: Documents.Doc,
-
+    documentation: function(){
+      return "docs";
+    },
     initialize: function(_models, options) {
       this.database = options.database;
       this.params = options.params;
@@ -296,7 +304,6 @@ function(app, FauxtonAPI) {
         delete this.params.startkey;
         delete this.params.startkey_docid;
       }
-
       return this.url('app');
     },
 
@@ -348,7 +355,9 @@ function(app, FauxtonAPI) {
 
   Documents.IndexCollection = Backbone.Collection.extend({
     model: Documents.ViewRow,
-
+    documentation: function(){
+      return "docs";
+    },
     initialize: function(_models, options) {
       this.database = options.database;
       this.params = _.extend({limit: 20, reduce: false}, options.params);
@@ -491,7 +500,9 @@ function(app, FauxtonAPI) {
   
   Documents.PouchIndexCollection = Backbone.Collection.extend({
     model: Documents.ViewRow,
-
+    documentation: function(){
+      return "docs";
+    },
     initialize: function(_models, options) {
       this.database = options.database;
       this.rows = options.rows;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/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 7a75740..572bf1f 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -111,7 +111,7 @@ function(app, FauxtonAPI, Documents, Databases) {
     },
 
     apiUrl: function() {
-      return this.doc.url();
+      return [this.doc.url(), this.doc.documentation()];
     }
   });
 
@@ -219,7 +219,7 @@ function(app, FauxtonAPI, Documents, Databases) {
         {"name": this.data.database.id, "link": Databases.databaseUrl(this.data.database)}
       ];
 
-      this.apiUrl = this.data.database.allDocs.url();
+      this.apiUrl = [this.data.database.allDocs.url(), this.data.database.allDocs.documentation() ];
     },
 
     viewFn: function (databaseName, ddoc, view) {
@@ -270,7 +270,7 @@ function(app, FauxtonAPI, Documents, Databases) {
         ];
       };
 
-      this.apiUrl = this.data.indexedDocs.url();
+      this.apiUrl = [this.data.indexedDocs.url(), "docs"];
     },
 
     newViewEditor: function () {
@@ -388,7 +388,7 @@ function(app, FauxtonAPI, Documents, Databases) {
     },
 
     apiUrl: function() {
-      return this.database.changes.url();
+      return [this.database.changes.url(), this.database.changes.documentation()];
     }
 
   });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/modules/fauxton/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/base.js b/src/fauxton/app/modules/fauxton/base.js
index a4b3a5e..f1d2f70 100644
--- a/src/fauxton/app/modules/fauxton/base.js
+++ b/src/fauxton/app/modules/fauxton/base.js
@@ -190,6 +190,8 @@ function(app, Backbone, resizeColumns) {
     template: "templates/fauxton/api_bar",
     endpoint: '_all_docs',
 
+    documentation: 'docs',
+
     events:  {
       "click .api-url-btn" : "toggleAPIbar"
     },
@@ -207,13 +209,22 @@ function(app, Backbone, resizeColumns) {
     },
 
     serialize: function() {
-      return {endpoint: this.endpoint};
+      return {
+        endpoint: this.endpoint,
+        documentation: this.documentation
+      };
     },
 
+    hide: function(){
+      $(this.el).addClass('hide');
+    },
+    show: function(){
+      $(this.el).removeClass('hide');
+    },
     update: function(endpoint) {
-      // Take endpoint and write it into the api bar.
-      console.log('ApiBar endpoint: ' + endpoint);
-      this.endpoint = endpoint;
+      this.show();
+      this.endpoint = endpoint[0];
+      this.documentation = endpoint[1];
       this.render();
     }
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5a10e824/src/fauxton/app/templates/fauxton/api_bar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/fauxton/api_bar.html b/src/fauxton/app/templates/fauxton/api_bar.html
index cbed3d5..1f03a2c 100644
--- a/src/fauxton/app/templates/fauxton/api_bar.html
+++ b/src/fauxton/app/templates/fauxton/api_bar.html
@@ -20,7 +20,7 @@ the License.
     <div class="input-prepend input-append">
       <span class="add-on">
         API reference
-        <a href="<%=getDocUrl('api_reference')%>" target="_blank">
+        <a href="<%=getDocUrl(documentation)%>" target="_blank">
           <i class="icon-question-sign"></i>
         </a>
       </span>


[20/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Add missed docs files for `make html` output.


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 1cf46213ea1cc204f459e2cb2d5a5d9bca161687
Parents: dd20a0f
Author: Alexander Shorin <kx...@apache.org>
Authored: Tue Oct 15 20:20:57 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Tue Oct 15 20:20:57 2013 +0400

----------------------------------------------------------------------
 share/doc/build/Makefile.am | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1cf46213/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index 30b933e..c4298d3 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -45,6 +45,26 @@ html_files = \
     html/_images/futon-editeddoc.png \
     html/_images/futon-overview.png \
     html/_images/futon-replform.png \
+    html/_images/intro-consistency-01.png \
+    html/_images/intro-consistency-02.png \
+    html/_images/intro-consistency-03.png \
+    html/_images/intro-consistency-04.png \
+    html/_images/intro-consistency-05.png \
+    html/_images/intro-consistency-06.png \
+    html/_images/intro-consistency-07.png \
+    html/_images/intro-tour-01.png \
+    html/_images/intro-tour-02.png \
+    html/_images/intro-tour-03.png \
+    html/_images/intro-tour-04.png \
+    html/_images/intro-tour-05.png \
+    html/_images/intro-tour-06.png \
+    html/_images/intro-tour-07.png \
+    html/_images/intro-tour-08.png \
+    html/_images/intro-tour-09.png \
+    html/_images/intro-tour-10.png \
+    html/_images/intro-why-01.png \
+    html/_images/intro-why-02.png \
+    html/_images/intro-why-03.png \
     html/_images/views-intro-01.png \
     html/_images/views-intro-02.png \
     html/_images/views-intro-03.png \
@@ -93,6 +113,7 @@ html_files = \
     html/_sources/couchapp/views/intro.txt \
     html/_sources/couchapp/views/joins.txt \
     html/_sources/couchapp/views/nosql.txt \
+    html/_sources/couchapp/views/pagination.txt \
     html/_sources/cve/2010-0009.txt \
     html/_sources/cve/2010-2234.txt \
     html/_sources/cve/2010-3854.txt \
@@ -264,11 +285,14 @@ html_files = \
     html/about.html \
     html/config-ref.html \
     html/contents.html \
-    html/externals.html \
+    html/contributing.html \
+    html/download.html \
     html/experimental.html \
+    html/externals.html \
+    html/http-api.html \
+    html/index.html \
     html/json-structure.html \
     html/objects.inv \
-    html/http-api.html \
     html/search.html \
     html/searchindex.js
 


[44/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fixed typo.

Signed-off-by: Alexander Shorin <kx...@apache.org>


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

Branch: refs/heads/1853-fauxton-route-events
Commit: e79dbdd3d250781dd47bde8600af5cac3937b2ac
Parents: fcc6ea9
Author: Michael Wheeler <mp...@gmail.com>
Authored: Fri Oct 25 14:58:38 2013 -0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sat Oct 26 03:07:55 2013 +0400

----------------------------------------------------------------------
 share/doc/src/config/http.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e79dbdd3/share/doc/src/config/http.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/config/http.rst b/share/doc/src/config/http.rst
index f12c40b..1ae3abe 100644
--- a/share/doc/src/config/http.rst
+++ b/share/doc/src/config/http.rst
@@ -530,7 +530,7 @@ Virtual Hosts
 .. config:section:: vhosts :: Virtual Hosts
 
   CouchDB can map requests to different locations based on the ``Host`` header,
-  even if they arrive on the some inbound IP address.
+  even if they arrive on the same inbound IP address.
 
   This allows different virtual hosts on the same machine to map to different
   databases or design documents, etc. The most common use case is to map a


[37/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
started


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 8e297c88d400922f86ef33cfb0bec1b18e9d6c40
Parents: 90b6db9
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Oct 15 18:16:05 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 23 17:48:09 2013 +0200

----------------------------------------------------------------------
 .gitignore                                      |  1 +
 src/fauxton/app/addons/compaction/base.js       | 29 +++++++++
 src/fauxton/app/addons/compaction/resources.js  | 21 +++++++
 src/fauxton/app/addons/compaction/routes.js     | 62 ++++++++++++++++++++
 .../app/addons/compaction/templates/layout.html | 27 +++++++++
 src/fauxton/app/addons/compaction/views.js      | 40 +++++++++++++
 src/fauxton/app/api.js                          | 23 ++++++++
 src/fauxton/app/modules/documents/views.js      |  6 +-
 .../app/templates/documents/sidebar.html        |  3 +
 src/fauxton/app/templates/documents/tabs.html   | 21 -------
 src/fauxton/settings.json.default               |  3 +-
 11 files changed, 213 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 95cf2f3..2d6a17b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -101,6 +101,7 @@ src/fauxton/app/addons/*
 !src/fauxton/app/addons/exampleAuth
 !src/fauxton/app/addons/permissions
 !src/fauxton/app/addons/verifyinstall
+!src/fauxton/app/addons/compaction
 src/fauxton/settings.json*
 !src/fauxton/settings.json.default
 src/ibrowse/ibrowse.app

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/addons/compaction/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/base.js b/src/fauxton/app/addons/compaction/base.js
new file mode 100644
index 0000000..8d93016
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/base.js
@@ -0,0 +1,29 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+  "app",
+  "api",
+  "addons/compaction/routes"
+],
+
+function(app, FauxtonAPI, Compaction) {
+  Compaction.initialize = function() {
+    FauxtonAPI.registerExtension('docLinks', {
+      title: "Compact & Clean", 
+      url: "compact", 
+      icon: "icon-cogs"
+    });
+  };
+
+  return Compaction;
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/resources.js b/src/fauxton/app/addons/compaction/resources.js
new file mode 100644
index 0000000..d0180ef
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/resources.js
@@ -0,0 +1,21 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+  "app",
+  "api"
+],
+
+function (app, FauxtonAPI) {
+  var Compaction = FauxtonAPI.addon();
+  return Compaction;
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/addons/compaction/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/routes.js b/src/fauxton/app/addons/compaction/routes.js
new file mode 100644
index 0000000..e04d386
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/routes.js
@@ -0,0 +1,62 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+       "app",
+
+       "api",
+
+       // Modules
+       "addons/compaction/views",
+       "modules/databases/resources"
+],
+
+function(app, FauxtonAPI, Compaction, Databases) {
+
+  var  CompactionRouteObject = FauxtonAPI.RouteObject.extend({
+    layout: "one_pane",
+
+    crumbs: [
+      {"name": "Compact & Clean", "link": "compact"}
+    ],
+
+    routes: {
+      "database/:database/compact": "compaction"
+    },
+
+    initialize: function(route, masterLayout, options) {
+      var databaseName = options[0];
+
+      this.database = this.database || new Databases.Model({id: databaseName});
+    },
+
+    compaction: function () {
+      this.setView('#dashboard-content', new Compaction.Layout({model: this.database}));
+    },
+
+    establish: function () {
+      return this.database.fetch();
+    }
+
+    /*apiUrl: function() {
+      return [this.compactions.url(), this.compactions.documentation];
+    },*/
+
+  });
+
+  Compaction.RouteObjects = [CompactionRouteObject];
+
+  return Compaction;
+
+});
+
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/addons/compaction/templates/layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/templates/layout.html b/src/fauxton/app/addons/compaction/templates/layout.html
new file mode 100644
index 0000000..56bcbc2
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/templates/layout.html
@@ -0,0 +1,27 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+
+<table class="table table-striped table-bordered">
+  <tbody>
+  <tr> 
+    <td>
+      <h3> Compact Database </h3>
+      <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>
+      <button id="compact-db" class="btn btn-large btn-primary"> Run </button>
+    </td>
+  </tr>
+  </tbody>
+
+</table>
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/addons/compaction/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/views.js b/src/fauxton/app/addons/compaction/views.js
new file mode 100644
index 0000000..67afd5e
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/views.js
@@ -0,0 +1,40 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+       "app",
+
+       "api",
+
+       // Modules
+       "addons/compaction/resources"
+],
+function (app, FauxtonAPI, Compaction) {
+
+  Compaction.Layout = FauxtonAPI.View.extend({
+    template: 'addons/compaction/templates/layout',
+
+    events: {
+      "click compact-db": "compactDB"
+    },
+
+    compactDB: function (event) {
+      event.preventDefault();
+    }
+
+
+  });
+
+
+
+  return Compaction;
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index d9f66fe..96d4586 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -452,6 +452,29 @@ function(app, Fauxton) {
 
   });
 
+  var extensions = _.extend({}, Backbone.Events);
+  // Can look at a remove function later.
+  FauxtonAPI.registerExtension = function (name, view) {
+    if (!extensions[name]) {
+      extensions[name] = [];
+    }
+
+    extensions.trigger('add:' + name, view);
+    extensions[name].push(view);
+  };
+
+  FauxtonAPI.getExtensions = function (name) {
+    var views = extensions[name];
+
+    if (!views) {
+      views = [];
+    }
+
+    return views;
+  };
+
+  FauxtonAPI.extensions = extensions;
+
   app.fauxtonAPI = FauxtonAPI;
   return app.fauxtonAPI;
 });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 283f7b9..eaec296 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1634,13 +1634,17 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     },
 
     serialize: function() {
+      var docLinks = FauxtonAPI.getExtensions('docLinks');
+      console.log(docLinks);
       return {
         changes_url: '#' + this.database.url('changes'),
         permissions_url: '#' + this.database.url('app') + '/permissions',
         db_url: '#' + this.database.url('index') + '?limit=100',
         index: [1,2,3],
         view: [1,2],
-        database: this.collection.database
+        database: this.collection.database,
+        database_url: '#' + this.database.url('app'), 
+        docLinks: docLinks
       };
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index eb01942..881309f 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -25,6 +25,9 @@ the License.
           <li><a class="icon-file" href="<%= db_url %>">Docs</a></li>
           <li><a class="icon-lock" href="<%= permissions_url %>">Permissions</a></li>
           <li><a class="icon-forward" href="<%= changes_url %>">Changes</a></li>
+          <% _.each(docLinks, function (link) { %>
+          <li><a class="<%= link.icon %>" href="<%= database_url + '/' + link.url %>"><%= link.title %></a></li>
+          <% }); %>
         </ul>
       </div>
     </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/app/templates/documents/tabs.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/tabs.html b/src/fauxton/app/templates/documents/tabs.html
index 57e6cb1..f8b0c4b 100644
--- a/src/fauxton/app/templates/documents/tabs.html
+++ b/src/fauxton/app/templates/documents/tabs.html
@@ -14,26 +14,5 @@ the License.
 
 <ul class="nav nav-tabs">
   <li class="active"><a href="<%= db_url %>">Docs</a></li>
-  <!-- TODO::REENABLE
-  <li><a href="#">Permissions</a></li>
-  <li><a href="#">Stats</a></li>
-  -->
   <li id="changes"><a  href="<%= changes_url %>">Changes</a></li>
-  <!-- TODO::REENABLE
-  <div id="search" class="navbar-search span4 nav pull-right input-prepend" style="height:20px;"></div>
-  <!-- TODO: put this styling into less --//>
-  <ul class="nav pull-right" style="margin:5px 10px 0px 10px;">
-    <li>
-      <div class="btn-group">
-        <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
-          <i class="icon icon-cog"></i> Database actions <span class="caret"></span>
-        </a>
-        <ul class="dropdown-menu">
-          <li><a class=""><i class="icon-repeat"></i> Replicate database</a></li>
-          <li><a id="delete-database" class=""><i class="icon-trash"></i> Delete database</a></li>
-        </ul>
-      </div>
-    </li>
-  </ul>
-  -->
 </ul>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/8e297c88/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index ce45e26..54cc0ce 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -8,8 +8,9 @@
   { "name": "plugins" },
   { "name": "contribute" },
   { "name": "permissions" },
-  { "name": "auth" },
   { "name": "verifyinstall" }
+  { "name": "compaction" },
+  { "name": "auth" }
   ],
     "template": {
       "development": {


[19/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fix release version generation for docs.

The logic:
- If you didn't run ./bootstrap the version will be X.Y.Z-dev
- If you did: X.Y.Z+build.hash
- For CouchDB releases - just X.Y.Z (because we remove STAGE/RELEASE
  info from acinclude.m4.in)


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

Branch: refs/heads/1853-fauxton-route-events
Commit: dd20a0fa69e85e985f70e65d6291416d529a2c34
Parents: 08f0009
Author: Alexander Shorin <kx...@apache.org>
Authored: Tue Oct 15 19:18:08 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Tue Oct 15 19:18:08 2013 +0400

----------------------------------------------------------------------
 share/doc/src/conf.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/dd20a0fa/share/doc/src/conf.py
----------------------------------------------------------------------
diff --git a/share/doc/src/conf.py b/share/doc/src/conf.py
index 0c649b8..3d2536e 100644
--- a/share/doc/src/conf.py
+++ b/share/doc/src/conf.py
@@ -24,10 +24,10 @@ _info = {}
 _regex = re.compile('m4_define\(\[(.+)\],\s+\[(.+)\]\)')
 _acinclude_m4 = '../../../acinclude.m4'
 _acinclude_m4_in = '../../../acinclude.m4.in'
-if os.path.exists(_acinclude_m4_in):
-    _source = _acinclude_m4_in
-elif os.path.exists(_acinclude_m4):
+if os.path.exists(_acinclude_m4):
     _source = _acinclude_m4
+elif os.path.exists(_acinclude_m4_in):
+    _source = _acinclude_m4_in
 else:
     _source = None
 if _source is not None:
@@ -50,11 +50,12 @@ release = '.'.join([
     _info['LOCAL_VERSION_MAJOR'],
     _info['LOCAL_VERSION_MINOR'],
     _info['LOCAL_VERSION_REVISION']
-]) + (
-    _info['LOCAL_VERSION_STAGE'] + '' + _info['LOCAL_VERSION_RELEASE']
-    if _info.get('LOCAL_VERSION_RELEASE') == '%revision%'
-    else '-dev'
-)
+])
+
+if _info.get('LOCAL_VERSION_RELEASE') == '.%revision%':
+    release += '-dev'
+elif _info.get('LOCAL_VERSION_RELEASE'):
+    release += _info['LOCAL_VERSION_STAGE'] + _info['LOCAL_VERSION_RELEASE']
 
 project = _info['LOCAL_PACKAGE_NAME']
 


[49/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton fix failing test


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 6c1605ce620191a537d16d8a2a6a32c65ad792c9
Parents: faf215f
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Oct 28 17:02:09 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Oct 28 17:02:09 2013 +0200

----------------------------------------------------------------------
 src/fauxton/test/core/paginateSpec.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c1605ce/src/fauxton/test/core/paginateSpec.js
----------------------------------------------------------------------
diff --git a/src/fauxton/test/core/paginateSpec.js b/src/fauxton/test/core/paginateSpec.js
index 0b3acfb..114c434 100644
--- a/src/fauxton/test/core/paginateSpec.js
+++ b/src/fauxton/test/core/paginateSpec.js
@@ -43,8 +43,8 @@ define([
         collection: collection,
         previousUrlfn: function () {},
         nextUrlfn: function () {},
-        canShowPreviousfn: function () {},
-        canShowNextfn: function () {}
+        canShowPreviousfn: function () { return true; },
+        canShowNextfn: function () { return true;}
       });
       viewSandbox = new ViewSandbox();
       viewSandbox.renderView(paginate); 
@@ -58,6 +58,8 @@ define([
       beforeEach(function () {
         //do this so it doesn't throw an error on other unwired up components
         FauxtonAPI.triggerRouteEvent = function () {};
+        //FauxtonAPI.triggerRouteEvent.restore && FauxtonAPI.triggerRouteEvent.restore();
+        //FauxtonAPI.navigate.restore && FauxtonAPI.navigate.restore(); 
       });
 
       it('Should navigate', function () {


[50/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton: Add routeobject events


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

Branch: refs/heads/1853-fauxton-route-events
Commit: b70b7aead8f8a931cb48920bfae020ef5cd1b95f
Parents: 6c1605c
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Oct 28 17:02:27 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Oct 28 17:02:27 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/api.js                    | 167 +++++++++++++++++--------
 src/fauxton/app/modules/fauxton/layout.js |   2 +-
 src/fauxton/app/router.js                 |   6 +-
 3 files changed, 117 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/b70b7aea/src/fauxton/app/api.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/api.js b/src/fauxton/app/api.js
index 96d4586..6ad95f7 100644
--- a/src/fauxton/app/api.js
+++ b/src/fauxton/app/api.js
@@ -226,6 +226,43 @@ function(app, Fauxton) {
     this.addEvents();
   };
 
+  var broadcaster = {};
+  _.extend(broadcaster, Backbone.Events);
+
+  FauxtonAPI.RouteObject.on = function (eventName, fn) {
+    broadcaster.on(eventName, fn); 
+  };
+  
+  /* How Route Object events work
+   To listen to a specific route objects events:
+
+   myRouteObject = FauxtonAPI.RouteObject.extend({
+    events: {
+      "beforeRender": "beforeRenderEvent"
+    },
+
+    beforeRenderEvent: function (view, selector) {
+      console.log('Hey, beforeRenderEvent triggered',arguments);
+    },
+   });
+
+    It is also possible to listen to events triggered from all Routeobjects. 
+    This is great for more general things like adding loaders, hooks.
+
+    FauxtonAPI.RouteObject.on('beforeRender', function (routeObject, view, selector) {
+      console.log('hey, this will trigger when any routeobject renders a view');
+    });
+
+   Current Events to subscribe to:
+    * beforeFullRender -- before a full render is being done
+    * beforeEstablish -- before the routeobject calls establish
+    * AfterEstablish -- after the routeobject has run establish
+    * beforeRender -- before a view is rendered
+    * afterRender -- a view is finished being rendered
+    * renderComplete -- all rendering is complete
+    
+  */
+
   // Piggy-back on Backbone's self-propagating extend function
   FauxtonAPI.RouteObject.extend = Backbone.Model.extend;
 
@@ -249,15 +286,14 @@ function(app, Fauxton) {
   }, {
 
     renderWith: function(route, masterLayout, args) {
-      var routeObject = this;
-
-      // TODO: Can look at replacing this with events eg beforeRender, afterRender function and events
-      this.route.call(this, route, args);
+      var routeObject = this,
+          triggerBroadcast = _.bind(this.triggerBroadcast, this);
 
       // Only want to redo the template if its a full render
       if (!this.renderedState) {
         masterLayout.setTemplate(this.layout);
-          $('#primary-navbar li').removeClass('active');
+        triggerBroadcast('beforeFullRender');
+        $('#primary-navbar li').removeClass('active');
 
         if (this.selectedHeader) {
           app.selectedHeader = this.selectedHeader;
@@ -274,61 +310,18 @@ function(app, Fauxton) {
         }));
       }
 
-       if (!this.disableLoader){ 
-         var opts = {
-           lines: 16, // The number of lines to draw
-           length: 8, // The length of each line
-           width: 4, // The line thickness
-           radius: 12, // The radius of the inner circle
-           color: '#aaa', // #rbg or #rrggbb
-           speed: 1, // Rounds per second
-           trail: 10, // Afterglow percentage
-           shadow: false // Whether to render a shadow
-         };
-
-         if (!$('.spinner').length) {
-           $('<div class="spinner"></div>')
-            .appendTo('#app-container');
-         }
-
-         var routeObjectSpinner = new Spinner(opts).spin();
-         $('.spinner').append(routeObjectSpinner.el);
-       }
-
+      triggerBroadcast('beforeEstablish');
       FauxtonAPI.when(this.establish()).then(function(resp) {
+        triggerBroadcast('afterEstablish');
         _.each(routeObject.getViews(), function(view, selector) {
           if(view.hasRendered) { return; }
 
-          if (!routeObject.disableLoader) {
-            routeObjectSpinner.stop();
-            $('.spinner').remove();
-          }
-
-          if (!view.disableLoader){ 
-            var opts = {
-              lines: 16, // The number of lines to draw
-              length: 8, // The length of each line
-              width: 4, // The line thickness
-              radius: 12, // The radius of the inner circle
-              color: '#ccc', // #rbg or #rrggbb
-              speed: 1, // Rounds per second
-              trail: 10, // Afterglow percentage
-              shadow: false // Whether to render a shadow
-            };
-            var viewSpinner = new Spinner(opts).spin();
-            $('<div class="spinner"></div>')
-              .appendTo(selector)
-              .append(viewSpinner.el);
-          }
-          
+          triggerBroadcast('beforeRender', view, selector);
           FauxtonAPI.when(view.establish()).then(function(resp) {
             masterLayout.setView(selector, view);
 
-            if (!view.disableLoader){
-              viewSpinner.stop();
-            }
-
             masterLayout.renderView(selector);
+            triggerBroadcast('afterRender', view, selector);
             }, function(resp) {
               view.establishError = {
                 error: true,
@@ -346,14 +339,14 @@ function(app, Fauxton) {
               masterLayout.renderView(selector);
           });
 
-          var hooks = masterLayout.hooks[selector];
+          /*var hooks = masterLayout.hooks[selector];
           var boundRoute = route;
 
           _.each(hooks, function(hook){
             if (_.any(hook.routes, function(route){return route == boundRoute;})){
               hook.callback(view);
             }
-          });
+          });*/
         });
       }.bind(this), function (resp) {
           if (!resp) { return; }
@@ -371,6 +364,15 @@ function(app, Fauxton) {
 
       // Track that we've done a full initial render
       this.renderedState = true;
+      triggerBroadcast('renderComplete');
+    },
+
+    triggerBroadcast: function (eventName) {
+      var args = Array.prototype.slice.call(arguments);
+      this.trigger.apply(this, args);
+
+      args.splice(0,1, eventName, this);
+      broadcaster.trigger.apply(broadcaster, args);
     },
 
     get: function(key) {
@@ -452,6 +454,63 @@ function(app, Fauxton) {
 
   });
 
+  // We could look at moving the spinner code out to its own module
+  var routeObjectSpinner;
+  FauxtonAPI.RouteObject.on('beforeEstablish', function (routeObject) {
+    if (!routeObject.disableLoader){ 
+      var opts = {
+        lines: 16, // The number of lines to draw
+        length: 8, // The length of each line
+        width: 4, // The line thickness
+        radius: 12, // The radius of the inner circle
+        color: '#aaa', // #rbg or #rrggbb
+        speed: 1, // Rounds per second
+        trail: 10, // Afterglow percentage
+        shadow: false // Whether to render a shadow
+     };
+
+     if (!$('.spinner').length) {
+       $('<div class="spinner"></div>')
+        .appendTo('#app-container');
+     }
+
+     routeObjectSpinner = new Spinner(opts).spin();
+     $('.spinner').append(routeObjectSpinner.el);
+   }
+  });
+
+  var viewSpinner;
+  FauxtonAPI.RouteObject.on('beforeRender', function (routeObject, view, selector) {
+    if (!routeObject.disableLoader) {
+      routeObjectSpinner.stop();
+      $('.spinner').remove();
+    }
+
+    if (!view.disableLoader){ 
+      var opts = {
+        lines: 16, // The number of lines to draw
+        length: 8, // The length of each line
+        width: 4, // The line thickness
+        radius: 12, // The radius of the inner circle
+        color: '#ccc', // #rbg or #rrggbb
+        speed: 1, // Rounds per second
+        trail: 10, // Afterglow percentage
+        shadow: false // Whether to render a shadow
+      };
+
+      viewSpinner = new Spinner(opts).spin();
+      $('<div class="spinner"></div>')
+        .appendTo(selector)
+        .append(viewSpinner.el);
+    }
+  });
+
+  FauxtonAPI.RouteObject.on('afterRender', function (routeObject, view, selector) {
+    if (!view.disableLoader){
+      viewSpinner.stop();
+    }
+  });
+
   var extensions = _.extend({}, Backbone.Events);
   // Can look at a remove function later.
   FauxtonAPI.registerExtension = function (name, view) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b70b7aea/src/fauxton/app/modules/fauxton/layout.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/layout.js b/src/fauxton/app/modules/fauxton/layout.js
index 47281e7..1422241 100644
--- a/src/fauxton/app/modules/fauxton/layout.js
+++ b/src/fauxton/app/modules/fauxton/layout.js
@@ -37,7 +37,7 @@ function(Backbone) {
     });
 
     this.layoutViews = {};
-    this.hooks = {};
+    //this.hooks = {};
 
     this.el = this.layout.el;
   };

http://git-wip-us.apache.org/repos/asf/couchdb/blob/b70b7aea/src/fauxton/app/router.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/router.js b/src/fauxton/app/router.js
index 509cff4..9dac80c 100644
--- a/src/fauxton/app/router.js
+++ b/src/fauxton/app/router.js
@@ -97,7 +97,7 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents
       }, this);
     },
 
-    setAddonHooks: function() {
+    /*setAddonHooks: function() {
       _.each(LoadAddons.addons, function(module) {
         // This is updates to views by the addon
         if (module && module.hooks){
@@ -110,7 +110,7 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents
           }, this);
         }
       }, this);
-    },
+    },*/
 
     initialize: function() {
       //TODO: It would be nice to handle this with a router
@@ -124,7 +124,7 @@ function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents
 
       // NOTE: This must be below creation of the layout
       // FauxtonAPI header links and others depend on existence of the layout
-      this.setAddonHooks();
+      //this.setAddonHooks();
       this.setModuleRoutes();
 
       $("#app-container").html(this.masterLayout.el);


[45/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Update /db/_bulk_docs docs for HTTP 417 response, examples and markup


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 22d40270b14296caed78a8b3818662629acccbfe
Parents: e79dbdd
Author: Alexander Shorin <kx...@apache.org>
Authored: Sat Oct 26 04:55:40 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sat Oct 26 04:55:40 2013 +0400

----------------------------------------------------------------------
 share/doc/src/api/database/bulk-api.rst | 274 ++++++++++++++++-----------
 1 file changed, 159 insertions(+), 115 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/22d40270/share/doc/src/api/database/bulk-api.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/bulk-api.rst b/share/doc/src/api/database/bulk-api.rst
index 2e3919a..b274d84 100644
--- a/share/doc/src/api/database/bulk-api.rst
+++ b/share/doc/src/api/database/bulk-api.rst
@@ -211,25 +211,25 @@
   :<header Content-Type: :mimetype:`application/json`
   :<header X-Couch-Full-Commit: Overrides server's
     :config:option:`commit policy <couchdb/delayed_commits>`. Possible values
-    are: ``false`` and ``true``. *Optional*.
+    are: ``false`` and ``true``. *Optional*
   :<json boolean all_or_nothing: Sets the database commit mode to use
-    `all-or-nothing` semantics. Default is ``false``. *Optional*.
+    :ref:`all-or-nothing <api/db/bulk_docs/semantics>` semantics.
+    Default is ``false``. *Optional*
   :<json array docs: List of documents objects
   :<json boolean new_edits: If ``false``, prevents the database from assigning
-    them new revision IDs. Default is ``true``. *Optional*.
+    them new revision IDs. Default is ``true``. *Optional*
   :>header Content-Type: - :mimetype:`application/json`
                          - :mimetype:`text/plain; charset=utf-8`
   :>jsonarr string id: Document ID
-  :>jsonarr string rev: New document revision token. *Optional*. Available
-    if document have saved without errors.
-  :>jsonarr string error: Error type. *Optional*.
-  :>jsonarr string reason: Error reason. *Optional*.
+  :>jsonarr string rev: New document revision token. Available
+    if document have saved without errors. *Optional*
+  :>jsonarr string error: Error type. *Optional*
+  :>jsonarr string reason: Error reason. *Optional*
   :code 201: Document(s) have been created or updated
-  :code 400: The request provided invalid JSON data. Check that your data
-    is both ``utf-8`` and complies to the `JSON specification`_. Tools such as
-    `yajl`_ are available on all platforms that CouchDB runs on to assist with
-    validation and pretty printing.
-  :code 500: Malformed data provided
+  :code 400: The request provided invalid JSON data
+  :code 417: Occurs when ``all_or_nothing`` option set as ``true`` and
+    at least one document was rejected by :ref:`validation function <vdufun>`
+  :code 500: Malformed data provided, while it's still valid JSON
 
   **Request**:
 
@@ -278,9 +278,6 @@
       }
     ]
 
-.. _JSON specification: http://json.org/
-.. _yajl: http://lloyd.github.io/yajl/
-
 
 Inserting Documents in Bulk
 ---------------------------
@@ -294,64 +291,78 @@ the only transaction boundary within CouchDB is a single update to a single
 database. The constraints are detailed in :ref:`api/db/bulk_docs/semantics`.
 
 To insert documents in bulk into a database you need to supply a JSON
-structure with the array of documents that you want to add to the
-database. You can either include a document ID, or allow the document ID to be
+structure with the array of documents that you want to add to the database.
+You can either include a document ID, or allow the document ID to be
 automatically generated.
 
 For example, the following update inserts three new documents, two with the
 supplied document IDs, and one which will have a document ID generated:
 
-.. code-block:: javascript
+.. code-block:: http
+
+  POST /source/_bulk_docs HTTP/1.1
+  Accept: application/json
+  Content-Length: 323
+  Content-Type: application/json
+  Host: localhost:5984
 
-    {
-       "docs" : [
+  {
+      "docs": [
           {
-             "_id" : "FishStew",
-             "servings" : 4,
-             "subtitle" : "Delicious with fresh bread",
-             "title" : "Fish Stew"
+              "_id": "FishStew",
+              "servings": 4,
+              "subtitle": "Delicious with freshly baked bread",
+              "title": "FishStew"
           },
           {
-             "_id" : "LambStew",
-             "servings" : 6,
-             "subtitle" : "Delicious with scone topping",
-             "title" : "Lamb Stew"
+              "_id": "LambStew",
+              "servings": 6,
+              "subtitle": "Serve with a whole meal scone topping",
+              "title": "LambStew"
           },
           {
-             "servings" : 8,
-             "subtitle" : "Delicious with suet dumplings",
-             "title" : "Beef Stew"
-          },
-       ]
-    }
+              "_id": "BeefStew",
+              "servings": 8,
+              "subtitle": "Hand-made dumplings make a great accompaniment",
+              "title": "BeefStew"
+          }
+      ]
+  }
 
 
-The return type from a bulk insertion will be 201, with the content of
-the returned structure indicating specific success or otherwise messages
-on a per-document basis.
+The return type from a bulk insertion will be :statuscode:`201`,
+with the content of the returned structure indicating specific success
+or otherwise messages on a per-document basis.
 
 The return structure from the example above contains a list of the
 documents created, here with the combination and their revision IDs:
 
 .. code-block:: http
 
-    POST http://couchdb:5984/recipes/_bulk_docs
-    Content-Type: application/json
+  HTTP/1.1 201 Created
+  Cache-Control: must-revalidate
+  Content-Length: 215
+  Content-Type: application/json
+  Date: Sat, 26 Oct 2013 00:10:39 GMT
+  Server: CouchDB (Erlang OTP)
 
-    [
-       {
-          "id" : "FishStew",
-          "rev" : "1-9c65296036141e575d32ba9c034dd3ee",
-       },
-       {
-          "id" : "LambStew",
-          "rev" : "1-34c318924a8f327223eed702ddfdc66d",
-       },
-       {
-          "id" : "7f7638c86173eb440b8890839ff35433",
-          "rev" : "1-857c7cbeb6c8dd1dd34a0c73e8da3c44",
-       }
-    ]
+  [
+      {
+          "id": "FishStew",
+          "ok": true,
+          "rev": "1-6a466d5dfda05e613ba97bd737829d67"
+      },
+      {
+          "id": "LambStew",
+          "ok": true,
+          "rev": "1-648f1b989d52b8e43f05aa877092cc7c"
+      },
+      {
+          "id": "BeefStew",
+          "ok": true,
+          "rev": "1-e4602845fc4c99674f50b1d5a804fdfa"
+      }
+  ]
 
 
 The content and structure of the returned JSON will depend on the transaction
@@ -370,62 +381,76 @@ For example, you could send the following request:
 
 .. code-block:: http
 
-    POST http://couchdb:5984/recipes/_bulk_docs
-    Content-Type: application/json
+  POST /recipes/_bulk_docs HTTP/1.1
+  Accept: application/json
+  Content-Length: 464
+  Content-Type: application/json
+  Host: localhost:5984
 
-    {
-       "docs" : [
+  {
+      "docs": [
           {
-             "_id" : "FishStew",
-             "_rev" : "1-9c65296036141e575d32ba9c034dd3ee",
-             "servings" : 4,
-             "subtitle" : "Delicious with freshly baked bread",
-             "title" : "Fish Stew"
+              "_id": "FishStew",
+              "_rev": "1-6a466d5dfda05e613ba97bd737829d67",
+              "servings": 4,
+              "subtitle": "Delicious with freshly baked bread",
+              "title": "FishStew"
           },
           {
-             "_id" : "LambStew",
-             "_rev" : "1-34c318924a8f327223eed702ddfdc66d",
-             "servings" : 6,
-             "subtitle" : "Serve with a wholemeal scone topping",
-             "title" : "Lamb Stew"
+              "_id": "LambStew",
+              "_rev": "1-648f1b989d52b8e43f05aa877092cc7c",
+              "servings": 6,
+              "subtitle": "Serve with a whole meal scone topping",
+              "title": "LambStew"
           },
           {
-             "_id" : "7f7638c86173eb440b8890839ff35433"
-             "_rev" : "1-857c7cbeb6c8dd1dd34a0c73e8da3c44",
-             "servings" : 8,
-             "subtitle" : "Hand-made dumplings make a great accompaniment",
-             "title" : "Beef Stew"
+              "_id": "BeefStew",
+              "_rev": "1-e4602845fc4c99674f50b1d5a804fdfa",
+              "servings": 8,
+              "subtitle": "Hand-made dumplings make a great accompaniment",
+              "title": "BeefStew"
           }
-       ]
-    }
+      ]
+  }
 
 The return structure is the JSON of the updated documents, with the new
 revision and ID information:
 
-.. code-block:: javascript
+.. code-block:: http
+
+  HTTP/1.1 201 Created
+  Cache-Control: must-revalidate
+  Content-Length: 215
+  Content-Type: application/json
+  Date: Sat, 26 Oct 2013 00:10:39 GMT
+  Server: CouchDB (Erlang OTP)
+
+  [
+      {
+          "id": "FishStew",
+          "ok": true,
+          "rev": "2-2bff94179917f1dec7cd7f0209066fb8"
+      },
+      {
+          "id": "LambStew",
+          "ok": true,
+          "rev": "2-6a7aae7ac481aa98a2042718d09843c4"
+      },
+      {
+          "id": "BeefStew",
+          "ok": true,
+          "rev": "2-9801936a42f06a16f16c30027980d96f"
+      }
+  ]
 
-    [
-       {
-          "id" : "FishStew",
-          "rev" : "2-e7af4c4e9981d960ecf78605d79b06d1"
-       },
-       {
-          "id" : "LambStew",
-          "rev" : "2-0786321986194c92dd3b57dfbfc741ce"
-       },
-       {
-          "id" : "7f7638c86173eb440b8890839ff35433",
-          "rev" : "2-bdd3bf3563bee516b96885a66c743f8e"
-       }
-    ]
 
 You can optionally delete documents during a bulk update by adding the
 ``_deleted`` field with a value of ``true`` to each document ID/revision
 combination within the submitted JSON structure.
 
-The return type from a bulk insertion will be :code:`201`, with the content of
-the returned structure indicating specific success or otherwise messages
-on a per-document basis.
+The return type from a bulk insertion will be :statuscode:`201`, with the
+content of the returned structure indicating specific success or otherwise
+messages on a per-document basis.
 
 The content and structure of the returned JSON will depend on the transaction
 semantics being used for the bulk update; see :ref:`api/db/bulk_docs/semantics`
@@ -442,9 +467,9 @@ documents using the bulk documentation system. Each mode affects both
 the state of the documents in the event of system failure, and the level
 of conflict checking performed on each document. The two modes are:
 
--  ``non-atomic``
+-  **non-atomic**
 
-   The default mode is non-atomic, that is, CouchDB will only guarantee
+   The default mode is `non-atomic`, that is, CouchDB will only guarantee
    that some of the documents will be saved when you send the request.
    The response will contain the list of documents successfully inserted
    or updated during the process. In the event of a crash, some of the
@@ -470,7 +495,7 @@ of conflict checking performed on each document. The two modes are:
              "reason" : "Document update conflict."
           },
           {
-             "id" : "7f7638c86173eb440b8890839ff35433",
+             "id" : "BeefStew",
              "error" : "conflict",
              "reason" : "Document update conflict."
           }
@@ -481,9 +506,9 @@ of conflict checking performed on each document. The two modes are:
    submit the document update, with the correct revision tag, to update
    the document.
 
--  ``all-or-nothing``
+-  **all-or-nothing**
 
-   In all-or-nothing mode, either all documents are written to the
+   In `all-or-nothing` mode, either all documents are written to the
    database, or no documents are written to the database, in the event
    of a system failure during commit.
 
@@ -493,22 +518,32 @@ of conflict checking performed on each document. The two modes are:
    The returned structure contains the list of documents with new
    revisions:
 
-   .. code-block:: javascript
+   .. code-block:: http
 
-       [
+      HTTP/1.1 201 Created
+      Cache-Control: must-revalidate
+      Content-Length: 215
+      Content-Type: application/json
+      Date: Sat, 26 Oct 2013 00:13:33 GMT
+      Server: CouchDB (Erlang OTP)
+
+      [
           {
-             "id" : "FishStew",
-             "rev" : "2-e7af4c4e9981d960ecf78605d79b06d1"
+              "id": "FishStew",
+              "ok": true,
+              "rev": "1-6a466d5dfda05e613ba97bd737829d67"
           },
           {
-             "id" : "LambStew",
-             "rev" : "2-0786321986194c92dd3b57dfbfc741ce"
+              "id": "LambStew",
+              "ok": true,
+              "rev": "1-648f1b989d52b8e43f05aa877092cc7c"
           },
           {
-             "id" : "7f7638c86173eb440b8890839ff35433",
-             "rev" : "2-bdd3bf3563bee516b96885a66c743f8e"
+              "id": "BeefStew",
+              "ok": true,
+              "rev": "1-e4602845fc4c99674f50b1d5a804fdfa"
           }
-       ]
+      ]
 
    When updating documents using this mode the revision of a document
    included in views will be arbitrary. You can check the conflict
@@ -545,7 +580,7 @@ summarized below:
 Replication of documents is independent of the type of insert or update.
 The documents and revisions created during a bulk insert or update are
 replicated in the same way as any other document. This can mean that if
-you make use of the all-or-nothing mode the exact list of documents,
+you make use of the `all-or-nothing` mode the exact list of documents,
 revisions (and their conflict state) may or may not be replicated to
 other databases correctly.
 
@@ -565,7 +600,7 @@ database because of an error, you should check the ``error`` field to
 determine error type and course of action. Errors will be one of the
 following type:
 
--  ``conflict``
+-  **conflict**
 
    The document as submitted is in conflict. If you used the default
    bulk transaction mode then the new revision will not have been
@@ -577,23 +612,32 @@ following type:
    is identical to the resolution procedures used when resolving
    conflict errors during replication.
 
--  ``forbidden``
+-  **forbidden**
 
    Entries with this error type indicate that the validation routine
    applied to the document during submission has returned an error.
 
-   For example, if your validation routine includes the following:
+   For example, if your :ref:`validation routine <vdufun>` includes
+   the following:
 
    .. code-block:: javascript
 
         throw({forbidden: 'invalid recipe ingredient'});
 
-   The error returned will be:
+   The error response returned will be:
 
-   .. code-block:: javascript
+   .. code-block:: http
+
+       HTTP/1.1 417 Expectation Failed
+       Cache-Control: must-revalidate
+       Content-Length: 120
+       Content-Type: application/json
+       Date: Sat, 26 Oct 2013 00:05:17 GMT
+       Server: CouchDB (Erlang OTP)
 
        {
-          "id" : "7f7638c86173eb440b8890839ff35433",
-          "error" : "forbidden",
-          "reason" : "invalid recipe ingredient"
+           "error": "forbidden",
+           "id": "LambStew",
+           "reason": "invalid recipe ingredient",
+           "rev": "1-34c318924a8f327223eed702ddfdc66d"
        }


[05/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
[my-first-couchdb-plugin] use Apache 2 License


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 18d5fd67c0c047bfc439c614eca6a94092d20b1b
Parents: db743ae
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Oct 7 17:18:52 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Oct 7 17:18:52 2013 +0200

----------------------------------------------------------------------
 license.skip                                            |  6 +++++-
 .../src/my_first_couchdb_plugin.app.src                 | 12 ++++++++++++
 .../src/my_first_couchdb_plugin.erl                     | 12 ++++++++++++
 3 files changed, 29 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/18d5fd67/license.skip
----------------------------------------------------------------------
diff --git a/license.skip b/license.skip
index 686e032..3321a6d 100644
--- a/license.skip
+++ b/license.skip
@@ -137,7 +137,11 @@
 ^src/fauxton/app/addons/permissions/assets/less/permissions.less
 ^src/ibrowse/.*
 ^src/mochiweb/.*
-^src/my-first-couchdb-plugin/.*
+^src/my-first-couchdb-plugin/priv/*/*
+^src/my-first-couchdb-plugin/README.md
+^src/my-first-couchdb-plugin/.gitignore
+^src/my-first-couchdb-plugin/Makefile
+^src/my-first-couchdb-plugin/Makefile.in
 ^src/snappy/.*
 ^stamp-h1
 ^test/Makefile

http://git-wip-us.apache.org/repos/asf/couchdb/blob/18d5fd67/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src b/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src
index 01ce897..9a24bf8 100644
--- a/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src
+++ b/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src
@@ -1,3 +1,15 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
 %% -*- mode: erlang -*-
 {application, my_first_couchdb_plugin, [
     {description, "My First CouchDB Plugin"},

http://git-wip-us.apache.org/repos/asf/couchdb/blob/18d5fd67/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl b/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl
index b1bdd04..64d728c 100644
--- a/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl
+++ b/src/my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl
@@ -1,3 +1,15 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
 -module(my_first_couchdb_plugin).
 
 -export([my_func/0]).


[28/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
View Delete was broken


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

Branch: refs/heads/1853-fauxton-route-events
Commit: cc94a0d21092ecfcbf3347004873b3a65b417a0f
Parents: 4ecb639
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 17 13:05:24 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 17 13:05:24 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js           | 4 +++-
 src/fauxton/app/templates/documents/view_editor.html | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/cc94a0d2/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 9f665e5..2f3b694 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1106,7 +1106,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
     events: {
       "click button.save": "saveView",
-      "click button.delete": "deleteView",
+      "click button.cancel-button": "deleteView",
       "change select#reduce-function-selector": "updateReduce",
       "change select#ddoc": "updateDesignDoc",
       "click #db-views-tabs-nav": 'toggleIndexNav'
@@ -1575,6 +1575,8 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         this.ddocID = options.ddocInfo.id;
         this.currView = options.ddocInfo.currView;
       }
+      // this.listenTo(this.collection, "add", this.render);
+      // this.listenTo(this.collection, "remove", this.render);
     },
 
     deleteDatabase: function (event) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/cc94a0d2/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index 64f0f98..f75edc5 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -91,7 +91,7 @@ the License.
           <div class="control-group">
             <button class="button green save fonticon-circle-check">Save</button>
             <% if (!this.newView) { %>
-            <button class="button cancel-button outlineGray fonticon-circle-x">Delete</button>
+            <button class="button delete outlineGray fonticon-circle-x">Delete</button>
             <% } %>
           </div>
           <div class="clearfix"></div>


[03/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
add pointer to DEVELOPERS to INSTALL


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

Branch: refs/heads/1853-fauxton-route-events
Commit: cdf852d14e050a62423e28d54e90e4a51c1ad181
Parents: 2e081e0
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Oct 7 11:16:15 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Oct 7 11:17:38 2013 +0200

----------------------------------------------------------------------
 INSTALL.Unix | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/cdf852d1/INSTALL.Unix
----------------------------------------------------------------------
diff --git a/INSTALL.Unix b/INSTALL.Unix
index 251c98d..47cc863 100644
--- a/INSTALL.Unix
+++ b/INSTALL.Unix
@@ -6,6 +6,9 @@ A high-level guide to Unix-like systems, inc. Mac OS X and Ubuntu.
 Community installation guides are available on the wiki:
 
     http://wiki.apache.org/couchdb/Installation
+
+If you are trying to build CouchDB from a git checkout rather than
+a .tar.gz, see the `DEVELOPERS` file.
     
 This document is the canonical source of installation information. However, many
 systems have gotchas that you need to be aware of. In addition, dependencies


[16/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Temporary fix for quick search form layout on RTD site.


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

Branch: refs/heads/1853-fauxton-route-events
Commit: d43c300428c0e670c17f7e8cf0d3997a3b907fe7
Parents: f55fc97
Author: Alexander Shorin <kx...@apache.org>
Authored: Mon Oct 14 15:51:51 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Mon Oct 14 15:51:51 2013 +0400

----------------------------------------------------------------------
 share/doc/static/rtd.css | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/d43c3004/share/doc/static/rtd.css
----------------------------------------------------------------------
diff --git a/share/doc/static/rtd.css b/share/doc/static/rtd.css
index 4856066..19689eb 100644
--- a/share/doc/static/rtd.css
+++ b/share/doc/static/rtd.css
@@ -29,7 +29,7 @@
 /* PAGE LAYOUT -------------------------------------------------------------- */
 
 body {
-    font: 100%/1.5 "ff-meta-web-pro-1","ff-meta-web-pro-2",Arial,"Helvetica Neue",sans-serif; 
+    font: 100%/1.5 "ff-meta-web-pro-1","ff-meta-web-pro-2",Arial,"Helvetica Neue",sans-serif;
     text-align: center;
     color: black;
     background-color: #465158;
@@ -604,7 +604,7 @@ p {
 /* MOBILE LAYOUT -------------------------------------------------------------- */
 
 @media screen and (max-width: 600px) {
-    
+
     h1, h2, h3, h4, h5 {
         position: relative;
     }
@@ -764,7 +764,7 @@ p {
 
     table.indextable {
         display: block;
-        width: auto; 
+        width: auto;
     }
 
     .indextable tr {
@@ -793,3 +793,9 @@ p {
     }
 
 }
+
+/* Override RTD basic.css
+Fix style for quick search bar. This is temporary solution.*/
+div.sphinxsidebar #searchbox input[type="text"] {
+    width: 140px;
+}


[48/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton: Hide new view when no docs in database


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

Branch: refs/heads/1853-fauxton-route-events
Commit: faf215fbed40f881a9362a97998cd2664e0d2389
Parents: 9e5e3a5
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Oct 28 14:57:07 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Oct 28 14:57:07 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/routes.js     | 15 ++++++--
 src/fauxton/app/modules/documents/views.js      | 38 ++++++--------------
 .../app/templates/documents/sidebar.html        | 12 ++++---
 3 files changed, 31 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/faf215fb/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 df8c07d..fae5c5c 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -21,9 +21,6 @@ define([
 ],
 
 function(app, FauxtonAPI, Documents, Databases) {
-  // TODO: look at using:
-  // var Documents = require("modules/documents/models_collections");
-  // var Databases = require("modules/databases/module");
 
   var DocEditorRouteObject = FauxtonAPI.RouteObject.extend({
     layout: "one_pane",
@@ -203,6 +200,9 @@ function(app, FauxtonAPI, Documents, Databases) {
       }
 
       if (this.viewEditor) { this.viewEditor.remove(); }
+      
+      this.listenTo(this.data.database.allDocs, 'reset', this.checkExistingDocs);
+      this.listenTo(this.data.database.allDocs, 'remove', this.checkExistingDocs);
 
       this.toolsView = this.setView("#dashboard-upper-menu", new Documents.Views.JumpToDoc({
         database: this.data.database,
@@ -360,7 +360,16 @@ function(app, FauxtonAPI, Documents, Databases) {
       if (event && event.selectedTab) {
         this.sidebar.setSelectedTab(event.selectedTab);
       }
+    },
+
+    checkExistingDocs: function () {
+      if (this.data.database.allDocs.length > 0) {
+        this.sidebar.toggleNewView(true);
+      } else {
+        this.sidebar.toggleNewView(false);
+      }
     }
+
   });
 
   var ChangesRouteObject = FauxtonAPI.RouteObject.extend({

http://git-wip-us.apache.org/repos/asf/couchdb/blob/faf215fb/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 55ca405..f822544 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -683,7 +683,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
       this.insertView('#documents-pagination', this.pagination);
       var docs = this.expandDocs ? this.collection : this.collection.simple();
-      console.log('docs', docs);
 
       docs.each(function(doc) {
         this.rows[doc.id] = this.insertView("table.all-docs tbody", new this.nestedView({
@@ -1633,18 +1632,16 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
   Views.Sidebar = FauxtonAPI.View.extend({
     template: "templates/documents/sidebar",
     events: {
-      "click a.new#index": "newIndex",
       "click button#delete-database": "deleteDatabase"
     },
 
     initialize: function(options) {
       this.database = options.database;
+      this.showNewView = true;
       if (options.ddocInfo) {
         this.ddocID = options.ddocInfo.id;
         this.currView = options.ddocInfo.currView;
       }
-      // this.listenTo(this.collection, "add", this.render);
-      // this.listenTo(this.collection, "remove", this.render);
     },
 
     deleteDatabase: function (event) {
@@ -1674,34 +1671,14 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         changes_url: '#' + this.database.url('changes'),
         permissions_url: '#' + this.database.url('app') + '/permissions',
         db_url: '#' + this.database.url('index') + '?limit=100',
-        index: [1,2,3],
-        view: [1,2],
         database: this.collection.database,
         database_url: '#' + this.database.url('app'), 
-        docLinks: docLinks
+        docLinks: docLinks,
+        showNewView: this.showNewView
       };
     },
 
-    newIndex:  function(event){
-      event.preventDefault();
-      $.contribute(
-        'Create a new view.',
-        'app/addons/documents/views.js'
-      );
-    },
-
-    toggleView: function(event){
-      event.preventDefault();
-      $.contribute(
-        'Filter data by type or view',
-        'app/addons/databases/views.js'
-      );
-      url = event.currentTarget.href.split('#')[1];
-      app.router.navigate(url);
-    },
-
     buildIndexList: function(collection, selector, design){
-
       _.each(_.keys(collection), function(key){
         var selected = this.ddocID == "_design/"+design;
         this.insertView("ul.nav." + selector, new Views.IndexItem({
@@ -1734,8 +1711,15 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       this.selectedTab = selectedTab;
       this.$('li').removeClass('active');
       this.$('#' + selectedTab).parent().addClass('active');
-    }
+    },
 
+    toggleNewView: function (show) {
+      // only render if there is a change
+      if (show !== this.showNewView) {
+        this.showNewView = show;
+        this.render();
+      }
+    },
   });
 
   Views.Indexed = FauxtonAPI.View.extend({});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/faf215fb/src/fauxton/app/templates/documents/sidebar.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/sidebar.html b/src/fauxton/app/templates/documents/sidebar.html
index 881309f..93bddc9 100644
--- a/src/fauxton/app/templates/documents/sidebar.html
+++ b/src/fauxton/app/templates/documents/sidebar.html
@@ -43,9 +43,11 @@ the License.
            <li>
             <a id="doc" href="#<%= database.url('app') %>/new">New doc</a>
           </li>
-          <li>
-            <a href="#<%= database.url('app') %>/new_view">New view</a>
-          </li>
+          <% if (showNewView) { %>
+            <li>
+              <a href="#<%= database.url('app') %>/new_view">New view</a>
+            </li>
+          <% } %>
         </ul>
       </div>
     </div>
@@ -62,7 +64,9 @@ the License.
     </ul>
     <ul class="nav nav-list views">
       <li class="nav-header">Secondary Indices</li>
-      <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i class="icon-plus"></i> New</a></li>
+      <% if (showNewView) { %>
+        <li><a id="new-view" href="#<%= database.url('app') %>/new_view" class="new"><i class="icon-plus"></i> New</a></li>
+        <% } %>
     </ul>
   </nav>
 </div>


[06/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
move build system edits for my-first-couchdb-plugin to src/


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

Branch: refs/heads/1853-fauxton-route-events
Commit: cf4f3c931edc3a14863f6fc0aa4ba4d1588389ec
Parents: 18d5fd6
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Oct 7 17:28:06 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Oct 7 17:28:06 2013 +0200

----------------------------------------------------------------------
 .gitignore                                |  1 +
 configure.ac                              |  1 -
 src/Makefile.am                           | 12 ++++++--
 src/my-first-couchdb-plugin/Makefile      | 38 ++++++++++++++++++++++++++
 src/my-first-couchdb-plugin/Makefile.am   | 20 --------------
 src/my-first-couchdb-plugin/Makefile.dist | 38 --------------------------
 6 files changed, 49 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/cf4f3c93/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 2fdfb97..cc2398b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -107,6 +107,7 @@ src/ibrowse/ibrowse.app
 src/mochiweb/mochiweb.app
 src/mochiweb/mochiweb.app
 !src/my-first-couchdb-plugin/.gitignore
+!src/my-first-couchdb-plugin/Makefile
 src/snappy/.deps/
 src/snappy/.libs/
 src/snappy/google-snappy/.deps/

http://git-wip-us.apache.org/repos/asf/couchdb/blob/cf4f3c93/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 09c34dc..321c651 100644
--- a/configure.ac
+++ b/configure.ac
@@ -737,7 +737,6 @@ AC_CONFIG_FILES([src/couch_mrview/Makefile])
 AC_CONFIG_FILES([src/couch_plugins/Makefile])
 AC_CONFIG_FILES([src/couch_replicator/Makefile])
 AC_CONFIG_FILES([src/couchjs-node/Makefile])
-AC_CONFIG_FILES([src/my-first-couchdb-plugin/Makefile])
 AC_CONFIG_FILES([src/couchdb/couch.app.tpl])
 AC_CONFIG_FILES([src/couchdb/Makefile])
 AC_CONFIG_FILES([src/couchdb/priv/Makefile])

http://git-wip-us.apache.org/repos/asf/couchdb/blob/cf4f3c93/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 13e73bf..fe9b6d3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,5 +23,13 @@ SUBDIRS = \
     ibrowse \
     mochiweb \
     snappy \
-    couchjs-node \
-    my-first-couchdb-plugin
+    couchjs-node
+
+EXTRA_DIST = \
+  my-first-couchdb-plugin/.gitignore \
+  my-first-couchdb-plugin/Makefile \
+  my-first-couchdb-plugin/priv/default.d/my_first_couchdb_plugin.ini \
+  my-first-couchdb-plugin/README.md \
+  my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src \
+  my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl \
+  my-first-couchdb-plugin/test/my_first_couchdb_plugin_tests.erl
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb/blob/cf4f3c93/src/my-first-couchdb-plugin/Makefile
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/Makefile b/src/my-first-couchdb-plugin/Makefile
new file mode 100644
index 0000000..7806bd7
--- /dev/null
+++ b/src/my-first-couchdb-plugin/Makefile
@@ -0,0 +1,38 @@
+## Licensed under the Apache License, Version 2.0 (the "License"); you may not
+## use this file except in compliance with the License. You may obtain a copy of
+## the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+## License for the specific language governing permissions and limitations under
+## the License.
+
+# Customize here
+NAME=my_first_couchdb_plugin
+VERSION=1.0.0
+# Stop customizing here
+
+ERL=$(shell couch-config --erl-bin)
+ERLANG_VERSION=$(shell couch-config --erlang-version)
+COUCHDB_VERSION=$(shell couch-config --couch-version | sed 's/\+.*//')
+PLUGIN_DIRS=ebin priv
+PLUGIN_VERSION_SLUG=$(NAME)-$(VERSION)-$(ERLANG_VERSION)-$(COUCHDB_VERSION)
+PLUGIN_DIST=$(PLUGIN_VERSION_SLUG)
+
+all: compile
+
+compile:
+	ERL_LIBS=$(shell couch-config --erl-libs-dir):$(ERL_LIBS) rebar compile
+
+dev:
+	@ERL_LIBS=$(shell pwd) couchdb -i -a priv/default.d/*.ini
+
+plugin: compile
+	@mkdir -p $(PLUGIN_DIRS)
+	@mkdir -p $(PLUGIN_DIST)
+	@cp -r $(PLUGIN_DIRS) $(PLUGIN_DIST)
+	@tar czf $(PLUGIN_VERSION_SLUG).tar.gz $(PLUGIN_DIST)
+	@$(ERL) -eval 'File = "$(PLUGIN_VERSION_SLUG).tar.gz", {ok, Data} = file:read_file(File),io:format("~s: ~s~n", [File, base64:encode(crypto:sha(Data))]),halt()' -noshell

http://git-wip-us.apache.org/repos/asf/couchdb/blob/cf4f3c93/src/my-first-couchdb-plugin/Makefile.am
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/Makefile.am b/src/my-first-couchdb-plugin/Makefile.am
deleted file mode 100644
index d8021de..0000000
--- a/src/my-first-couchdb-plugin/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-## Licensed under the Apache License, Version 2.0 (the "License"); you may not
-## use this file except in compliance with the License. You may obtain a copy of
-## the License at
-##
-##   http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-## License for the specific language governing permissions and limitations under
-## the License.
-
-EXTRA_DIST = \
-  .gitignore \
-  Makefile.dist \
-  priv/default.d/my_first_couchdb_plugin.ini \
-  README.md \
-  src/my_first_couchdb_plugin.app.src \
-  src/my_first_couchdb_plugin.erl \
-  test/my_first_couchdb_plugin_tests.erl

http://git-wip-us.apache.org/repos/asf/couchdb/blob/cf4f3c93/src/my-first-couchdb-plugin/Makefile.dist
----------------------------------------------------------------------
diff --git a/src/my-first-couchdb-plugin/Makefile.dist b/src/my-first-couchdb-plugin/Makefile.dist
deleted file mode 100644
index 7806bd7..0000000
--- a/src/my-first-couchdb-plugin/Makefile.dist
+++ /dev/null
@@ -1,38 +0,0 @@
-## Licensed under the Apache License, Version 2.0 (the "License"); you may not
-## use this file except in compliance with the License. You may obtain a copy of
-## the License at
-##
-##   http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-## License for the specific language governing permissions and limitations under
-## the License.
-
-# Customize here
-NAME=my_first_couchdb_plugin
-VERSION=1.0.0
-# Stop customizing here
-
-ERL=$(shell couch-config --erl-bin)
-ERLANG_VERSION=$(shell couch-config --erlang-version)
-COUCHDB_VERSION=$(shell couch-config --couch-version | sed 's/\+.*//')
-PLUGIN_DIRS=ebin priv
-PLUGIN_VERSION_SLUG=$(NAME)-$(VERSION)-$(ERLANG_VERSION)-$(COUCHDB_VERSION)
-PLUGIN_DIST=$(PLUGIN_VERSION_SLUG)
-
-all: compile
-
-compile:
-	ERL_LIBS=$(shell couch-config --erl-libs-dir):$(ERL_LIBS) rebar compile
-
-dev:
-	@ERL_LIBS=$(shell pwd) couchdb -i -a priv/default.d/*.ini
-
-plugin: compile
-	@mkdir -p $(PLUGIN_DIRS)
-	@mkdir -p $(PLUGIN_DIST)
-	@cp -r $(PLUGIN_DIRS) $(PLUGIN_DIST)
-	@tar czf $(PLUGIN_VERSION_SLUG).tar.gz $(PLUGIN_DIST)
-	@$(ERL) -eval 'File = "$(PLUGIN_VERSION_SLUG).tar.gz", {ok, Data} = file:read_file(File),io:format("~s: ~s~n", [File, base64:encode(crypto:sha(Data))]),halt()' -noshell


[30/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fix for Delete view


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 7b95e2e1d0c4b81551579a3101b446ccfa2b1180
Parents: db36103
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 17 16:17:25 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 17 16:17:25 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/7b95e2e1/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 2f3b694..8cd1384 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1106,7 +1106,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
     events: {
       "click button.save": "saveView",
-      "click button.cancel-button": "deleteView",
+      "click button.delete": "deleteView",
       "change select#reduce-function-selector": "updateReduce",
       "change select#ddoc": "updateDesignDoc",
       "click #db-views-tabs-nav": 'toggleIndexNav'


[17/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Better temp fix.


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 1f41f0b6098693696bc57c28d9ae736b5da6f6c0
Parents: d43c300
Author: Alexander Shorin <kx...@apache.org>
Authored: Mon Oct 14 16:08:06 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Mon Oct 14 16:08:06 2013 +0400

----------------------------------------------------------------------
 share/doc/static/rtd.css           | 6 ------
 share/doc/templates/searchbox.html | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1f41f0b6/share/doc/static/rtd.css
----------------------------------------------------------------------
diff --git a/share/doc/static/rtd.css b/share/doc/static/rtd.css
index 19689eb..b342913 100644
--- a/share/doc/static/rtd.css
+++ b/share/doc/static/rtd.css
@@ -793,9 +793,3 @@ p {
     }
 
 }
-
-/* Override RTD basic.css
-Fix style for quick search bar. This is temporary solution.*/
-div.sphinxsidebar #searchbox input[type="text"] {
-    width: 140px;
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1f41f0b6/share/doc/templates/searchbox.html
----------------------------------------------------------------------
diff --git a/share/doc/templates/searchbox.html b/share/doc/templates/searchbox.html
index a23ba13..fa12a7f 100644
--- a/share/doc/templates/searchbox.html
+++ b/share/doc/templates/searchbox.html
@@ -18,7 +18,7 @@ specific language governing permissions and limitations under the License.
 <h3>Quick Search</h3>
 
 <form class="search" action="{{ pathto('search') }}" method="get">
-<input type="text" name="q">
+<input type="text" name="q" style="width:115px">
 <input type="submit" value="Go">
 <input type="hidden" name="check_keywords" value="yes">
 <input type="hidden" name="area" value="default">


[22/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton: Fix correct row number message
Fixes COUCHDB-1760


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 807c4e32fa0e5aa4fd4a74a2338df215ffbe5ac7
Parents: 1cf4621
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Oct 10 14:46:17 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 16 10:24:52 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/resources.js  | 17 +++-
 src/fauxton/app/modules/documents/views.js      | 90 ++++++++++++++------
 src/fauxton/app/modules/fauxton/components.js   |  7 +-
 .../app/templates/documents/all_docs_list.html  | 24 ++----
 .../templates/documents/all_docs_number.html    | 21 +++++
 5 files changed, 113 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/807c4e32/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 901ba83..bad8b77 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -268,6 +268,8 @@ function(app, FauxtonAPI) {
       this.database = options.database;
       this.params = options.params;
       this.skipFirstItem = false;
+
+      this.on("remove",this.decrementTotalRows , this);
     },
 
     url: function(context) {
@@ -284,7 +286,13 @@ function(app, FauxtonAPI) {
 
     urlNextPage: function (num, lastId) {
       if (!lastId) {
-        lastId = this.last().id;
+        var doc = this.last();
+
+        if (doc) {
+          lastId = doc.id;
+        } else {
+          lastId = '';
+        }
       }
 
       this.params.startkey_docid = '"' + lastId + '"';
@@ -311,6 +319,13 @@ function(app, FauxtonAPI) {
       return this.viewMeta.total_rows || "unknown";
     },
 
+    decrementTotalRows: function () {
+      if (this.viewMeta.total_rows) {
+        this.viewMeta.total_rows = this.viewMeta.total_rows -1;
+        this.trigger('totalRows:decrement');
+      }
+    },
+
     updateSeq: function() {
       return this.viewMeta.update_seq || false;
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/807c4e32/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 3fd47d4..376a2ac 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -362,8 +362,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         FauxtonAPI.addNotification({
           msg: "Succesfully destroyed your doc"
         });
-        that.$el.fadeOut();
-        that.model.collection.remove(that.id);
+        that.$el.fadeOut(function () {
+          that.remove();
+        });
+
+        that.model.collection.remove(that.model.id);
       }, function(resp) {
         FauxtonAPI.addNotification({
           msg: "Failed to destroy your doc!",
@@ -377,6 +380,16 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     template: "templates/documents/index_row_docular",
     tagName: "tr",
 
+    events: {
+      "click button.delete": "destroy"
+    },
+
+    destroy: function (event) {
+      event.preventDefault(); 
+      
+      window.alert('Cannot delete a document generated from a view.');
+    },
+
     serialize: function() {
       return {
         doc: this.model
@@ -412,6 +425,38 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     }
   });
 
+  Views.AllDocsNumber = FauxtonAPI.View.extend({
+    template: "templates/documents/all_docs_number",
+
+    initialize: function (options) {
+      this.newView = options.newView || false;
+      
+      this.listenTo(this.collection, 'totalRows:decrement', this.render);
+    },
+
+    serialize: function () {
+       var totalRows = 0,
+          recordStart = 0,
+          updateSeq = false;
+
+      if (!this.newView) {
+        totalRows = this.collection.totalRows();
+        updateSeq = this.collection.updateSeq();
+      }
+
+      recordStart = this.collection.recordStart();
+
+      return {
+        database: this.collection.database.id,
+        updateSeq: updateSeq,
+        offset: recordStart,
+        totalRows: totalRows,
+        numModels: this.collection.models.length + recordStart - 1,
+      };
+    }
+
+  });
+
   // TODO: Rename to reflect that this is a list of rows or documents
   Views.AllDocsList = FauxtonAPI.View.extend({
     template: "templates/documents/all_docs_list",
@@ -457,32 +502,16 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     },
 
     serialize: function() {
-      var totalRows = 0,
-          recordStart = 0,
-          updateSeq = false;
+      var requestDuration = false;
 
-      if (!this.newView) {
-        totalRows = this.collection.totalRows();
-        updateSeq = this.collection.updateSeq();
+      if (this.collection.requestDurationInString) {
+        requestDuration = this.collection.requestDurationInString();
       }
 
-      recordStart = this.collection.recordStart();
-
-      var info = {
-        database: this.collection.database.id,
-        updateSeq: updateSeq,
-        offset: recordStart,
-        totalRows: totalRows,
-        numModels: this.collection.models.length + recordStart - 1,
+      return {
         viewList: this.viewList,
-        requestDuration: null
+        requestDuration: requestDuration
       };
-
-      if (this.collection.requestDurationInString) {
-        info.requestDuration = this.collection.requestDurationInString();
-      }
-
-      return info;
     },
 
     /*
@@ -497,7 +526,10 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     bulkDelete: function() {
       var that = this;
       // yuck, data binding ftw?
-      var eles = this.$el.find("input.row-select:checked").parents("tr.all-docs-item").map(function(e) { return $(this).attr("data-id"); }).get();
+      var eles = this.$el.find("input.row-select:checked")
+                         .parents("tr.all-docs-item")
+                         .map(function(e) { return $(this).attr("data-id"); })
+                         .get();
 
       if (!window.confirm("Are you sure you want to delete these " + eles.length + " docs?")) {
         return false;
@@ -507,7 +539,9 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         var model = this.collection.get(ele);
 
         model.destroy().then(function(resp) {
-          that.rows[ele].$el.fadeOut();
+          that.rows[ele].$el.fadeOut(function () {
+            $(this).remove();
+          });
 
           model.collection.remove(model.id);
           that.$('.bulk-delete').addClass('disabled');
@@ -551,6 +585,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     },
 
     beforeRender: function() {
+      this.allDocsNumber = this.setView('#item-numbers', new Views.AllDocsNumber({
+        collection: this.collection,
+        newView: this.newView
+      }));
+
       this.insertView('#documents-pagination', this.pagination);
       this.collection.each(function(doc) {
         this.rows[doc.id] = this.insertView("table.all-docs tbody", new this.nestedView({
@@ -679,7 +718,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         this.getDocFromEditor();
 
         notification = FauxtonAPI.addNotification({msg: "Saving document."});
-        console.log('save',this.model);
 
         this.model.save().then(function () {
           FauxtonAPI.navigate('/database/' + that.database.id + '/' + that.model.id);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/807c4e32/src/fauxton/app/modules/fauxton/components.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/components.js b/src/fauxton/app/modules/fauxton/components.js
index 09dcc51..03fea87 100644
--- a/src/fauxton/app/modules/fauxton/components.js
+++ b/src/fauxton/app/modules/fauxton/components.js
@@ -73,7 +73,12 @@ function(app, FauxtonAPI) {
 
     nextClicked: function (event) {
       event.preventDefault();
-      this.previousIds.push(this.collection.first().id);
+      var doc = this.collection.first();
+
+      if (doc) {
+        this.previousIds.push(doc.id);
+      }
+
       FauxtonAPI.navigate(this.nextUrlfn(), {trigger: false});
       FauxtonAPI.triggerRouteEvent('paginate', 'next');
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/807c4e32/src/fauxton/app/templates/documents/all_docs_list.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/all_docs_list.html b/src/fauxton/app/templates/documents/all_docs_list.html
index 43a5532..dcb8dda 100644
--- a/src/fauxton/app/templates/documents/all_docs_list.html
+++ b/src/fauxton/app/templates/documents/all_docs_list.html
@@ -19,29 +19,17 @@ the License.
         <button type="button" class="btn all" data-toggle="button">✓ All</button>
         <button class="btn btn-small disabled bulk-delete"><i class="icon-trash"></i></button>
       </div>
-      <!-- TODO::REENABLE
-      <div class="btn-toolbar pull-right">
-        <a href="#new-view-index" class="btn btn-small toggle-edit disabled"><i class="icon-wrench"></i> Edit index</a>
-        <a href="#params" class="btn btn-small toggle-params"><i class="icon-plus"></i> API preview</a>
-      </div>
-      -->
     </div>
   <% } %>
   <p>
 
-  <% if (totalRows === "unknown"){ %>
-    Showing 0 documents. <a href="#/database/<%=database%>/new"> Create your first document.</a>
-  <% } else { %>
-    Showing <%=offset%> - <%= numModels %> of <%= totalRows %> rows
-  <%}%>
-    <% if (updateSeq) { %>
-      -- Update Sequence: <%= updateSeq %>
-    <% } %>
-    <% if (requestDuration) { %>
-  <span class="view-request-duration">
+  <div id="item-numbers"> </div>
+
+  <% if (requestDuration) { %>
+    <span class="view-request-duration">
     View request duration: <strong> <%= requestDuration %> </strong> 
-   </span>
-   <% } %>
+    </span>
+  <% } %>
   </p>
   <table class="all-docs table table-striped table-condensed">
     <tbody></tbody>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/807c4e32/src/fauxton/app/templates/documents/all_docs_number.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/all_docs_number.html b/src/fauxton/app/templates/documents/all_docs_number.html
new file mode 100644
index 0000000..c4ea8f6
--- /dev/null
+++ b/src/fauxton/app/templates/documents/all_docs_number.html
@@ -0,0 +1,21 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+<% if (totalRows === "unknown"){ %>
+  Showing 0 documents. <a href="#/database/<%=database%>/new"> Create your first document.</a>
+<% } else { %>
+  Showing <%=offset%> - <%= numModels %> of <%= totalRows %> rows
+<%}%>
+<% if (updateSeq) { %>
+  -- Update Sequence: <%= updateSeq %>
+<% } %>


[27/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Add Cancel button to the edit form


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 4ecb639f593e9f55f934ad69fa2186d55bfa6c9e
Parents: 6b158a2
Author: suelockwood <de...@gmail.com>
Authored: Thu Oct 17 12:38:47 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Thu Oct 17 12:38:47 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js   | 6 +++++-
 src/fauxton/app/templates/documents/doc.html | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/4ecb639f/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 6c39044..9f665e5 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -684,12 +684,16 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       "click button.save-doc": "saveDoc",
       "click button.delete": "destroy",
       "click button.duplicate": "duplicate",
-      "click button.upload": "upload"
+      "click button.upload": "upload",
+      "click button.cancel-button": "goback"
     },
     disableLoader: true,
     initialize: function (options) {
       this.database = options.database;
     },
+    goback: function(){
+      window.history.back();
+    },
     destroy: function(event) {
       if (this.model.isNewDoc()) {
         FauxtonAPI.addNotification({

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4ecb639f/src/fauxton/app/templates/documents/doc.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/doc.html b/src/fauxton/app/templates/documents/doc.html
index 6d4c8e5..8c8fc7b 100644
--- a/src/fauxton/app/templates/documents/doc.html
+++ b/src/fauxton/app/templates/documents/doc.html
@@ -44,7 +44,8 @@ the License.
   <textarea class="doc-code"><%- JSON.stringify(doc.attributes, null, "  ") %></textarea>
   <br />
   <p>
-    <button class="save-doc btn btn-success btn-large save" type="button">Save</button>
+       <button class="save-doc button green btn-success btn-large save fonticon-circle-check" type="button">Save</button>
+       <button class="button gray btn-large cancel-button outlineGray fonticon-circle-x" type="button">Cancel</button>
   </p>
 
 </div>


[02/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
snappy: ensure configure.ac matches snappy release

See history in COUCHDB-1600 for full patch


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 2e081e095192e18b5bc6cac154a8add17205b87a
Parents: fba51db
Author: Dave Cottlehuber <dc...@apache.org>
Authored: Mon Oct 7 00:47:58 2013 +0200
Committer: Dave Cottlehuber <dc...@apache.org>
Committed: Mon Oct 7 00:49:08 2013 +0200

----------------------------------------------------------------------
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/2e081e09/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index a5c7f86..7ab4e66 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,7 @@ PKG_PROG_PKG_CONFIG
 dnl Config for google snappy
 m4_define([snappy_major], [1])
 m4_define([snappy_minor], [0])
-m4_define([snappy_patchlevel], [3])
+m4_define([snappy_patchlevel], [5])
 
 AC_PROG_CXX
 AC_LANG([C++])


[18/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fix httpdomain compatibility issue with Python 2.6


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 08f0009d47e4f39f49fee820647f7051c6496b03
Parents: 1f41f0b
Author: Alexander Shorin <kx...@apache.org>
Authored: Tue Oct 15 02:54:47 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Tue Oct 15 02:54:47 2013 +0400

----------------------------------------------------------------------
 share/doc/ext/httpdomain.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/08f0009d/share/doc/ext/httpdomain.py
----------------------------------------------------------------------
diff --git a/share/doc/ext/httpdomain.py b/share/doc/ext/httpdomain.py
index afc81b5..d5d5652 100644
--- a/share/doc/ext/httpdomain.py
+++ b/share/doc/ext/httpdomain.py
@@ -46,7 +46,7 @@ class DocRef(object):
         location of the RFC which defines some HTTP method.
 
         """
-        return '{}#{}{}'.format(self.base_url, self.anchor, self.section)
+        return '{0}#{1}{2}'.format(self.base_url, self.anchor, self.section)
 
 
 class RFC2616Ref(DocRef):
@@ -62,7 +62,7 @@ class IETFRef(DocRef):
     def __init__(self, rfc, section):
         url = 'http://tools.ietf.org/html/rfc{0:d}'.format(rfc)
         super(IETFRef, self).__init__(url, 'section-', section)
-        
+
 
 class EventSourceRef(DocRef):
 


[40/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
improvements


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 4b5841afd9e626b0e04544e3295c8d8dc9ad5500
Parents: 9066604
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Oct 16 15:26:48 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 23 17:48:10 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/addons/compaction/resources.js | 2 +-
 src/fauxton/app/addons/compaction/views.js     | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/4b5841af/src/fauxton/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/resources.js b/src/fauxton/app/addons/compaction/resources.js
index b6fa4bc..e7c97cf 100644
--- a/src/fauxton/app/addons/compaction/resources.js
+++ b/src/fauxton/app/addons/compaction/resources.js
@@ -32,7 +32,7 @@ function (app, FauxtonAPI) {
       contentType: 'application/json',
       type: 'POST'
     });
-  }
+  };
 
   return Compaction;
 });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4b5841af/src/fauxton/app/addons/compaction/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/views.js b/src/fauxton/app/addons/compaction/views.js
index 457e5f6..ff6037a 100644
--- a/src/fauxton/app/addons/compaction/views.js
+++ b/src/fauxton/app/addons/compaction/views.js
@@ -14,7 +14,6 @@ define([
        "app",
 
        "api",
-
        // Modules
        "addons/compaction/resources"
 ],
@@ -84,11 +83,7 @@ function (app, FauxtonAPI, Compaction) {
         enableButton('#cleanup-views', 'Run');
       });
     }
-
-
   });
 
-
-
   return Compaction;
 });


[31/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Remove {} chars from API reference links.

While browsers shows them correctly JIRA, StackOverflow and others
in-form URL parsers aren't likes them and breaks the referencing.


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

Branch: refs/heads/1853-fauxton-route-events
Commit: dc9980c121747fd4b66b169fb7d5e068a4b175c1
Parents: 7b95e2e
Author: Alexander Shorin <kx...@apache.org>
Authored: Fri Oct 18 23:35:27 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Fri Oct 18 23:35:27 2013 +0400

----------------------------------------------------------------------
 share/doc/ext/httpdomain.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/dc9980c1/share/doc/ext/httpdomain.py
----------------------------------------------------------------------
diff --git a/share/doc/ext/httpdomain.py b/share/doc/ext/httpdomain.py
index d5d5652..d5df2b7 100644
--- a/share/doc/ext/httpdomain.py
+++ b/share/doc/ext/httpdomain.py
@@ -214,7 +214,7 @@ def sort_by_method(entries):
 
 
 def http_resource_anchor(method, path):
-    path = re.sub(r'[<>:/]', '-', path)
+    path = re.sub(r'[{}]', '', re.sub(r'[<>:/]', '-', path))
     return method.lower() + '-' + path
 
 


[26/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Remove the animation transitions


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

Branch: refs/heads/1853-fauxton-route-events
Commit: a3822a927f3057a9d6c4e9e0f464a8a52d822338
Parents: a61b47e
Author: suelockwood <de...@gmail.com>
Authored: Wed Oct 16 11:41:24 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Wed Oct 16 16:42:01 2013 -0400

----------------------------------------------------------------------
 src/fauxton/assets/less/fauxton.less | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/a3822a92/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index 56d1453..30d872d 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -294,7 +294,6 @@ a:hover{
 
 #dashboard {
   max-width: 1500px;
-  .customTransition(left, 1s, 0.805, 0.005, 0.165, 0.985); // alt 0.730, -0.425, 0.000, 0.960 or... 0.645, -0.295, 0.000, 0.960
   .box-shadow(-6px 0 rgba(0, 0, 0, 0.1));
   border-left: 1px solid #999;
   position: absolute;


[09/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Merge branch 'build-system-fixes-1.5.x'

* build-system-fixes-1.5.x: (22 commits)
  the last line is intentionally left blank to appease POSIX gods
  [my-first-couchdb-plugin] remove note about ex-Makefile.dist
  move build system edits for my-first-couchdb-plugin to src/
  [my-first-couchdb-plugin] use Apache 2 License
  move erlang-version.escript to EXTRA_DIST
  add erlang-version.escript to bin_SCRIPTS
  update license.skip with generated files
  fix fauxton adds
  fix typo
  add my-first-couchdb-plugin .gitignore
  remove more accidental edits
  remove accidental edit
  advise renaming the Makefile
  custom Makefile for my-first-couchdb-plugin
  add src/couchjs-node/Makedile to configure.ac
  trailing spaces
  set up my-first-couchdb-plugin with EXTRA_DIST
  set up couchjs-node with EXTRA_DIST
  add fauxton dist to Makefile
  add plugins.html & pagination.rst to Makefiles
  ...


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 659699def483c4cd59e273bfe130fe1bde067245
Parents: f7a18d3 100b182
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Oct 7 18:19:15 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Oct 7 18:19:15 2013 +0200

----------------------------------------------------------------------
 .gitignore                                      |  3 +-
 bin/Makefile.am                                 |  2 +-
 configure.ac                                    | 15 ++++----
 license.skip                                    |  8 ++++-
 share/Makefile.am                               | 20 +++++++++++
 share/doc/build/Makefile.am                     |  2 ++
 src/Makefile.am                                 | 12 ++++++-
 src/couch_plugins/Makefile.am                   |  2 +-
 src/couchjs-node/Makefile.am                    | 24 +++++++++++++
 src/my-first-couchdb-plugin/.gitignore          |  1 +
 src/my-first-couchdb-plugin/Makefile            | 38 ++++++++++++++++++++
 .../src/my_first_couchdb_plugin.app.src         | 12 +++++++
 .../src/my_first_couchdb_plugin.erl             | 12 +++++++
 13 files changed, 139 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/659699de/configure.ac
----------------------------------------------------------------------


[25/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Allow databases with / in the names


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 6b158a2f2fa75e15fa2fc4a1f200b386280c9e76
Parents: a3822a9
Author: suelockwood <de...@gmail.com>
Authored: Wed Oct 16 16:41:28 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Wed Oct 16 16:42:01 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/modules/databases/views.js    | 3 ++-
 src/fauxton/app/modules/documents/routes.js   | 4 ++--
 src/fauxton/app/templates/databases/item.html | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/src/fauxton/app/modules/databases/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/views.js b/src/fauxton/app/modules/databases/views.js
index 749f79c..0f67d36 100644
--- a/src/fauxton/app/modules/databases/views.js
+++ b/src/fauxton/app/modules/databases/views.js
@@ -26,6 +26,7 @@ function(app, Components, FauxtonAPI) {
 
     serialize: function() {
       return {
+        encoded: encodeURIComponent(this.model.get("name")),
         database: this.model
       };
     }
@@ -59,7 +60,7 @@ function(app, Components, FauxtonAPI) {
         // TODO: switch to using a model, or Databases.databaseUrl()
         // Neither of which are in scope right now
         // var db = new Database.Model({id: dbname});
-        var url = ["/database/", dbname, "/_all_docs?limit=10"].join('');
+        var url = ["/database/", encodeURIComponent(dbname), "/_all_docs?limit=10"].join('');
         FauxtonAPI.navigate(url);
       }
     },

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/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 13b2bc9..df8c07d 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -167,7 +167,7 @@ function(app, FauxtonAPI, Documents, Databases) {
       var docOptions = app.getParams();
       docOptions.include_docs = true;
 
-      this.databaseName = options[0];
+      this.databaseName = encodeURIComponent(options[0]);
 
       this.data = {
         database: new Databases.Model({id:this.databaseName})
@@ -379,7 +379,7 @@ function(app, FauxtonAPI, Documents, Databases) {
     },
 
     initialize: function (route, masterLayout, options) {
-      this.databaseName = options[0];
+      this.databaseName = encodeURIComponent(options[0]);
       this.database = new Databases.Model({id: this.databaseName});
 
       var docOptions = app.getParams();

http://git-wip-us.apache.org/repos/asf/couchdb/blob/6b158a2f/src/fauxton/app/templates/databases/item.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/databases/item.html b/src/fauxton/app/templates/databases/item.html
index 8740242..a8801b0 100644
--- a/src/fauxton/app/templates/databases/item.html
+++ b/src/fauxton/app/templates/databases/item.html
@@ -13,7 +13,7 @@ the License.
 -->
 
 <td>
-  <a href="#/database/<%= database.get("name") %>/_all_docs?limit=100"><%= database.get("name") %></a>
+  <a href="#/database/<%=encoded%>/_all_docs?limit=100"><%= database.get("name") %></a>
 </td>
 <td><%= database.status.humanSize() %></td>
 <td><%= database.status.numDocs() %></td>


[04/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
72 char columns


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

Branch: refs/heads/1853-fauxton-route-events
Commit: f7a18d3d5a10b460f4fe4d7d00f86275d5257190
Parents: cdf852d
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Oct 7 11:38:59 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Oct 7 11:38:59 2013 +0200

----------------------------------------------------------------------
 INSTALL.Unix | 74 +++++++++++++++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f7a18d3d/INSTALL.Unix
----------------------------------------------------------------------
diff --git a/INSTALL.Unix b/INSTALL.Unix
index 47cc863..a54204d 100644
--- a/INSTALL.Unix
+++ b/INSTALL.Unix
@@ -10,11 +10,12 @@ Community installation guides are available on the wiki:
 If you are trying to build CouchDB from a git checkout rather than
 a .tar.gz, see the `DEVELOPERS` file.
     
-This document is the canonical source of installation information. However, many
-systems have gotchas that you need to be aware of. In addition, dependencies
-frequently change as distributions update their archives. If you're running into
-trouble, be sure to check out the wiki. If you have any tips to share, please
-also update the wiki so that others can benefit from your experience.
+This document is the canonical source of installation
+information. However, many systems have gotchas that you need to be
+aware of. In addition, dependencies frequently change as distributions
+update their archives. If you're running into trouble, be sure to
+check out the wiki. If you have any tips to share, please also update
+the wiki so that others can benefit from your experience.
 
 Troubleshooting
 ---------------
@@ -49,10 +50,11 @@ You should have the following installed:
  * Python (>=2.7) for docs      (http://python.org/)
  * Python Sphinx (>=1.1.3)      (http://pypi.python.org/pypi/Sphinx)
 
-It is recommended that you install Erlang OTP R13B-4 or above where possible.
-You will only need libcurl if you plan to run the JavaScript test suite. And
-help2man is only need if you plan on installing the CouchDB man pages.
-Python and Sphinx are only required for building the online documentation.
+It is recommended that you install Erlang OTP R13B-4 or above where
+possible.  You will only need libcurl if you plan to run the
+JavaScript test suite. And help2man is only need if you plan on
+installing the CouchDB man pages.  Python and Sphinx are only required
+for building the online documentation.
 
 Debian-based Systems
 ~~~~~~~~~~~~~~~~~~~~
@@ -70,11 +72,13 @@ You can install the dependencies by running:
     sudo apt-get install libcurl4-openssl-dev
     sudo apt-get install pkg-config
 
-There are lots of Erlang packages. If there is a problem with your install, try
-a different mix. There is more information on the wiki. Additionally, you might
-want to install some of the optional Erlang tools which may also be useful.
+There are lots of Erlang packages. If there is a problem with your
+install, try a different mix. There is more information on the
+wiki. Additionally, you might want to install some of the optional
+Erlang tools which may also be useful.
 
-Be sure to update the version numbers to match your system's available packages.
+Be sure to update the version numbers to match your system's available
+packages.
 
 For up to date instructions, please see:
 
@@ -82,7 +86,8 @@ For up to date instructions, please see:
 
   http://wiki.apache.org/couchdb/Installing_on_Ubuntu
 
-Unfortunately, it seems that installing dependencies on Ubuntu is troublesome.
+Unfortunately, it seems that installing dependencies on Ubuntu is
+troublesome.
 
 RedHat-based (Fedora, Centos, RHEL) Systems
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -104,13 +109,15 @@ You can install the dependencies by running:
     sudo yum install curl-devel
     sudo yum install pkg-config
 
-While CouchDB builds against the default js-devel-1.7.0 included in some
-distributions, it's recommended to use a more recent js-devel-1.8.5.
+While CouchDB builds against the default js-devel-1.7.0 included in
+some distributions, it's recommended to use a more recent
+js-devel-1.8.5.
 
 Mac OS X
 ~~~~~~~~
 
-To build CouchDB from source on Mac OS X, you will need to install Xcode.
+To build CouchDB from source on Mac OS X, you will need to install
+Xcode.
 
 You can install the other dependencies by running:
 
@@ -130,10 +137,11 @@ Learn more about Homebrew at:
 
     http://mxcl.github.com/homebrew/
 
-Some versions of Mac OS X ship a problematic OpenSSL library. If you're
-experiencing troubles with CouchDB crashing intermittently with a segmentation
-fault or a bus error, you will need to install your own version of OpenSSL. See
-the troubleshooting guide, mentioned above, for more information.
+Some versions of Mac OS X ship a problematic OpenSSL library. If
+you're experiencing troubles with CouchDB crashing intermittently with
+a segmentation fault or a bus error, you will need to install your own
+version of OpenSSL. See the troubleshooting guide, mentioned above,
+for more information.
 
 Installing
 ----------
@@ -142,9 +150,11 @@ Once you have satisfied the dependencies you should run:
 
     ./configure
 
-This script will configure CouchDB to be installed into `/usr/local` by default.
+This script will configure CouchDB to be installed into `/usr/local`
+by default.
 
-If you wish to customise the installation, pass `--help` to this script.
+If you wish to customise the installation, pass `--help` to this
+script.
 
 If everything was successful you should see the following message:
 
@@ -173,9 +183,11 @@ You can start the CouchDB server by running:
 
     sudo -i -u couchdb couchdb
 
-This uses the `sudo` command to run the `couchdb` command as the `couchdb` user.
+This uses the `sudo` command to run the `couchdb` command as the
+`couchdb` user.
 
-When CouchDB starts it should eventually display the following message:
+When CouchDB starts it should eventually display the following
+message:
 
     Apache CouchDB has started, time to relax.
 
@@ -251,7 +263,8 @@ On BSD-style systems, the init script will be installed into:
 
     /usr/local/etc/rc.d
 
-We use the `[init.d|rc.d]` notation to refer to both of these directories.
+We use the `[init.d|rc.d]` notation to refer to both of these
+directories.
 
 You can control the CouchDB daemon by running:
 
@@ -261,13 +274,15 @@ If you wish to configure how the init script works, you can edit:
 
     /usr/local/etc/default/couchdb
 
-Comment out the `COUCHDB_USER` setting if you're running as a non-superuser.
+Comment out the `COUCHDB_USER` setting if you're running as a
+non-superuser.
 
 To start the daemon on boot, copy the init script to:
 
     /etc/[init.d|rc.d]
 
-You should then configure your system to run the init script automatically.
+You should then configure your system to run the init script
+automatically.
 
 You may be able to run:
 
@@ -281,7 +296,8 @@ A `logrotate` configuration is installed into:
 
 Consult your `logrotate` documentation for more information.
 
-It is critical that the CouchDB logs are rotated so as not to fill your disk.
+It is critical that the CouchDB logs are rotated so as not to fill
+your disk.
 
 Mac OS X
 ~~~~~~~~


[15/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fix quick search from non-top level articles.


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

Branch: refs/heads/1853-fauxton-route-events
Commit: f55fc9737405c2e8bd868a1fb3321922b51394ca
Parents: 1944276
Author: Alexander Shorin <kx...@apache.org>
Authored: Mon Oct 14 15:24:50 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Mon Oct 14 15:24:50 2013 +0400

----------------------------------------------------------------------
 share/doc/templates/searchbox.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f55fc973/share/doc/templates/searchbox.html
----------------------------------------------------------------------
diff --git a/share/doc/templates/searchbox.html b/share/doc/templates/searchbox.html
index e37e7ef..a23ba13 100644
--- a/share/doc/templates/searchbox.html
+++ b/share/doc/templates/searchbox.html
@@ -17,7 +17,7 @@ specific language governing permissions and limitations under the License.
 
 <h3>Quick Search</h3>
 
-<form class="search" action="search.html" method="get">
+<form class="search" action="{{ pathto('search') }}" method="get">
 <input type="text" name="q">
 <input type="submit" value="Go">
 <input type="hidden" name="check_keywords" value="yes">


[47/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fix Fauxton license bits: add missed headers, use explicit skip policy


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 9e5e3a59fdbf635bd2e283c656232c2dbb57897e
Parents: 408ce44
Author: Alexander Shorin <kx...@apache.org>
Authored: Sat Oct 26 05:42:15 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sat Oct 26 05:42:15 2013 +0400

----------------------------------------------------------------------
 license.skip                                    | 28 +++++++++++++-------
 .../activetasks/assets/less/activetasks.less    | 12 +++++++++
 .../app/addons/auth/assets/less/auth.less       | 11 ++++++++
 .../compaction/assets/less/compaction.less      | 11 ++++++++
 .../permissions/assets/less/permissions.less    | 12 +++++++++
 .../app/addons/stats/assets/less/stats.less     | 23 ++++++++--------
 .../assets/less/verifyinstall.less              | 23 ++++++++--------
 src/fauxton/app/app.js                          | 12 +++++++++
 src/fauxton/app/config.js                       | 12 +++++++++
 src/fauxton/app/main.js                         | 12 +++++++++
 src/fauxton/app/modules/pouchdb/base.js         | 13 ---------
 src/fauxton/assets/less/icons.less              | 12 +++++++++
 src/fauxton/couchapp.js                         | 12 +++++++++
 src/fauxton/test/runner.html                    | 15 +++++++++++
 14 files changed, 161 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/license.skip
----------------------------------------------------------------------
diff --git a/license.skip b/license.skip
index 3321a6d..a20ab00 100644
--- a/license.skip
+++ b/license.skip
@@ -118,23 +118,31 @@
 ^src/couch_dbupdates
 ^src/ejson/.*
 ^src/etap/.*
-^src/fauxton/app/app.js
-^src/fauxton/app/config.js
-^src/fauxton/app/main.js
-^src/fauxton/app/modules/pouchdb/*
-^src/fauxton/assets/.*
-^src/fauxton/couchapp.js
+^src/fauxton/app/modules/pouchdb/base.js
+^src/fauxton/app/modules/pouchdb/pouch.collate.js
+^src/fauxton/app/modules/pouchdb/pouchdb.mapreduce.js
+^src/fauxton/assets/css/codemirror.css
+^src/fauxton/assets/css/nv.d3.css
+^src/fauxton/assets/img/.*
+^src/fauxton/assets/js/libs/.*.js
+^src/fauxton/assets/js/plugins/.*.js
+^src/fauxton/assets/less/bootstrap/.*.less
+^src/fauxton/assets/less/bootstrap/tests/css-tests.css
+^src/fauxton/assets/less/bootstrap/tests/buttons.html
 ^src/fauxton/favicon.ico
 ^src/fauxton/package.json
+^src/fauxton/extensions.md
 ^src/fauxton/readme.md
 ^src/fauxton/writing_addons.md
 ^src/fauxton/TODO.md
 ^src/fauxton/settings.json.*
-^src/fauxton/test/.*
+^src/fauxton/test/test.config.underscore
+^src/fauxton/test/mocha/chai.js
+^src/fauxton/test/mocha/mocha.css
+^src/fauxton/test/mocha/mocha.js
+^src/fauxton/test/mocha/sinon.js
+^src/fauxton/test/mocha/sinon-chai.js
 ^src/fauxton/tasks/addon/rename.json
-^src/fauxton/app/addons/activetasks/assets/less/activetasks.less
-^src/fauxton/app/addons/auth/assets/less/auth.less
-^src/fauxton/app/addons/permissions/assets/less/permissions.less
 ^src/ibrowse/.*
 ^src/mochiweb/.*
 ^src/my-first-couchdb-plugin/priv/*/*

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/addons/activetasks/assets/less/activetasks.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/activetasks/assets/less/activetasks.less b/src/fauxton/app/addons/activetasks/assets/less/activetasks.less
index 695799d..743917d 100644
--- a/src/fauxton/app/addons/activetasks/assets/less/activetasks.less
+++ b/src/fauxton/app/addons/activetasks/assets/less/activetasks.less
@@ -1,3 +1,15 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
 .task-tabs li {
   cursor: pointer;
 }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/addons/auth/assets/less/auth.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/auth/assets/less/auth.less b/src/fauxton/app/addons/auth/assets/less/auth.less
index cbab983..598da10 100644
--- a/src/fauxton/app/addons/auth/assets/less/auth.less
+++ b/src/fauxton/app/addons/auth/assets/less/auth.less
@@ -1,3 +1,14 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
 
 .menuDropdown {
   display: none;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/addons/compaction/assets/less/compaction.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/assets/less/compaction.less b/src/fauxton/app/addons/compaction/assets/less/compaction.less
index c197d9a..70b034b 100644
--- a/src/fauxton/app/addons/compaction/assets/less/compaction.less
+++ b/src/fauxton/app/addons/compaction/assets/less/compaction.less
@@ -1,3 +1,14 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
 
 .compaction-option {
   background-color: #F7F7F7;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/addons/permissions/assets/less/permissions.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/permissions/assets/less/permissions.less b/src/fauxton/app/addons/permissions/assets/less/permissions.less
index 5f5a0db..7ce4d10 100644
--- a/src/fauxton/app/addons/permissions/assets/less/permissions.less
+++ b/src/fauxton/app/addons/permissions/assets/less/permissions.less
@@ -1,3 +1,15 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
 .border-hdr {
   border-bottom: 1px solid #E3E3E3;
   margin-bottom: 10px;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/addons/stats/assets/less/stats.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/stats/assets/less/stats.less b/src/fauxton/app/addons/stats/assets/less/stats.less
index 8c81f86..cfa7679 100644
--- a/src/fauxton/app/addons/stats/assets/less/stats.less
+++ b/src/fauxton/app/addons/stats/assets/less/stats.less
@@ -1,15 +1,14 @@
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
 
 .datatypes {
   border: #d3d3d3 1px solid;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less b/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
index 8a116df..e084cb3 100644
--- a/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
+++ b/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
@@ -1,15 +1,14 @@
-/*  Licensed under the Apache License, Version 2.0 (the "License"); you may not
- *  use this file except in compliance with the License. You may obtain a copy of
- *  the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- *  License for the specific language governing permissions and limitations under
- *  the License.
- */
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
 
 #start {
   margin-bottom: 20px;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/app.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/app.js b/src/fauxton/app/app.js
index 77c1b70..ac3c0c4 100644
--- a/src/fauxton/app/app.js
+++ b/src/fauxton/app/app.js
@@ -1,3 +1,15 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
 define([
   // Libraries.
   "jquery",

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/config.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/config.js b/src/fauxton/app/config.js
index cbbcb4d..4edeba0 100644
--- a/src/fauxton/app/config.js
+++ b/src/fauxton/app/config.js
@@ -1,3 +1,15 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
 // Set the require.js configuration for your application.
 require.config({
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/main.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/main.js b/src/fauxton/app/main.js
index fba4f6e..2182f2c 100644
--- a/src/fauxton/app/main.js
+++ b/src/fauxton/app/main.js
@@ -1,3 +1,15 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
 require([
         // Application.
         "app",

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/app/modules/pouchdb/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/pouchdb/base.js b/src/fauxton/app/modules/pouchdb/base.js
index ddaf06d..ee323a7 100644
--- a/src/fauxton/app/modules/pouchdb/base.js
+++ b/src/fauxton/app/modules/pouchdb/base.js
@@ -1,16 +1,3 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-
 /*
  * NOTE:
  * This temporarily uses the PouchDB map reduce implementation

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/assets/less/icons.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/icons.less b/src/fauxton/assets/less/icons.less
index b6e01a6..cf0593c 100644
--- a/src/fauxton/assets/less/icons.less
+++ b/src/fauxton/assets/less/icons.less
@@ -1,3 +1,15 @@
+/*  Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ *  use this file except in compliance with the License. You may obtain a copy of
+ *  the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ *  License for the specific language governing permissions and limitations under
+ *  the License.
+ */
 
 @font-face {
   font-family: "fauxtonicon";

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/couchapp.js
----------------------------------------------------------------------
diff --git a/src/fauxton/couchapp.js b/src/fauxton/couchapp.js
index 63ea297..fec8dd3 100644
--- a/src/fauxton/couchapp.js
+++ b/src/fauxton/couchapp.js
@@ -1,3 +1,15 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
 var couchapp = require('couchapp'),
     path = require('path'),
     ddoc;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/9e5e3a59/src/fauxton/test/runner.html
----------------------------------------------------------------------
diff --git a/src/fauxton/test/runner.html b/src/fauxton/test/runner.html
index b27fdda..2eeb27f 100644
--- a/src/fauxton/test/runner.html
+++ b/src/fauxton/test/runner.html
@@ -1,3 +1,18 @@
+<!DOCTYPE html>
+<!--
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.
+
+-->
 <html>
   <head>
     <meta charset="utf-8">


[39/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Finish view compaction


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 308b9937de3a1a46705e2be3ea31828722b1db1b
Parents: 4b5841a
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Oct 22 17:17:58 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 23 17:48:10 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/addons/compaction/base.js       |  2 +
 src/fauxton/app/addons/compaction/resources.js  | 10 ++++
 src/fauxton/app/addons/compaction/routes.js     | 10 ++--
 .../compaction/templates/compact_view.html      | 14 +++++
 .../app/addons/compaction/templates/layout.html |  8 ---
 src/fauxton/app/addons/compaction/views.js      | 57 ++++++++++++++++++--
 src/fauxton/app/modules/documents/views.js      | 22 ++++++--
 .../templates/documents/advanced_options.html   |  2 +-
 src/fauxton/extensions.md                       | 17 ++++++
 9 files changed, 124 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/app/addons/compaction/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/base.js b/src/fauxton/app/addons/compaction/base.js
index 8d93016..de0f124 100644
--- a/src/fauxton/app/addons/compaction/base.js
+++ b/src/fauxton/app/addons/compaction/base.js
@@ -23,6 +23,8 @@ function(app, FauxtonAPI, Compaction) {
       url: "compact", 
       icon: "icon-cogs"
     });
+
+    FauxtonAPI.registerExtension('advancedOptions:ViewButton', new Compaction.CompactView({}));
   };
 
   return Compaction;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/resources.js b/src/fauxton/app/addons/compaction/resources.js
index e7c97cf..6633677 100644
--- a/src/fauxton/app/addons/compaction/resources.js
+++ b/src/fauxton/app/addons/compaction/resources.js
@@ -34,5 +34,15 @@ function (app, FauxtonAPI) {
     });
   };
 
+
+  Compaction.compactView = function (db, designDoc) {
+    // /some_database/_compact/designname
+    return $.ajax({
+      url: db.url() + '/_compact/' + designDoc.replace('_design/','') ,
+      contentType: 'application/json',
+      type: 'POST'
+    });
+  };
+
   return Compaction;
 });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/app/addons/compaction/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/routes.js b/src/fauxton/app/addons/compaction/routes.js
index e04d386..b7a2ee3 100644
--- a/src/fauxton/app/addons/compaction/routes.js
+++ b/src/fauxton/app/addons/compaction/routes.js
@@ -25,9 +25,13 @@ function(app, FauxtonAPI, Compaction, Databases) {
   var  CompactionRouteObject = FauxtonAPI.RouteObject.extend({
     layout: "one_pane",
 
-    crumbs: [
-      {"name": "Compact & Clean", "link": "compact"}
-    ],
+    crumbs: function () {
+      return [
+        {"name": "Databases", "link": "/_all_dbs"},
+        {"name": this.database.id, "link": Databases.databaseUrl(this.database)},
+        {"name": "Compact & Clean", "link": "compact"}
+      ];
+    },
 
     routes: {
       "database/:database/compact": "compaction"

http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/app/addons/compaction/templates/compact_view.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/templates/compact_view.html b/src/fauxton/app/addons/compaction/templates/compact_view.html
new file mode 100644
index 0000000..8a0b7ec
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/templates/compact_view.html
@@ -0,0 +1,14 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+Compact View

http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/app/addons/compaction/templates/layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/templates/layout.html b/src/fauxton/app/addons/compaction/templates/layout.html
index 08a2078..5125892 100644
--- a/src/fauxton/app/addons/compaction/templates/layout.html
+++ b/src/fauxton/app/addons/compaction/templates/layout.html
@@ -21,14 +21,6 @@ the License.
 
 <div class="row">
   <div class="span12 compaction-option">
-    <h3> Compact Views </h3>
-    <p>View compaction will affect all views in this design document. This operation may take some time to complete. Your views will still operate normally during compaction.</p>
-    <button id="compact-view" class="btn btn-large btn-primary"> Run </button>
-  </div>
-</div>
-
-<div class="row">
-  <div class="span12 compaction-option">
     <h3> Cleanup Views </h3>
     <p>Cleaning up views in a database removes old view files still stored on the filesystem. It is an irreversible operation.</p>
     <button id="cleanup-views" class="btn btn-large btn-primary"> Run </button>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/app/addons/compaction/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/views.js b/src/fauxton/app/addons/compaction/views.js
index ff6037a..06a1300 100644
--- a/src/fauxton/app/addons/compaction/views.js
+++ b/src/fauxton/app/addons/compaction/views.js
@@ -49,7 +49,7 @@ function (app, FauxtonAPI, Compaction) {
       Compaction.compactDB(this.model).then(function () {
         FauxtonAPI.addNotification({
           type: 'success',
-          msg: 'Database compaction has started.'
+          msg: 'Database compaction has started. Visit <a href="#activetasks">Active Tasks</a> to view the compaction progress.',
         });
       }, function (xhr, error, reason) {
         console.log(arguments);
@@ -71,10 +71,9 @@ function (app, FauxtonAPI, Compaction) {
       Compaction.cleanupViews(this.model).then(function () {
         FauxtonAPI.addNotification({
           type: 'success',
-          msg: 'View cleanup has started.'
+          msg: 'View cleanup has started. Visit <a href="#activetasks">Active Tasks</a> to view progress.'
         });
       }, function (xhr, error, reason) {
-        console.log(arguments);
         FauxtonAPI.addNotification({
           type: 'error',
           msg: 'Error: ' + JSON.parse(xhr.responseText).reason
@@ -85,5 +84,57 @@ function (app, FauxtonAPI, Compaction) {
     }
   });
 
+  Compaction.CompactView = FauxtonAPI.View.extend({
+    template: 'addons/compaction/templates/compact_view',
+    className: 'btn btn-info btn-large pull-right',
+    tagName: 'button',
+
+    initialize: function () {
+      _.bindAll(this);
+    },
+
+    events: {
+      "click": "compact"
+    },
+
+    disableButton: function () {
+      this.$el.attr('disabled', 'disabled').text('Compacting...');
+    },
+
+    enableButton: function () {
+      this.$el.removeAttr('disabled').text('Compact View');
+    },
+
+
+    update: function (database, designDoc, viewName) {
+      this.database = database;
+      this.designDoc = designDoc;
+      this.viewName = viewName;
+    },
+
+    compact: function (event) {
+      event.preventDefault();
+      var enableButton = this.enableButton;
+
+      this.disableButton();
+
+      Compaction.compactView(this.database, this.designDoc).then(function () {
+        FauxtonAPI.addNotification({
+          type: 'success',
+          msg: 'View compaction has started. Visit <a href="#activetasks">Active Tasks</a> to view progress.'
+        });
+      }, function (xhr, error, reason) {
+        FauxtonAPI.addNotification({
+          type: 'error',
+          msg: 'Error: ' + JSON.parse(xhr.responseText).reason
+        });
+      }).always(function () {
+        enableButton();
+      });
+
+    }
+
+  });
+
   return Compaction;
 });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index eaec296..cf5dd35 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -479,7 +479,8 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         updateViewFn: this.updateView,
         previewFn: this.previewView,
         hasReduce: false,
-        showPreview: false
+        showPreview: false,
+        database: this.database
       }));
 
       this.$('#query').hide();
@@ -970,6 +971,9 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     className: "advanced-options well",
 
     initialize: function (options) {
+      this.database = options.database;
+      this.ddocName = options.ddocName;
+      this.viewName = options.viewName;
       this.updateViewFn = options.updateViewFn;
       this.previewFn = options.previewFn;
       this.hadReduce = options.hasReduce || true;
@@ -994,6 +998,16 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       "click button.preview": "previewView"
     },
 
+    beforeRender: function () {
+      if (this.viewName && this.ddocName) {
+        var buttonViews = FauxtonAPI.getExtensions('advancedOptions:ViewButton');
+        _.each(buttonViews, function (view) {
+          this.insertView('#button-options', view);
+          view.update(this.database, this.ddocName, this.viewName);
+        }, this);
+      }
+    },
+
     queryParams: function () {
       var $form = this.$(".view-query-update");
       // Ignore params without a value
@@ -1496,7 +1510,10 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
       this.advancedOptions = this.insertView('#query', new Views.AdvancedOptions({
         updateViewFn: this.updateView,
-        previewFn: this.previewView
+        previewFn: this.previewView,
+        database: this.database,
+        viewName: this.viewName,
+        ddocName: this.model.id
       }));
     },
 
@@ -1635,7 +1652,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
     serialize: function() {
       var docLinks = FauxtonAPI.getExtensions('docLinks');
-      console.log(docLinks);
       return {
         changes_url: '#' + this.database.url('changes'),
         permissions_url: '#' + this.database.url('app') + '/permissions',

http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/app/templates/documents/advanced_options.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/advanced_options.html b/src/fauxton/app/templates/documents/advanced_options.html
index aee2f65..c0bf44a 100644
--- a/src/fauxton/app/templates/documents/advanced_options.html
+++ b/src/fauxton/app/templates/documents/advanced_options.html
@@ -81,7 +81,7 @@ the License.
   </div>
   <div class="controls-group">
     <div class="row-fluid">
-      <div class="controls controls-row">
+      <div id="button-options" class="controls controls-row">
         <button type="submit" class="btn btn-primary btn-large">Query</button>
         <% if (showPreview) { %>
         <button class="btn btn-info btn-large preview">Preview</button>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/308b9937/src/fauxton/extensions.md
----------------------------------------------------------------------
diff --git a/src/fauxton/extensions.md b/src/fauxton/extensions.md
new file mode 100644
index 0000000..13fcf8d
--- /dev/null
+++ b/src/fauxton/extensions.md
@@ -0,0 +1,17 @@
+#Extensions
+
+Extensions allow Fauxton views to be have extra functionality.
+
+A module registers an extension by
+
+    FauxtonAPI.registerExtension('extensionName', myObjectToRegister);
+
+Any other module wanting to use that extension can then get 
+all objects registered for an extension by:
+
+    var extensions = FauxtonAPI.getExtensions('extensionName');
+    // extensions will always be an array
+
+The module can then use those extensions to extend its functionality.
+An example of extensions in the compaction module (app/addons/compaction/base.js) 
+and in documents module (app/modules/documents/views line 1003)


[33/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton: Fix issue cannot delete new view


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

Branch: refs/heads/1853-fauxton-route-events
Commit: e1f5d8dbce37460419f406bf87284dbd7712f82b
Parents: 309a569
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Oct 21 16:09:09 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Oct 21 16:09:09 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/resources.js  |  1 -
 src/fauxton/app/modules/documents/views.js      | 98 +++++++++++++-------
 .../documents/design_doc_selector.html          | 35 +++++++
 .../app/templates/documents/view_editor.html    | 22 -----
 4 files changed, 100 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e1f5d8db/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 8df2e6f..5512add 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -167,7 +167,6 @@ function(app, FauxtonAPI) {
       if (resp.ok) {
         delete resp.ok;
       }
-
       return resp;
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/e1f5d8db/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 8cd1384..5122921 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1099,7 +1099,60 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     }
   });
 
-  //TODO split this into two smaller views, one for advance query options and other for index editing
+  Views.DesignDocSelector = FauxtonAPI.View.extend({
+    template: "templates/documents/design_doc_selector",
+
+    events: {
+      "change select#ddoc": "updateDesignDoc"
+    },
+
+    initialize: function (options) {
+      this.ddocName = options.ddocName;
+      this.database = options.database;
+      this.listenTo(this.collection, 'add', this.ddocAdded);
+    },
+
+    ddocAdded: function (ddoc) {
+      this.ddocName = ddoc.id;
+      this.render();
+    },
+
+    serialize: function () {
+      return {
+        ddocName: this.ddocName,
+        ddocs: this.collection
+      };
+    },
+
+    updateDesignDoc: function () {
+      if (this.$('#ddoc :selected').prop('id') === 'new-doc') {
+        this.$('#new-ddoc-section').show();
+      } else {
+        this.$('#new-ddoc-section').hide();
+      }
+    },
+
+    newDesignDoc: function () {
+      return this.$('#ddoc :selected').prop('id') === 'new-doc';
+    },
+
+    getCurrentDesignDoc: function () {
+      if (this.newDesignDoc()) {
+        var doc = {
+          _id: '_design/' + this.$('#new-ddoc').val(),
+          views: {},
+          language: "javascript"
+        };
+        return new Documents.Doc(doc, {database: this.database});
+      } else {
+        var ddocName = this.$('#ddoc').val();
+        return this.collection.find(function (ddoc) {
+          return ddoc.id === ddocName;
+        }).dDocModel();
+      }
+    }
+  });
+
   Views.ViewEditor = FauxtonAPI.View.extend({
     template: "templates/documents/view_editor",
     builtinReduces: ['_sum', '_count', '_stats'],
@@ -1108,7 +1161,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       "click button.save": "saveView",
       "click button.delete": "deleteView",
       "change select#reduce-function-selector": "updateReduce",
-      "change select#ddoc": "updateDesignDoc",
+      
       "click #db-views-tabs-nav": 'toggleIndexNav'
     },
 
@@ -1143,17 +1196,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       }
     },
 
-    updateDesignDoc: function () {
-
-      if (this.$('#ddoc :selected').prop('id') === 'new-doc') {
-        this.$('#new-ddoc-section').show();
-
-      } else {
-        this.$('#new-ddoc-section').hide();
-      }
-
-    },
-
+    
     updateValues: function() {
       var notification;
       if (this.model.changedAttributes()) {
@@ -1335,26 +1378,9 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     },
 
     getCurrentDesignDoc: function () {
-      if (this.newDesignDoc()) {
-        var doc = {
-          _id: '_design/' + this.$('#new-ddoc').val(),
-          views: {},
-          language: "javascript"
-        };
-        return new Documents.Doc(doc, {database: this.database});
-      } else {
-        var ddocName = this.$('#ddoc').val();
-        return this.ddocs.find(function (ddoc) {
-          return ddoc.id === ddocName;
-        }).dDocModel();
-      }
-
+      return this.designDocSelector.getCurrentDesignDoc();
     },
-
-    newDesignDoc: function () {
-      return this.$('#ddoc :selected').prop('id') === 'new-doc';
-    },
-
+    
     isCustomReduceEnabled: function() {
       return $("#reduce-function-selector").val() == "CUSTOM";
     },
@@ -1461,6 +1487,12 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         this.setView('#ddoc-info', new Views.DdocInfo({model: this.ddocInfo }));
       }
 
+      this.designDocSelector = this.setView('.design-doc-group', new Views.DesignDocSelector({
+        collection: this.ddocs,
+        ddocName: this.model.id,
+        database: this.database
+      }));
+
       this.advancedOptions = this.insertView('#query', new Views.AdvancedOptions({
         updateViewFn: this.updateView,
         previewFn: this.previewView
@@ -1480,7 +1512,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         this.$('#index-nav').parent().removeClass('active');
       }
 
-      this.updateDesignDoc();
+      this.designDocSelector.updateDesignDoc();
       // This is a hack around a bug in backbone.layoutmanager with grunt dev
       // When in grunt dev mode we load templates asynchronously
       // and this can cause a double render which then gives us two 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/e1f5d8db/src/fauxton/app/templates/documents/design_doc_selector.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/design_doc_selector.html b/src/fauxton/app/templates/documents/design_doc_selector.html
new file mode 100644
index 0000000..0cd6bdf
--- /dev/null
+++ b/src/fauxton/app/templates/documents/design_doc_selector.html
@@ -0,0 +1,35 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+<div class="span3">
+  <label for="ddoc">Design document <a href="<%=getDocUrl('design_doc')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
+  <select id="ddoc">
+    <optgroup label="Select a document">
+      <option id="new-doc">New document</option>
+      <% ddocs.each(function(ddoc) { %>
+      <% if (ddoc.id === ddocName) { %>
+      <option selected="selected"><%= ddoc.id %></option>
+      <% } else { %>
+      <option><%= ddoc.id %></option>
+      <% } %>
+      <% }); %>
+    </optgroup>
+  </select>
+</div>
+
+<div id="new-ddoc-section" class="span5" style="display:none">
+  <label class="control-label" for="new-ddoc"> _design/ </label>
+  <div class="controls">
+    <input type="text" id="new-ddoc" placeholder="newDesignDoc">
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/e1f5d8db/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index f75edc5..76265e0 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -25,28 +25,6 @@ the License.
         <form class="form-horizontal view-query-save">
 
           <div class="control-group design-doc-group">
-            <div class="span3">
-              <label for="ddoc">Design document <a href="<%=getDocUrl('design_doc')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
-              <select id="ddoc">
-                <optgroup label="Select a document">
-                  <option id="new-doc">New document</option>
-                  <% ddocs.each(function(ddoc) { %>
-                  <% if (ddoc.id === ddocName) { %>
-                  <option selected="selected"><%= ddoc.id %></option>
-                  <% } else { %>
-                  <option><%= ddoc.id %></option>
-                  <% } %>
-                  <% }); %>
-                </optgroup>
-              </select>
-            </div>
-
-            <div id="new-ddoc-section" class="span5" style="display:none">
-              <label class="control-label" for="new-ddoc"> _design/ </label>
-              <div class="controls">
-                <input type="text" id="new-ddoc" placeholder="newDesignDoc">
-              </div>
-            </div>
           </div>
 
           <div class="control-group">


[42/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fixing language in description of filters

Signed-off-by: Alexander Shorin <kx...@apache.org>


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

Branch: refs/heads/1853-fauxton-route-events
Commit: e3b0c245ecd5e8d7ee9779183032c63c92f694cb
Parents: ff3fd64
Author: karlin <ka...@atomicobject.com>
Authored: Wed Oct 23 17:02:15 2013 -0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Fri Oct 25 19:20:09 2013 +0400

----------------------------------------------------------------------
 share/doc/src/couchapp/ddocs.rst | 43 +++++++++++++++++------------------
 1 file changed, 21 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/e3b0c245/share/doc/src/couchapp/ddocs.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/couchapp/ddocs.rst b/share/doc/src/couchapp/ddocs.rst
index 1920a42..2625d14 100644
--- a/share/doc/src/couchapp/ddocs.rst
+++ b/share/doc/src/couchapp/ddocs.rst
@@ -437,10 +437,10 @@ Filter functions
    :param doc: Processed document object.
    :param req: :ref:`request_object`
    :return: Boolean value: ``true`` means that `doc` passes the filter rules,
-            ``false`` that not.
+            ``false`` means that it does not.
 
-Filter functions are mostly acts like :ref:`showfun` and :ref:`listfun`: they
-formats, but more correctly to say, they *filters* :ref:`changes feed<changes>`.
+Filter functions mostly act like :ref:`showfun` and :ref:`listfun`: they
+format, or *filter* the :ref:`changes feed<changes>`.
 
 Classic filters
 ---------------
@@ -448,12 +448,11 @@ Classic filters
 By default the changes feed emits all database documents changes. But if you're
 waiting for some special changes, processing all documents is inefficient.
 
-Filters are special design document functions that allows changes feed to emit
+Filters are special design document functions that allow the changes feed to emit
 only specific documents that pass filter rules.
 
-Lets assume that our database is a mailbox and we need to to handle only new mails
-(documents with status `new`) events. Assuming that, our filter function
-will looks like next one:
+Let's assume that our database is a mailbox and we need to handle only new mail
+events (documents with status `new`). Our filter function will look like this:
 
 .. code-block:: javascript
 
@@ -469,8 +468,8 @@ will looks like next one:
     return true; // passed!
   }
  
-Filter functions must return ``true`` in fact if document passed all defined
-rules. Now, if you apply this function to changes feed it will emit only changes
+Filter functions must return ``true`` if a document passed all defined
+rules. Now, if you apply this function to the changes feed it will emit only changes
 about "new mails"::
 
     GET /somedatabase/_changes?filter=mailbox/new_mail HTTP/1.1
@@ -483,20 +482,20 @@ about "new mails"::
     ],
     "last_seq":27}
 
-Note, that ``last_seq`` number is 27, but we'd received only two records.
-Seems like any other changes was about documents that hasn't passed our filter.
+Note that the value of ``last_seq`` is 27, but we'd received only two records.
+Seems like any other changes were for documents that haven't passed our filter.
 
-Probably, we also need to filter changes feed of our mailbox not only by single
-status value: we're also interested in statuses like "spam" to update
-spam-filter heuristic rules, "outgoing" to let mail daemon actually send mails
-and so on. Creating a lot of similar functions that actually does similar work
-isn't good idea - so we need dynamic filter to go.
+We probably need to filter the changes feed of our mailbox by more than a single
+status value. We're also interested in statuses like "spam" to update
+spam-filter heuristic rules, "outgoing" to let a mail daemon actually send mails,
+and so on. Creating a lot of similar functions that actually do similar work
+isn't good idea - so we need a dynamic filter.
 
-If you have noted, filter functions takes second argument as
-:ref:`request <request_object>` object - it allows to create dynamic filters
+You may have noticed that filter functions take a second argument named
+:ref:`request <request_object>` - it allows creating dynamic filters
 based on query parameters, :ref:`user context <userctx_object>` and more.
 
-The dynamic version of our filter now will be next:
+The dynamic version of our filter looks like this:
 
 .. code-block:: javascript
 
@@ -512,7 +511,7 @@ The dynamic version of our filter now will be next:
     return true; // passed!
   }
 
-and now we have pass `status` query parameter in request to let filter match
+and now we have passed the `status` query parameter in request to let our filter match
 only required documents::
 
     GET /somedatabase/_changes?filter=mailbox/by_status&status=new HTTP/1.1
@@ -525,7 +524,7 @@ only required documents::
     ],
     "last_seq":27}
 
-and we can change filter behavior with easy::
+and we can easily change filter behavior with::
 
     GET /somedatabase/_changes?filter=mailbox/by_status&status=spam HTTP/1.1
 
@@ -537,7 +536,7 @@ and we can change filter behavior with easy::
     "last_seq":27}
 
 
-Combining filters with `continuous` feed allows to create powerful event-driven
+Combining filters with a `continuous` feed allows creating powerful event-driven
 systems.
 
 .. _viewfilter:


[34/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton: add web-index url for database model


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 12af14b8f54997bdcc89419f61a9880632d0535a
Parents: e1f5d8d
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Oct 21 17:10:43 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Oct 21 17:10:43 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/databases/resources.js | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/12af14b8/src/fauxton/app/modules/databases/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/databases/resources.js b/src/fauxton/app/modules/databases/resources.js
index 6678d49..237c4ce 100644
--- a/src/fauxton/app/modules/databases/resources.js
+++ b/src/fauxton/app/modules/databases/resources.js
@@ -50,6 +50,8 @@ function(app, FauxtonAPI, Documents) {
     url: function(context) {
       if (context === "index") {
         return "/database/" + this.id + "/_all_docs";
+      } else if (context === "web-index") {
+        return "#/database/"+ encodeURIComponent(this.get("name"))  + "/_all_docs?limit=100";
       } else if (context === "changes") {
         return "/database/" + this.id + "/_changes?descending=true&limit=100&include_docs=true";
       } else if (context === "app") {


[23/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton: Add Verify Install module
Resolves #COUCHDB-1813


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 9710834196c59f02ee5fb4df27df4a587cf6c1f1
Parents: bcb4fba
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Oct 15 12:23:00 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 16 10:24:52 2013 +0200

----------------------------------------------------------------------
 .gitignore                                      |   1 +
 .../assets/less/verifyinstall.less              |   4 +
 src/fauxton/app/addons/verifyinstall/base.js    |  31 ++++
 .../app/addons/verifyinstall/resources.js       | 174 +++++++++++++++++++
 src/fauxton/app/addons/verifyinstall/routes.js  |  37 ++++
 .../addons/verifyinstall/templates/main.html    |  50 ++++++
 src/fauxton/app/addons/verifyinstall/views.js   | 126 ++++++++++++++
 src/fauxton/app/modules/documents/resources.js  |   1 -
 src/fauxton/settings.json.default               |   3 +-
 9 files changed, 425 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index cc2398b..95cf2f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -100,6 +100,7 @@ src/fauxton/app/addons/*
 !src/fauxton/app/addons/auth
 !src/fauxton/app/addons/exampleAuth
 !src/fauxton/app/addons/permissions
+!src/fauxton/app/addons/verifyinstall
 src/fauxton/settings.json*
 !src/fauxton/settings.json.default
 src/ibrowse/ibrowse.app

http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less b/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
new file mode 100644
index 0000000..508994b
--- /dev/null
+++ b/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
@@ -0,0 +1,4 @@
+#start {
+  margin-bottom: 20px;
+}
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/src/fauxton/app/addons/verifyinstall/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/verifyinstall/base.js b/src/fauxton/app/addons/verifyinstall/base.js
new file mode 100644
index 0000000..d17c353
--- /dev/null
+++ b/src/fauxton/app/addons/verifyinstall/base.js
@@ -0,0 +1,31 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+  "app",
+  "api",
+  "addons/verifyinstall/routes"
+],
+
+function(app, FauxtonAPI, VerifyInstall) {
+  VerifyInstall.initialize = function () {
+    FauxtonAPI.addHeaderLink({
+        title: "Verify", 
+        href: "#verifyinstall",
+        icon: "fonticon-circle-check",
+        bottomNav: true,
+      });
+  };
+
+
+  return VerifyInstall;
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/src/fauxton/app/addons/verifyinstall/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/verifyinstall/resources.js b/src/fauxton/app/addons/verifyinstall/resources.js
new file mode 100644
index 0000000..f42c020
--- /dev/null
+++ b/src/fauxton/app/addons/verifyinstall/resources.js
@@ -0,0 +1,174 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+  "app",
+  "api",
+  "modules/databases/resources",
+  "modules/documents/resources"
+],
+
+function (app, FauxtonAPI, Databases, Documents) {
+  var Verifyinstall = FauxtonAPI.addon();
+
+  var db = new Databases.Model({
+    id: 'verifytestdb',
+    name: 'verifytestdb'
+  });
+
+  var dbReplicate = new Databases.Model({
+    id: 'verifytestdb_replicate',
+    name: 'verifytestdb_replicate'
+  });
+
+  var doc, viewDoc;
+
+  Verifyinstall.testProcess = {
+
+    saveDoc: function () {
+      doc = new Documents.Doc({_id: 'test_doc_1', a: 1}, {
+        database: db
+      });
+
+      return doc.save();
+    },
+
+    destroyDoc: function () {
+     return doc.destroy();
+    },
+
+    updateDoc: function () {
+      doc.set({b: "hello"});
+      return doc.save(); 
+    },
+
+    saveDB: function () {
+      return db.save();
+    },
+
+    setupDB: function (db) {
+      var deferred = FauxtonAPI.Deferred();
+      db.fetch()
+      .then(function () {
+        return db.destroy();
+      }, function (xhr) {
+        deferred.resolve();
+      })
+      .then(function () {
+        deferred.resolve();
+      }, function (xhr, error, reason) {
+        if (reason === "Unauthorized") {
+          deferred.reject(xhr, error, reason);
+        }
+      });
+
+      return deferred;
+    },
+
+    setup: function () {
+      return FauxtonAPI.when([
+        this.setupDB(db), 
+        this.setupDB(dbReplicate)
+      ]);
+    },
+
+    testView: function () {
+      var deferred = FauxtonAPI.Deferred();
+      var promise = $.get(viewDoc.url() + '/_view/testview');
+
+      promise.then(function (resp) { 
+        var row = JSON.parse(resp).rows[0];
+        if (row.value === 6) {
+          return deferred.resolve();
+        }
+        var reason = {
+            reason: 'Values expect 6, got ' + row.value
+          };
+
+        deferred.reject({responseText: JSON.stringify(reason)});
+      }, deferred.reject);
+
+      return deferred;
+    },
+
+    setupView: function () {
+      var doc1 = new Documents.Doc({_id: 'test_doc10', a: 1}, {
+        database: db
+      });
+
+      var doc2 = new Documents.Doc({_id: 'test_doc_20', a: 2}, {
+        database: db
+      });
+
+      var doc3 = new Documents.Doc({_id: 'test_doc_30', a: 3}, {
+        database: db
+      });
+
+      viewDoc = new Documents.Doc({
+        _id: '_design/view_check',
+        views: {
+          'testview': { 
+            map:'function (doc) { emit(doc._id, doc.a); }',
+            reduce: '_sum'
+          }
+        } 
+      },{
+        database: db,
+      });
+
+      return FauxtonAPI.when([doc1.save(),doc2.save(), doc3.save(), viewDoc.save()]);
+    },
+
+    setupReplicate: function () {
+      return $.ajax({
+        url: '/_replicate',
+        contentType: 'application/json',
+        type: 'POST',
+        dataType: 'json',
+        processData: false,
+        data: JSON.stringify({
+          create_target: true,
+          source: 'verifytestdb',
+          target: 'verifytestdb_replicate'
+        }),
+      });
+    },
+
+    testReplicate: function () {
+      var deferred = FauxtonAPI.Deferred();
+      /*var dbReplicate = new Databases.Model({
+          id: 'verifytestdb_replicate',
+          name: 'verifytestdb_replicate'
+        });*/
+
+      var promise = dbReplicate.fetch();
+
+      promise.then(function () {
+        var docCount = dbReplicate.get('doc_count');
+        if ( docCount === 4) {
+          deferred.resolve();
+          return;
+        }
+
+        var reason = {
+          reason: 'Replication Failed, expected 4 docs got ' + docCount
+        };
+
+        deferred.reject({responseText: JSON.stringify(reason)});
+      }, deferred.reject);
+
+      return deferred;
+    }
+  };
+
+  return Verifyinstall;
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/src/fauxton/app/addons/verifyinstall/routes.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/verifyinstall/routes.js b/src/fauxton/app/addons/verifyinstall/routes.js
new file mode 100644
index 0000000..e5024ba
--- /dev/null
+++ b/src/fauxton/app/addons/verifyinstall/routes.js
@@ -0,0 +1,37 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+  "app",
+  "api",
+  "addons/verifyinstall/views"
+],
+function(app, FauxtonAPI, VerifyInstall) {
+
+  var VerifyRouteObject = FauxtonAPI.RouteObject.extend({
+    layout: 'one_pane',
+
+    routes: {
+      'verifyinstall': "verifyInstall"
+    },
+    selectedHeader: "Verify",
+
+    verifyInstall: function () {
+      this.setView('#dashboard-content', new VerifyInstall.Main({}));
+    },
+
+    crumbs: [{name: 'Verify Couchdb Installation', link: '#'}]
+  });
+
+  VerifyInstall.RouteObjects = [VerifyRouteObject];
+  return VerifyInstall;
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/src/fauxton/app/addons/verifyinstall/templates/main.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/verifyinstall/templates/main.html b/src/fauxton/app/addons/verifyinstall/templates/main.html
new file mode 100644
index 0000000..fa41907
--- /dev/null
+++ b/src/fauxton/app/addons/verifyinstall/templates/main.html
@@ -0,0 +1,50 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+<button id="start" class="btn btn-large btn-success"> Verify Installation </button>
+<div id="error"> </div>
+
+<table id="test-score" class="table table-striped table-bordered" >
+  <thead>
+    <tr>
+      <th> Test </th>
+      <th> Status </th>
+    </tr>
+  </thead>
+  <tbody>
+    <tr>
+      <td> Create Database </td>
+      <td id="create-database" class="status">  </td>
+    </tr>
+    <tr>
+      <td> Create Document </td>
+      <td id="create-document" class="status">  </td>
+    </tr>
+    <tr>
+      <td> Update Document </td>
+      <td id="update-document" class="status">  </td>
+    </tr>
+    <tr>
+      <td> Delete Document </td>
+      <td id="delete-document" class="status">  </td>
+    </tr>
+    <tr>
+      <td> Create View </td>
+      <td id="create-view" class="status">  </td>
+    </tr>
+    <tr>
+      <td> Replication </td>
+      <td id="replicate" class="status">  </td>
+    </tr>
+  </tbody>
+</table>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/src/fauxton/app/addons/verifyinstall/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/verifyinstall/views.js b/src/fauxton/app/addons/verifyinstall/views.js
new file mode 100644
index 0000000..3ad3364
--- /dev/null
+++ b/src/fauxton/app/addons/verifyinstall/views.js
@@ -0,0 +1,126 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+define([
+  "app",
+  "api",
+  "addons/verifyinstall/resources",
+],
+function(app, FauxtonAPI, VerifyInstall) {
+
+  VerifyInstall.Main = FauxtonAPI.View.extend({
+    template: 'addons/verifyinstall/templates/main',
+
+    events: {
+      "click #start": "startTest"
+    },
+
+    initialize: function (options) {
+      _.bindAll(this);
+    },
+
+    setPass: function (id) {
+      this.$('#' + id).html('&#10003;');
+    },
+
+    setError: function (id, msg) {
+      this.$('#' + id).html('&#x2717;');
+      FauxtonAPI.addNotification({
+        msg: 'Error: ' + msg,
+        type: 'error',
+        selector: '#error'
+      });
+    },
+
+    complete: function () {
+      FauxtonAPI.addNotification({
+        msg: 'Success! You Couchdb install is working. Time to Relax',
+        type: 'success',
+        selector: '#error'
+      });
+    },
+
+    enableButton: function () {
+      this.$('#start').removeAttr('disabled').text('Verify Installation');
+    },
+
+    disableButton: function () {
+      this.$('#start').attr('disabled','disabled').text('Verifying');
+    },
+
+    formatError: function (id) {
+      var enableButton = this.enableButton,
+          setError = this.setError;
+
+      return function (xhr, error, reason) {
+        enableButton();
+
+        if (!xhr) { return; }
+
+        setError(id, JSON.parse(xhr.responseText).reason);
+      };
+    },
+
+    
+    startTest: function () {
+      this.disableButton();
+      this.$('.status').text('');
+
+      var testProcess = VerifyInstall.testProcess,
+          setPass = this.setPass,
+          complete = this.complete,
+          setError = this.setError,
+          formatError = this.formatError;
+
+      testProcess.setup()
+      .then(function () {
+        return testProcess.saveDB();
+      }, formatError('create-database'))
+      .then(function () {
+        setPass('create-database');
+        return testProcess.saveDoc();
+      }, formatError('create-document'))
+      .then(function () {
+        setPass('create-document');
+        return testProcess.updateDoc();
+      }, formatError('update-document'))
+      .then(function () {
+        setPass('update-document');
+        return testProcess.destroyDoc();
+      }, formatError('delete-document'))
+      .then(function () {
+        setPass('delete-document');
+        return testProcess.setupView();
+      }, formatError('create-view'))
+      .then(function () {
+        return testProcess.testView();
+      }, formatError('create-view'))
+      .then(function () {
+        setPass('create-view');
+        return testProcess.setupReplicate();
+      }, formatError('create-view'))
+      .then(function () {
+        return testProcess.testReplicate();
+      }, formatError('replicate'))
+      .then(function () {
+          setPass('replicate');
+          complete();
+      }, formatError('replicate'));
+
+      this.enableButton();
+    }
+  });
+
+
+  return VerifyInstall;
+
+});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/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 bad8b77..8df2e6f 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -12,7 +12,6 @@
 
 define([
   "app",
-
   "api"
 ],
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/97108341/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index 4964135..ce45e26 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -8,7 +8,8 @@
   { "name": "plugins" },
   { "name": "contribute" },
   { "name": "permissions" },
-  { "name": "auth" }
+  { "name": "auth" },
+  { "name": "verifyinstall" }
   ],
     "template": {
       "development": {


[32/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Remove "API method" things. Fix header for /_session endpoint.


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 309a569ef8d3d4ca0a3060d62edc5dc8ce407f51
Parents: dc9980c
Author: Alexander Shorin <kx...@apache.org>
Authored: Fri Oct 18 23:35:44 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Fri Oct 18 23:35:44 2013 +0400

----------------------------------------------------------------------
 share/doc/src/api/server/authn.rst         |  2 +-
 share/doc/src/api/server/configuration.rst | 13 ++++++-------
 share/doc/src/api/server/index.rst         |  6 +++---
 3 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/309a569e/share/doc/src/api/server/authn.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/server/authn.rst b/share/doc/src/api/server/authn.rst
index 27b1dc6..98d6f62 100644
--- a/share/doc/src/api/server/authn.rst
+++ b/share/doc/src/api/server/authn.rst
@@ -84,7 +84,7 @@ To obtain the first token and thus authenticate a user for the first time, the
 
 .. _api/auth/session:
 
-``_session``
+``/_session``
 ------------
 
 .. http:post:: /_session

http://git-wip-us.apache.org/repos/asf/couchdb/blob/309a569e/share/doc/src/api/server/configuration.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/server/configuration.rst b/share/doc/src/api/server/configuration.rst
index 46a4e78..643b8ec 100644
--- a/share/doc/src/api/server/configuration.rst
+++ b/share/doc/src/api/server/configuration.rst
@@ -12,13 +12,12 @@
 
 .. _api/config:
 
-=====================
-Configuration Methods
-=====================
+=============
+Configuration
+=============
 
-The CouchDB API Server Configuration Methods provide an interface to
-query and update the various configuration values within a running
-CouchDB instance.
+The CouchDB Server Configuration API provide an interface to query and update
+the various configuration values within a running CouchDB instance.
 
 ``/_config``
 ============
@@ -152,7 +151,7 @@ CouchDB instance.
           "algorithm": "utc_random"
       }
     }
-        
+
 
 .. _api/config/section:
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/309a569e/share/doc/src/api/server/index.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/server/index.rst b/share/doc/src/api/server/index.rst
index 1151bea..c2e8d9a 100644
--- a/share/doc/src/api/server/index.rst
+++ b/share/doc/src/api/server/index.rst
@@ -13,9 +13,9 @@
 
 .. _api/server:
 
-==============
-Server Methods
-==============
+======
+Server
+======
 
 The CouchDB server interface provides the basic interface to a
 CouchDB server for obtaining CouchDB information and getting and setting


[38/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
compact and clean up working


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 90666043bae4e744cf3ddd9198fcfe4921e5a392
Parents: 8e297c8
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Oct 16 13:24:09 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 23 17:48:09 2013 +0200

----------------------------------------------------------------------
 .../compaction/assets/less/compaction.less      |  8 +++
 src/fauxton/app/addons/compaction/resources.js  | 17 ++++++
 .../app/addons/compaction/templates/layout.html | 33 +++++++-----
 src/fauxton/app/addons/compaction/views.js      | 56 +++++++++++++++++++-
 src/fauxton/settings.json.default               |  4 +-
 5 files changed, 103 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/90666043/src/fauxton/app/addons/compaction/assets/less/compaction.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/assets/less/compaction.less b/src/fauxton/app/addons/compaction/assets/less/compaction.less
new file mode 100644
index 0000000..c197d9a
--- /dev/null
+++ b/src/fauxton/app/addons/compaction/assets/less/compaction.less
@@ -0,0 +1,8 @@
+
+.compaction-option {
+  background-color: #F7F7F7;
+  border: 1px solid #DDD;
+  margin-bottom: 30px;
+  padding: 10px;
+
+}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/90666043/src/fauxton/app/addons/compaction/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/resources.js b/src/fauxton/app/addons/compaction/resources.js
index d0180ef..b6fa4bc 100644
--- a/src/fauxton/app/addons/compaction/resources.js
+++ b/src/fauxton/app/addons/compaction/resources.js
@@ -17,5 +17,22 @@ define([
 
 function (app, FauxtonAPI) {
   var Compaction = FauxtonAPI.addon();
+
+  Compaction.compactDB = function (db) {
+    return $.ajax({
+      url: db.url() + '/_compact',
+      contentType: 'application/json',
+      type: 'POST'
+    });
+  };
+
+  Compaction.cleanupViews = function (db) {
+    return $.ajax({
+      url: db.url() + '/_view_cleanup',
+      contentType: 'application/json',
+      type: 'POST'
+    });
+  }
+
   return Compaction;
 });

http://git-wip-us.apache.org/repos/asf/couchdb/blob/90666043/src/fauxton/app/addons/compaction/templates/layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/templates/layout.html b/src/fauxton/app/addons/compaction/templates/layout.html
index 56bcbc2..08a2078 100644
--- a/src/fauxton/app/addons/compaction/templates/layout.html
+++ b/src/fauxton/app/addons/compaction/templates/layout.html
@@ -11,17 +11,26 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
+<div class="row">
+  <div class="span12 compaction-option">
+    <h3> Compact Database </h3>
+    <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>
+    <button id="compact-db" class="btn btn-large btn-primary"> Run </button>
+  </div>
+</div>
 
-<table class="table table-striped table-bordered">
-  <tbody>
-  <tr> 
-    <td>
-      <h3> Compact Database </h3>
-      <p>Compacting a database removes deleted documents and previous revisions. It is an irreversible operation and may take a while to complete for large databases.</p>
-      <button id="compact-db" class="btn btn-large btn-primary"> Run </button>
-    </td>
-  </tr>
-  </tbody>
-
-</table>
+<div class="row">
+  <div class="span12 compaction-option">
+    <h3> Compact Views </h3>
+    <p>View compaction will affect all views in this design document. This operation may take some time to complete. Your views will still operate normally during compaction.</p>
+    <button id="compact-view" class="btn btn-large btn-primary"> Run </button>
+  </div>
+</div>
 
+<div class="row">
+  <div class="span12 compaction-option">
+    <h3> Cleanup Views </h3>
+    <p>Cleaning up views in a database removes old view files still stored on the filesystem. It is an irreversible operation.</p>
+    <button id="cleanup-views" class="btn btn-large btn-primary"> Run </button>
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/90666043/src/fauxton/app/addons/compaction/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/compaction/views.js b/src/fauxton/app/addons/compaction/views.js
index 67afd5e..457e5f6 100644
--- a/src/fauxton/app/addons/compaction/views.js
+++ b/src/fauxton/app/addons/compaction/views.js
@@ -23,12 +23,66 @@ function (app, FauxtonAPI, Compaction) {
   Compaction.Layout = FauxtonAPI.View.extend({
     template: 'addons/compaction/templates/layout',
 
+    initialize: function () {
+      _.bindAll(this);
+    },
+
     events: {
-      "click compact-db": "compactDB"
+      "click #compact-db": "compactDB",
+      "click #compact-view": "compactDB",
+      "click #cleanup-views": "cleanupViews"
+    },
+
+    disableButton: function (selector, text) {
+      this.$(selector).attr('disabled', 'disabled').text(text);
+    },
+
+    enableButton: function (selector, text) {
+      this.$(selector).removeAttr('disabled').text(text);
     },
 
     compactDB: function (event) {
+      var enableButton = this.enableButton;
       event.preventDefault();
+
+      this.disableButton('#compact-db', 'Compacting...');
+
+      Compaction.compactDB(this.model).then(function () {
+        FauxtonAPI.addNotification({
+          type: 'success',
+          msg: 'Database compaction has started.'
+        });
+      }, function (xhr, error, reason) {
+        console.log(arguments);
+        FauxtonAPI.addNotification({
+          type: 'error',
+          msg: 'Error: ' + JSON.parse(xhr.responseText).reason
+        });
+      }).always(function () {
+        enableButton('#compact-db', 'Run');
+      });
+    },
+
+    cleanupViews: function (event) {
+      var enableButton = this.enableButton;
+      event.preventDefault();
+
+      this.disableButton('#cleanup-view', 'Cleaning...');
+
+      Compaction.cleanupViews(this.model).then(function () {
+        FauxtonAPI.addNotification({
+          type: 'success',
+          msg: 'View cleanup has started.'
+        });
+      }, function (xhr, error, reason) {
+        console.log(arguments);
+        FauxtonAPI.addNotification({
+          type: 'error',
+          msg: 'Error: ' + JSON.parse(xhr.responseText).reason
+        });
+      }).always(function () {
+        enableButton('#cleanup-views', 'Run');
+      });
     }
 
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/90666043/src/fauxton/settings.json.default
----------------------------------------------------------------------
diff --git a/src/fauxton/settings.json.default b/src/fauxton/settings.json.default
index 54cc0ce..1b68911 100644
--- a/src/fauxton/settings.json.default
+++ b/src/fauxton/settings.json.default
@@ -8,9 +8,9 @@
   { "name": "plugins" },
   { "name": "contribute" },
   { "name": "permissions" },
-  { "name": "verifyinstall" }
   { "name": "compaction" },
-  { "name": "auth" }
+  { "name": "auth" },
+  { "name": "verifyinstall" }
   ],
     "template": {
       "development": {


[14/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fixed `method` terminology usage w/database

The basics.rst includes an explanation of how
an HTTP API works (leveraging HTTP methods
rather than inventing new ones), but the API
reference docs misuse the term thereafter.


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 1944276fe350e57d111a065d658c3d403bcf4e12
Parents: 5a10e82
Author: BigBlueHat <by...@bigbluehat.com>
Authored: Fri Oct 11 14:51:54 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Fri Oct 11 14:51:54 2013 +0400

----------------------------------------------------------------------
 share/doc/src/api/database/bulk-api.rst |  4 ++--
 share/doc/src/api/database/changes.rst  |  8 ++++----
 share/doc/src/api/database/common.rst   |  5 +++--
 share/doc/src/api/database/index.rst    | 12 ++++++------
 share/doc/src/api/ddoc/index.rst        |  6 +++---
 share/doc/src/api/ddoc/rewrites.rst     | 12 ++++++------
 share/doc/src/api/ddoc/views.rst        |  4 ++--
 share/doc/src/api/document/common.rst   |  2 +-
 share/doc/src/api/document/index.rst    |  9 ++++-----
 share/doc/src/api/local.rst             |  6 +++---
 share/doc/src/api/server/authn.rst      |  9 ++++-----
 11 files changed, 38 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/database/bulk-api.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/bulk-api.rst b/share/doc/src/api/database/bulk-api.rst
index 1c88fbf..2e3919a 100644
--- a/share/doc/src/api/database/bulk-api.rst
+++ b/share/doc/src/api/database/bulk-api.rst
@@ -295,8 +295,8 @@ database. The constraints are detailed in :ref:`api/db/bulk_docs/semantics`.
 
 To insert documents in bulk into a database you need to supply a JSON
 structure with the array of documents that you want to add to the
-database. Using this method you can either include a document ID, or
-allow the document ID to be automatically generated.
+database. You can either include a document ID, or allow the document ID to be
+automatically generated.
 
 For example, the following update inserts three new documents, two with the
 supplied document IDs, and one which will have a document ID generated:

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/database/changes.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/changes.rst b/share/doc/src/api/database/changes.rst
index db6af63..c414c67 100644
--- a/share/doc/src/api/database/changes.rst
+++ b/share/doc/src/api/database/changes.rst
@@ -39,8 +39,8 @@
     previous connection. Overrides `since` query parameter.
   :query array doc_ids: List of document IDs to filter the changes feed as
    valid JSON array. Used with :ref:`_doc_ids <changes/filter/doc_ids>` filter.
-   Since `length of URL is limited`_, you better use :post:`/{db}/_changes`
-   method instead.
+   Since `length of URL is limited`_, it is better to use
+   :post:`/{db}/_changes` instead.
   :query boolean conflicts: Includes `conflicts` information in response.
     Ignored if `include_docs` isn't ``true``. Default is ``false``.
   :query boolean descending: Return the change results in descending sequence
@@ -165,8 +165,8 @@
 .. http:post:: /{db}/_changes
 
   Requests the database changes feed in the same way as
-  :get:`/{db}/_changes` does, but this method is widely used with
-  ``?filter=_doc_ids`` query parameter and allows to pass larger list of
+  :get:`/{db}/_changes` does, but is widely used with
+  ``?filter=_doc_ids`` query parameter and allows one to pass a larger list of
   document IDs to filter.
 
   **Request**:

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/database/common.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/common.rst b/share/doc/src/api/database/common.rst
index 4d4d24c..e3e3657 100644
--- a/share/doc/src/api/database/common.rst
+++ b/share/doc/src/api/database/common.rst
@@ -18,8 +18,9 @@
 .. http:head:: /{db}
 
   Returns the HTTP Headers containing a minimal amount of information
-  about the specified database. Since the response body is empty this method
-  is a lightweight way to check if the database exists already or not.
+  about the specified database. Since the response body is empty, using the
+  HEAD method is a lightweight way to check if the database exists already or
+  not.
 
   :param db: Database name
   :code 200: Database exists

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/database/index.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/database/index.rst b/share/doc/src/api/database/index.rst
index 2441fd4..5da6a32 100644
--- a/share/doc/src/api/database/index.rst
+++ b/share/doc/src/api/database/index.rst
@@ -12,14 +12,14 @@
 
 .. _api/database:
 
-================
-Database Methods
-================
+=========
+Databases
+=========
 
-The Database methods provide an interface to an entire database withing
-CouchDB. These are database, rather than document, level requests.
+The Database endpoint provides an interface to an entire database with in
+CouchDB. These are database-level, rather than document-level requests.
 
-For all the database methods, the database name within the URL path
+For all these requests, the database name within the URL path
 should be the database name that you wish to perform the operation on.
 For example, to obtain the meta information for the database
 ``recipes``, you would use the HTTP request:

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/ddoc/index.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/ddoc/index.rst b/share/doc/src/api/ddoc/index.rst
index 12b9007..20e6740 100644
--- a/share/doc/src/api/ddoc/index.rst
+++ b/share/doc/src/api/ddoc/index.rst
@@ -13,9 +13,9 @@
 
 .. _api/design-docs:
 
-=======================
-Design Document Methods
-=======================
+================
+Design Documents
+================
 
 In CouchDB, design documents provide the main interface for building a
 CouchDB application. The design document defines the views used to

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/ddoc/rewrites.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/ddoc/rewrites.rst b/share/doc/src/api/ddoc/rewrites.rst
index d6e83a9..4e9a9b5 100644
--- a/share/doc/src/api/ddoc/rewrites.rst
+++ b/share/doc/src/api/ddoc/rewrites.rst
@@ -28,8 +28,8 @@
   - **to** (*string*): Rule to rewrite an url. It can contain variables
     depending on  binding variables discovered during pattern matching and
     query args (url args and from the query member)
-  - **method** (*string*): Method to bind the request method to the rule.
-    Default is ``"*"``
+  - **method** (*string*): HTTP request method to bind the request method to
+    the rule. Default is ``"*"``
   - **query** (*object*): Query args you want to define they can contain
     dynamic variable by binding the key
 
@@ -49,10 +49,10 @@
   - If all tokens are matched and all `pathterms` are used, then the `pathspec`
     matches
 
-  The pattern matching is done by first matching the request method to a rule.
-  By default all methods match a rule. (method is equal to ``"*"`` by default).
-  Then It will try to match the path to one rule. If no rule match, then a
-  :statuscode:`404` response returned.
+  The pattern matching is done by first matching the HTTP request method to a
+  rule. ``method`` is equal to ``"*"`` by default, and will match any HTTP
+  method. It will then try to match the path to one rule. If no rule matches,
+  then a :statuscode:`404` response returned.
 
   Once a rule is found we rewrite the request url using the ``to`` and ``query``
   fields. The identified token are matched to the rule and will replace var.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/ddoc/views.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/ddoc/views.rst b/share/doc/src/api/ddoc/views.rst
index 8683085..a456dab 100644
--- a/share/doc/src/api/ddoc/views.rst
+++ b/share/doc/src/api/ddoc/views.rst
@@ -126,8 +126,8 @@
 .. http:post:: /{db}/_design/{ddoc}/_view/{view}
 
   Executes the specified view function from the specified design document.
-  Unlike the :get:`/{db}/_design/{ddoc}/_view/{view}`  method
-  for accessing views, the :method:`POST` method supports the specification
+  Unlike :get:`/{db}/_design/{ddoc}/_view/{view}` for accessing views, the
+  :method:`POST` method supports the specification
   of explicit keys to be retrieved from the view results. The remainder of the
   :method:`POST` view functionality is identical to the
   :get:`/{db}/_design/{ddoc}/_view/{view}` API.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/document/common.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/document/common.rst b/share/doc/src/api/document/common.rst
index 49ffe42..762bfb9 100644
--- a/share/doc/src/api/document/common.rst
+++ b/share/doc/src/api/document/common.rst
@@ -167,7 +167,7 @@
 .. http:put:: /{db}/{docid}
 
   The :method:`PUT` method creates a new named document, or creates a new
-  revision of the existing document. Unlike the :post:`/{db}` method, you
+  revision of the existing document. Unlike the :post:`/{db}`, you
   must specify the document ID in the request URL.
 
   :param db: Database name

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/document/index.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/document/index.rst b/share/doc/src/api/document/index.rst
index 8c0460c..8e6b135 100644
--- a/share/doc/src/api/document/index.rst
+++ b/share/doc/src/api/document/index.rst
@@ -13,12 +13,11 @@
 
 .. _api/document:
 
-================
-Document Methods
-================
+=========
+Documents
+=========
 
-The CouchDB API Server Document methods detail how to create, read,
-update and delete documents within a database.
+Details on how to create, read, update and delete documents within a database.
 
 .. toctree::
 

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/local.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/local.rst b/share/doc/src/api/local.rst
index 970523e..c91c96b 100644
--- a/share/doc/src/api/local.rst
+++ b/share/doc/src/api/local.rst
@@ -12,9 +12,9 @@
 
 .. _api/local:
 
-========================================
-Local (non-replicating) Document Methods
-========================================
+=================================
+Local (non-replicating) Documents
+=================================
 
 The Local (non-replicating) document interface allows you to create
 local documents that are not replicated to other databases. These

http://git-wip-us.apache.org/repos/asf/couchdb/blob/1944276f/share/doc/src/api/server/authn.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/server/authn.rst b/share/doc/src/api/server/authn.rst
index a3ac3ea..27b1dc6 100644
--- a/share/doc/src/api/server/authn.rst
+++ b/share/doc/src/api/server/authn.rst
@@ -12,12 +12,11 @@
 
 .. _api/auth:
 
-======================
-Authentication Methods
-======================
+==============
+Authentication
+==============
 
-The CouchDB Authentication methods provide an interface for obtaining
-session and authorization data.
+Interfaces for obtaining session and authorization data.
 
 .. note:: We're also strongly recommend you to
    :ref:`setup SSL <config/ssl>` to improve all authentication methods security.


[10/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Merge branch 'remove-e4x-tests'

* remove-e4x-tests:
  remove E4X tests


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 01925664dc3c9d793746a8bb649331726662a8f1
Parents: 659699d 6e7e18c
Author: Jan Lehnardt <ja...@apache.org>
Authored: Mon Oct 7 18:46:14 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Mon Oct 7 18:46:14 2013 +0200

----------------------------------------------------------------------
 share/Makefile.am                         |  1 -
 share/www/script/couch_tests.js           |  1 -
 share/www/script/test/list_views.js       | 26 +---------------
 share/www/script/test/show_documents.js   | 42 --------------------------
 share/www/script/test/update_documents.js | 31 ++-----------------
 share/www/script/test/view_xml.js         | 39 ------------------------
 6 files changed, 4 insertions(+), 136 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/01925664/share/Makefile.am
----------------------------------------------------------------------


[35/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton disable pagination links


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

Branch: refs/heads/1853-fauxton-route-events
Commit: cee22107146b68d14d233bb1b760777bce3ebb55
Parents: 12af14b
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Oct 22 14:21:21 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Oct 22 14:21:21 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/fauxton/components.js | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/cee22107/src/fauxton/app/modules/fauxton/components.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/components.js b/src/fauxton/app/modules/fauxton/components.js
index 03fea87..30a57d8 100644
--- a/src/fauxton/app/modules/fauxton/components.js
+++ b/src/fauxton/app/modules/fauxton/components.js
@@ -67,12 +67,14 @@ function(app, FauxtonAPI) {
 
     previousClicked: function (event) {
       event.preventDefault();
+      if (!this.canShowPreviousfn()) { return; }
       FauxtonAPI.navigate(this.previousUrlfn(), {trigger: false});
       FauxtonAPI.triggerRouteEvent('paginate', 'previous');
     },
 
     nextClicked: function (event) {
       event.preventDefault();
+      if (!this.canShowNextfn()) { return; }
       var doc = this.collection.first();
 
       if (doc) {


[46/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fix /_session section title


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 408ce4478d6c3fbbf95633228138015cc7dc59b1
Parents: 22d4027
Author: Alexander Shorin <kx...@apache.org>
Authored: Sat Oct 26 05:31:39 2013 +0400
Committer: Alexander Shorin <kx...@apache.org>
Committed: Sat Oct 26 05:31:39 2013 +0400

----------------------------------------------------------------------
 share/doc/src/api/server/authn.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/408ce447/share/doc/src/api/server/authn.rst
----------------------------------------------------------------------
diff --git a/share/doc/src/api/server/authn.rst b/share/doc/src/api/server/authn.rst
index 98d6f62..2495e1e 100644
--- a/share/doc/src/api/server/authn.rst
+++ b/share/doc/src/api/server/authn.rst
@@ -85,7 +85,7 @@ To obtain the first token and thus authenticate a user for the first time, the
 .. _api/auth/session:
 
 ``/_session``
-------------
+-------------
 
 .. http:post:: /_session
 


[21/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton: Add advanced options to Alldocs
Fixes COUCHDB-1694


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

Branch: refs/heads/1853-fauxton-route-events
Commit: bcb4fba312ba2ad74b9f19adcaf9eecbaf1bffe7
Parents: 807c4e3
Author: Garren Smith <ga...@gmail.com>
Authored: Fri Oct 11 11:27:45 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 16 10:24:52 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/routes.js     |  16 +-
 src/fauxton/app/modules/documents/views.js      | 433 ++++++++++++-------
 src/fauxton/app/modules/fauxton/base.js         |   4 +-
 .../templates/documents/advanced_options.html   |  94 ++++
 .../templates/documents/all_docs_layout.html    |  20 +
 .../app/templates/documents/jumpdoc.html        |   7 +-
 .../app/templates/documents/view_editor.html    | 123 +-----
 src/fauxton/assets/less/fauxton.less            |   6 +
 src/fauxton/test/core/routeObjectSpec.js        |   5 +-
 9 files changed, 445 insertions(+), 263 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/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 572bf1f..13b2bc9 100644
--- a/src/fauxton/app/modules/documents/routes.js
+++ b/src/fauxton/app/modules/documents/routes.js
@@ -204,12 +204,17 @@ function(app, FauxtonAPI, Documents, Databases) {
 
       if (this.viewEditor) { this.viewEditor.remove(); }
 
-
       this.toolsView = this.setView("#dashboard-upper-menu", new Documents.Views.JumpToDoc({
         database: this.data.database,
         collection: this.data.database.allDocs
       }));
 
+      this.setView("#dashboard-upper-content", new Documents.Views.AllDocsLayout({
+        database: this.data.database,
+        collection: this.data.database.allDocs,
+        params: docOptions
+      }));
+
       this.documentsView = this.setView("#dashboard-lower-content", new Documents.Views.AllDocsList({
         collection: this.data.database.allDocs
       }));
@@ -295,7 +300,14 @@ function(app, FauxtonAPI, Documents, Databases) {
 
     updateAllDocsFromView: function (event) {
       var view = event.view,
-      ddoc = event.ddoc;
+          docOptions = app.getParams(),
+          ddoc = event.ddoc;
+
+      if (event.allDocs) {
+        docOptions.include_docs = true;
+        this.data.database.buildAllDocs(docOptions);
+        return;
+      }
 
       this.data.indexedDocs = new Documents.IndexCollection(null, {
         database: this.data.database,

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 376a2ac..6c39044 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -457,6 +457,81 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
   });
 
+  Views.AllDocsLayout = FauxtonAPI.View.extend({
+    template: "templates/documents/all_docs_layout",
+    className: "row",
+
+    initialize: function (options) {
+      this.database = options.database;
+      this.params = options.params;
+    },
+
+    events: {
+      'click #toggle-query': "toggleQuery"
+    },
+
+    toggleQuery: function (event) {
+      this.$('#query').toggle('fast');
+    },
+
+    beforeRender: function () {
+      this.advancedOptions = this.insertView('#query', new Views.AdvancedOptions({
+        updateViewFn: this.updateView,
+        previewFn: this.previewView,
+        hasReduce: false,
+        showPreview: false
+      }));
+
+      this.$('#query').hide();
+    },
+
+    afterRender: function () {
+      if (this.params) {
+        this.advancedOptions.updateFromParams(this.params);
+      }
+
+    },
+
+    updateView: function (event, paramInfo) {
+      event.preventDefault();
+
+      var errorParams = paramInfo.errorParams,
+          params = paramInfo.params;
+
+      if (_.any(errorParams)) {
+        _.map(errorParams, function(param) {
+
+          // TODO: Where to add this error?
+          // bootstrap wants the error on a control-group div, but we're not using that
+          //$('form.view-query-update input[name='+param+'], form.view-query-update select[name='+param+']').addClass('error');
+          return FauxtonAPI.addNotification({
+            msg: "JSON Parse Error on field: "+param.name,
+            type: "error",
+            selector: ".advanced-options .errors-container"
+          });
+        });
+        FauxtonAPI.addNotification({
+          msg: "Make sure that strings are properly quoted and any other values are valid JSON structures",
+          type: "warning",
+          selector: ".advanced-options .errors-container"
+        });
+
+        return false;
+      }
+
+      var fragment = window.location.hash.replace(/\?.*$/, '');
+      fragment = fragment + '?' + $.param(params);
+      FauxtonAPI.navigate(fragment, {trigger: false});
+
+      FauxtonAPI.triggerRouteEvent('updateAllDocs', {allDocs: true});
+    },
+
+    previewView: function (event) {
+      event.preventDefault();
+    }
+
+  });
+
   // TODO: Rename to reflect that this is a list of rows or documents
   Views.AllDocsList = FauxtonAPI.View.extend({
     template: "templates/documents/all_docs_list",
@@ -886,6 +961,140 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     }
   });
 
+  Views.AdvancedOptions = FauxtonAPI.View.extend({
+    template: "templates/documents/advanced_options",
+    className: "advanced-options well",
+
+    initialize: function (options) {
+      this.updateViewFn = options.updateViewFn;
+      this.previewFn = options.previewFn;
+      this.hadReduce = options.hasReduce || true;
+
+      if (typeof(options.hasReduce) === 'undefined') {
+        this.hasReduce = true;
+      } else {
+        this.hasReduce = options.hasReduce;
+      }
+
+      if (typeof(options.showPreview) === 'undefined') {
+        this.showPreview = true;
+      } else {
+        this.showPreview = options.showPreview;
+      }
+    },
+
+    events: {
+      "change form.view-query-update input": "updateFilters",
+      "change form.view-query-update select": "updateFilters",
+      "submit form.view-query-update": "updateView",
+      "click button.preview": "previewView"
+    },
+
+    queryParams: function () {
+      var $form = this.$(".view-query-update");
+      // Ignore params without a value
+      var params = _.filter($form.serializeArray(), function(param) {
+        return param.value;
+      });
+
+      // Validate *key* params to ensure they're valid JSON
+      var keyParams = ["key","keys","startkey","endkey"];
+      var errorParams = _.filter(params, function(param) {
+        if (_.contains(keyParams, param.name)) {
+          try {
+            JSON.parse(param.value);
+            return false;
+          } catch(e) {
+            return true;
+          }
+        } else {
+          return false;
+        }
+      });
+
+      return {params: params, errorParams: errorParams};
+    },
+
+    updateFilters: function(event) {
+      event.preventDefault();
+      var $ele = $(event.currentTarget);
+      var name = $ele.attr('name');
+      this.updateFiltersFor(name, $ele);
+    },
+
+    updateFiltersFor: function(name, $ele) {
+      var $form = $ele.parents("form.view-query-update:first");
+      switch (name) {
+        // Reduce constraints
+        //   - Can't include_docs for reduce=true
+        //   - can't include group_level for reduce=false
+        case "reduce":
+          if ($ele.prop('checked') === true) {
+          if ($form.find("input[name=include_docs]").prop("checked") === true) {
+            $form.find("input[name=include_docs]").prop("checked", false);
+            var notification = FauxtonAPI.addNotification({
+              msg: "include_docs has been disabled as you cannot include docs on a reduced view",
+              type: "warn",
+              selector: ".view.show .all-docs-list.errors-container"
+            });
+          }
+          $form.find("input[name=include_docs]").prop("disabled", true);
+          $form.find("select[name=group_level]").prop("disabled", false);
+        } else {
+          $form.find("select[name=group_level]").prop("disabled", true);
+          $form.find("input[name=include_docs]").prop("disabled", false);
+        }
+        break;
+        case "include_docs":
+          break;
+      }
+    },
+
+    updateFromParams: function (params) {
+      var $form = this.$el.find("form.view-query-update");
+      _.each(params, function(val, key) {
+        var $ele;
+        switch (key) {
+          case "limit":
+            case "group_level":
+            $form.find("select[name='"+key+"']").val(val);
+          break;
+          case "include_docs":
+            case "stale":
+            case "descending":
+            case "inclusive_end":
+            $form.find("input[name='"+key+"']").prop('checked', true);
+          break;
+          case "reduce":
+            $ele = $form.find("input[name='"+key+"']");
+          if (val == "true") {
+            $ele.prop('checked', true);
+          }
+          this.updateFiltersFor(key, $ele);
+          break;
+          default:
+            $form.find("input[name='"+key+"']").val(val);
+          break;
+        }
+      }, this);
+    },
+
+    updateView: function (event) {
+      this.updateViewFn(event, this.queryParams());
+    },
+
+    previewView: function (event) {
+      this.previewFn(event, this.queryParams());
+    },
+
+    serialize: function () {
+      return {
+        hasReduce: this.hasReduce,
+        showPreview: this.showPreview
+      };
+    }
+  });
+
   //TODO split this into two smaller views, one for advance query options and other for index editing
   Views.ViewEditor = FauxtonAPI.View.extend({
     template: "templates/documents/view_editor",
@@ -893,13 +1102,9 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
     events: {
       "click button.save": "saveView",
-      "click button.preview": "previewView",
       "click button.delete": "deleteView",
       "change select#reduce-function-selector": "updateReduce",
-      "change form.view-query-update input": "updateFilters",
-      "change form.view-query-update select": "updateFilters",
       "change select#ddoc": "updateDesignDoc",
-      "submit form.view-query-update": "updateView",
       "click #db-views-tabs-nav": 'toggleIndexNav'
     },
 
@@ -924,6 +1129,8 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         this.viewName = options.viewName;
         this.ddocInfo = new Documents.DdocInfo({_id: this.ddocID},{database: this.database});
       } 
+
+      _.bindAll(this);
     },
 
     establish: function () {
@@ -965,31 +1172,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       }
     },
 
-    queryParams: function () {
-      var $form = $(".view-query-update");
-      // Ignore params without a value
-      var params = _.filter($form.serializeArray(), function(param) {
-        return param.value;
-      });
-
-      // Validate *key* params to ensure they're valid JSON
-      var keyParams = ["key","keys","startkey","endkey"];
-      var errorParams = _.filter(params, function(param) {
-        if (_.contains(keyParams, param.name)) {
-          try {
-            JSON.parse(param.value);
-            return false;
-          } catch(e) {
-            return true;
-          }
-        } else {
-          return false;
-        }
-      });
-
-      return {params: params, errorParams: errorParams};
-    },
-
     deleteView: function (event) {
       event.preventDefault();
 
@@ -1016,14 +1198,70 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       });
     },
 
-    updateView: function(event) {
+    saveView: function(event) {
+      var json, notification,
+      that = this;
+
+      if (event) { event.preventDefault();}
+
+      if (this.hasValidCode()) {
+        var mapVal = this.mapEditor.getValue(), 
+        reduceVal = this.reduceVal(),
+        viewName = this.$('#index-name').val(),
+        ddoc = this.getCurrentDesignDoc(),
+        ddocName = ddoc.id;
+
+        this.viewName = viewName;
+
+        notification = FauxtonAPI.addNotification({
+          msg: "Saving document.",
+          selector: "#define-view .errors-container"
+        });
+
+        ddoc.setDdocView(viewName, mapVal, reduceVal);
+
+        ddoc.save().then(function () {
+          FauxtonAPI.addNotification({
+            msg: "View has been saved.",
+            type: "success",
+            selector: "#define-view .errors-container"
+          });
+
+          if (that.newView) {
+            var fragment = '/database/' + that.database.id +'/' + ddocName + '/_view/' + viewName; 
+
+            FauxtonAPI.navigate(fragment, {trigger: false});
+            FauxtonAPI.triggerRouteEvent('reloadDesignDocs',{selectedTab: ddocName.replace('_design/','') + '_' + viewName});
+
+            that.newView = false;
+          }
+
+          FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: ddocName, view: viewName});
+
+        }, function(xhr) {
+          var responseText = JSON.parse(xhr.responseText).reason;
+          notification = FauxtonAPI.addNotification({
+            msg: "Save failed: " + responseText,
+            type: "error",
+            clear: true
+          });
+        });
+      } else {
+        notification = FauxtonAPI.addNotification({
+          msg: "Please fix the Javascript errors and try again.",
+          type: "error",
+          selector: "#define-view .errors-container"
+        });
+      }
+    },
+
+    updateView: function(event, paramInfo) {
       event.preventDefault();
 
       if (this.newView) { return alert('Please save this new view before querying it.'); }
 
-      var paramInfo = this.queryParams(),
-      errorParams = paramInfo.errorParams,
-      params = paramInfo.params;
+      var errorParams = paramInfo.errorParams,
+          params = paramInfo.params;
 
       if (_.any(errorParams)) {
         _.map(errorParams, function(param) {
@@ -1053,46 +1291,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: this.ddocID, view: this.viewName});
     },
 
-    updateFilters: function(event) {
-      event.preventDefault();
-      var $ele = $(event.currentTarget);
-      var name = $ele.attr('name');
-      this.updateFiltersFor(name, $ele);
-    },
-
-    updateFiltersFor: function(name, $ele) {
-      var $form = $ele.parents("form.view-query-update:first");
-      switch (name) {
-        // Reduce constraints
-        //   - Can't include_docs for reduce=true
-        //   - can't include group_level for reduce=false
-        case "reduce":
-          if ($ele.prop('checked') === true) {
-          if ($form.find("input[name=include_docs]").prop("checked") === true) {
-            $form.find("input[name=include_docs]").prop("checked", false);
-            var notification = FauxtonAPI.addNotification({
-              msg: "include_docs has been disabled as you cannot include docs on a reduced view",
-              type: "warn",
-              selector: ".view.show .all-docs-list.errors-container"
-            });
-          }
-          $form.find("input[name=include_docs]").prop("disabled", true);
-          $form.find("select[name=group_level]").prop("disabled", false);
-        } else {
-          $form.find("select[name=group_level]").prop("disabled", true);
-          $form.find("input[name=include_docs]").prop("disabled", false);
-        }
-        break;
-        case "include_docs":
-          break;
-      }
-    },
-
-    previewView: function(event) {
+    previewView: function(event, paramsInfo) {
       var that = this,
       mapVal = this.mapEditor.getValue(),
       reduceVal = this.reduceVal(),
-      paramsArr = this.queryParams().params;
+      paramsArr = paramsInfo.params;
 
       var params = _.reduce(paramsArr, function (params, param) {
         params[param.name] = param.value;
@@ -1127,63 +1330,6 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       });
     },
 
-    saveView: function(event) {
-      var json, notification,
-      that = this;
-
-      if (event) { event.preventDefault();}
-
-      if (this.hasValidCode()) {
-        var mapVal = this.mapEditor.getValue(), 
-        reduceVal = this.reduceVal(),
-        viewName = this.$('#index-name').val(),
-        ddoc = this.getCurrentDesignDoc(),
-        ddocName = ddoc.id;
-
-        this.viewName = viewName;
-
-        notification = FauxtonAPI.addNotification({
-          msg: "Saving document.",
-          selector: "#define-view .errors-container"
-        });
-
-        ddoc.setDdocView(viewName, mapVal, reduceVal);
-
-        ddoc.save().then(function () {
-          FauxtonAPI.addNotification({
-            msg: "View has been saved.",
-            type: "success",
-            selector: "#define-view .errors-container"
-          });
-
-          if (that.newView) {
-            var fragment = '/database/' + that.database.id +'/' + ddocName + '/_view/' + viewName; 
-
-            FauxtonAPI.navigate(fragment, {trigger: false});
-            FauxtonAPI.triggerRouteEvent('reloadDesignDocs',{selectedTab: ddocName.replace('_design/','') + '_' + viewName});
-
-            that.newView = false;
-          }
-
-          FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: ddocName, view: viewName});
-
-        }, function(xhr) {
-          var responseText = JSON.parse(xhr.responseText).reason;
-          notification = FauxtonAPI.addNotification({
-            msg: "Save failed: " + responseText,
-            type: "error",
-            clear: true
-          });
-        });
-      } else {
-        notification = FauxtonAPI.addNotification({
-          msg: "Please fix the Javascript errors and try again.",
-          type: "error",
-          selector: "#define-view .errors-container"
-        });
-      }
-    },
-
     getCurrentDesignDoc: function () {
       if (this.newDesignDoc()) {
         var doc = {
@@ -1310,6 +1456,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         this.reduceFunStr = this.model.viewHasReduce(this.viewName);
         this.setView('#ddoc-info', new Views.DdocInfo({model: this.ddocInfo }));
       }
+
+      this.advancedOptions = this.insertView('#query', new Views.AdvancedOptions({
+        updateViewFn: this.updateView,
+        previewFn: this.previewView
+      }));
     },
 
     afterRender: function() {
@@ -1375,32 +1526,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       }
 
       if (this.params) {
-        var $form = this.$el.find("form.view-query-update");
-        _.each(this.params, function(val, key) {
-          var $ele;
-          switch (key) {
-            case "limit":
-              case "group_level":
-              $form.find("select[name='"+key+"']").val(val);
-            break;
-            case "include_docs":
-              case "stale":
-              case "descending":
-              case "inclusive_end":
-              $form.find("input[name='"+key+"']").prop('checked', true);
-            break;
-            case "reduce":
-              $ele = $form.find("input[name='"+key+"']");
-            if (val == "true") {
-              $ele.prop('checked', true);
-            }
-            this.updateFiltersFor(key, $ele);
-            break;
-            default:
-              $form.find("input[name='"+key+"']").val(val);
-            break;
-          }
-        }, this);
+        this.advancedOptions.updateFromParams(this.params);
       }
 
     }
@@ -1415,6 +1541,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
     events: {
       "submit #jump-to-doc": "jumpToDoc",
+      "click #jump-to-doc-label": "jumpToDoc"
     },
 
     jumpToDoc: function (event) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/src/fauxton/app/modules/fauxton/base.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/fauxton/base.js b/src/fauxton/app/modules/fauxton/base.js
index f1d2f70..01c2928 100644
--- a/src/fauxton/app/modules/fauxton/base.js
+++ b/src/fauxton/app/modules/fauxton/base.js
@@ -216,10 +216,10 @@ function(app, Backbone, resizeColumns) {
     },
 
     hide: function(){
-      $(this.el).addClass('hide');
+      this.$el.addClass('hide');
     },
     show: function(){
-      $(this.el).removeClass('hide');
+      this.$el.removeClass('hide');
     },
     update: function(endpoint) {
       this.show();

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/src/fauxton/app/templates/documents/advanced_options.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/advanced_options.html b/src/fauxton/app/templates/documents/advanced_options.html
new file mode 100644
index 0000000..aee2f65
--- /dev/null
+++ b/src/fauxton/app/templates/documents/advanced_options.html
@@ -0,0 +1,94 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+<div class="errors-container"></div>
+<form class="view-query-update custom-inputs">
+  <div class="controls-group">
+    <div class="row-fluid">
+      <div class="controls controls-row">
+        <input name="key" class="span6" type="text" placeholder="Key">
+        <input name="keys" class="span6" type="text" placeholder="Keys">
+      </div>
+    </div>
+    <div class="row-fluid">
+      <div class="controls controls-row">
+        <input name="startkey" class="span6" type="text" placeholder="Start Key">
+        <input name="endkey" class="span6" type="text" placeholder="End Key">
+      </div>
+    </div>
+  </div>
+  <div class="controls-group">
+    <div class="row-fluid">
+      <div class="controls controls-row">
+        <div class="checkbox inline">  
+          <input id="check1" type="checkbox" name="include_docs" value="true">  
+          <label name="include_docs" for="check1">Include Docs</label>  
+          <% if (hasReduce) { %>
+          <input id="check2" name="reduce" type="checkbox" value="true">
+          <label for="check2">Reduce</label>  
+        </div> 
+        <label id="select1" class="drop-down inline">
+          Group Level:
+          <select id="select1" disabled name="group_level" class="input-small">
+            <option value="0">None</option>
+            <option value="1">1</option>
+            <option value="2">2</option>
+            <option value="3">3</option>
+            <option value="4">4</option>
+            <option value="5">5</option>
+            <option value="6">6</option>
+            <option value="7">7</option>
+            <option value="8">8</option>
+            <option value="9">9</option>
+            <option value="999" selected="selected">exact</option>
+          </select>
+        </label>
+        <% } %>
+        <div class="checkbox inline">  
+          <input id="check3" name="stale" type="checkbox" value="ok">
+          <label for="check3">Stale</label>
+          <input id="check4" name="descending" type="checkbox" value="true">  
+          <label for="check4">Descending</label>  
+        </div> 
+        <label class="drop-down inline">
+          Limit:
+          <select name="limit" class="input-small">
+            <option>5</option>
+            <option selected="selected">10</option>
+            <option>25</option>
+            <option>50</option>
+            <option>100</option>
+          </select>
+        </label>
+        <div class="checkbox inline">  
+          <input id="check5" name="inclusive_end" type="checkbox" value="false">
+          <label for="check5">Disable Inclusive End</label>
+          <input id="check6" name="update_seq" type="checkbox" value="true">  
+          <label for="check6">Descending</label>  
+        </div>
+      </div>
+    </div>
+  </div>
+  <div class="controls-group">
+    <div class="row-fluid">
+      <div class="controls controls-row">
+        <button type="submit" class="btn btn-primary btn-large">Query</button>
+        <% if (showPreview) { %>
+        <button class="btn btn-info btn-large preview">Preview</button>
+        <% } %>
+      </div>
+    </div>
+  </div>
+</form>
+</div>
+

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/src/fauxton/app/templates/documents/all_docs_layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/all_docs_layout.html b/src/fauxton/app/templates/documents/all_docs_layout.html
new file mode 100644
index 0000000..cdbd161
--- /dev/null
+++ b/src/fauxton/app/templates/documents/all_docs_layout.html
@@ -0,0 +1,20 @@
+<!--
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
+-->
+<ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
+  <li><a id="toggle-query" class="fonticon-plus fonticon" href="#query" data-toggle="tab">Advanced Options</a></li>
+</ul>
+<div class="tab-content">
+  <div class="tab-pane" id="query">
+  </div>
+</div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/src/fauxton/app/templates/documents/jumpdoc.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/jumpdoc.html b/src/fauxton/app/templates/documents/jumpdoc.html
index 2e83c52..c6f4652 100644
--- a/src/fauxton/app/templates/documents/jumpdoc.html
+++ b/src/fauxton/app/templates/documents/jumpdoc.html
@@ -12,9 +12,8 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 
-
-<form id="jump-to-doc" class="form-inline">
-	<label id="jump-to-doc-label" class="fonticon-search">
-    <input type="text" id="jump-to-doc-id" class="i1nput-large" placeholder="Document ID"></input>
+<form id="jump-to-doc" class="form-inline" >
+  <label id="jump-to-doc-label" class="fonticon-search">
+    <input type="text" id="jump-to-doc-id" class="input-large" placeholder="Document ID"></input>
   </label>
 </form>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/src/fauxton/app/templates/documents/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index b1ca470..64f0f98 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -57,42 +57,42 @@ the License.
 
           <div class="control-group">
             <label for="map-function">Map function <a href="<%=getDocUrl('map_functions')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
-              <% if (newView) { %>
-              <textarea class="js-editor" id="map-function"><%= langTemplates.map %></textarea>
-              <% } else { %>
-              <textarea class="js-editor" id="map-function"><%= ddoc.get('views')[viewName].map %></textarea>
-              <% } %>
+            <% if (newView) { %>
+            <textarea class="js-editor" id="map-function"><%= langTemplates.map %></textarea>
+            <% } else { %>
+            <textarea class="js-editor" id="map-function"><%= ddoc.get('views')[viewName].map %></textarea>
+            <% } %>
           </div>
 
 
           <div class="control-group">
             <label for="reduce-function-selector">Reduce function <a href="<%=getDocUrl('reduce_functions')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
 
-              <select id="reduce-function-selector">
-                <option value="" <%= !reduceFunStr ? 'selected="selected"' : '' %>>None</option>
-                <% _.each(["_sum", "_count", "_stats"], function(reduce) { %>
-                <option value="<%= reduce %>" <% if (reduce == reduceFunStr) { %>selected<% } %>><%= reduce %></option>
-                <% }) %>
-                <option value="CUSTOM" <% if (isCustomReduce) { %>selected<% } %>>Custom reduce</option>
-              </select>
-              <span class="help-block">Reduce functions are optional.</span>
+            <select id="reduce-function-selector">
+              <option value="" <%= !reduceFunStr ? 'selected="selected"' : '' %>>None</option>
+              <% _.each(["_sum", "_count", "_stats"], function(reduce) { %>
+              <option value="<%= reduce %>" <% if (reduce == reduceFunStr) { %>selected<% } %>><%= reduce %></option>
+              <% }) %>
+              <option value="CUSTOM" <% if (isCustomReduce) { %>selected<% } %>>Custom reduce</option>
+            </select>
+            <span class="help-block">Reduce functions are optional.</span>
           </div>
 
 
           <div class="control-group reduce-function">
             <label for="reduce-function">Custom Reduce</label>
-              <% if (newView) { %>
-              <textarea class="js-editor" id="reduce-function"><%= langTemplates.reduce %></textarea>
-              <% } else { %>
-              <textarea class="js-editor" id="reduce-function"><%= ddoc.get('views')[viewName].reduce %></textarea>
-              <% } %>
+            <% if (newView) { %>
+            <textarea class="js-editor" id="reduce-function"><%= langTemplates.reduce %></textarea>
+            <% } else { %>
+            <textarea class="js-editor" id="reduce-function"><%= ddoc.get('views')[viewName].reduce %></textarea>
+            <% } %>
           </div>
 
           <div class="control-group">
-              <button class="button green save fonticon-circle-check">Save</button>
-              <% if (!this.newView) { %>
-              <button class="button cancel-button outlineGray fonticon-circle-x">Delete</button>
-              <% } %>
+            <button class="button green save fonticon-circle-check">Save</button>
+            <% if (!this.newView) { %>
+            <button class="button cancel-button outlineGray fonticon-circle-x">Delete</button>
+            <% } %>
           </div>
           <div class="clearfix"></div>
         </form>
@@ -102,85 +102,6 @@ the License.
       <div id="ddoc-info" class="well"> </div>
     </div>
     <div class="tab-pane" id="query">
-      <div class="advanced-options well">
-        <div class="errors-container"></div>
-        <form class="view-query-update custom-inputs">
-          <div class="controls-group">
-            <div class="row-fluid">
-              <div class="controls controls-row">
-                <input name="key" class="span6" type="text" placeholder="Key">
-                <input name="keys" class="span6" type="text" placeholder="Keys">
-              </div>
-            </div>
-            <div class="row-fluid">
-              <div class="controls controls-row">
-                <input name="startkey" class="span6" type="text" placeholder="Start Key">
-                <input name="endkey" class="span6" type="text" placeholder="End Key">
-              </div>
-            </div>
-          </div>
-          <div class="controls-group">
-            <div class="row-fluid">
-              <div class="controls controls-row">
-                <div class="checkbox inline">  
-                  <input id="check1" type="checkbox" name="include_docs" value="true">  
-                  <label name="include_docs" for="check1">Include Docs</label>  
-                  <% if (hasReduce) { %>
-                  <input id="check2" name="reduce" type="checkbox" value="true">
-                  <label for="check2">Reduce</label>  
-                </div> 
-                <label id="select1" class="drop-down inline">
-                  Group Level:
-                  <select id="select1" disabled name="group_level" class="input-small">
-                    <option value="0">None</option>
-                    <option value="1">1</option>
-                    <option value="2">2</option>
-                    <option value="3">3</option>
-                    <option value="4">4</option>
-                    <option value="5">5</option>
-                    <option value="6">6</option>
-                    <option value="7">7</option>
-                    <option value="8">8</option>
-                    <option value="9">9</option>
-                    <option value="999" selected="selected">exact</option>
-                  </select>
-                </label>
-                <% } %>
-                <div class="checkbox inline">  
-                  <input id="check3" name="stale" type="checkbox" value="ok">
-                  <label for="check3">Stale</label>
-                  <input id="check4" name="descending" type="checkbox" value="true">  
-                  <label for="check4">Descending</label>  
-                </div> 
-                <label class="drop-down inline">
-                  Limit:
-                  <select name="limit" class="input-small">
-                    <option>5</option>
-                    <option selected="selected">10</option>
-                    <option>25</option>
-                    <option>50</option>
-                    <option>100</option>
-                  </select>
-                </label>
-                <div class="checkbox inline">  
-                  <input id="check5" name="inclusive_end" type="checkbox" value="false">
-                  <label for="check5">Disable Inclusive End</label>
-                  <input id="check6" name="update_seq" type="checkbox" value="true">  
-                  <label for="check6">Descending</label>  
-                </div>
-              </div>
-            </div>
-          </div>
-          <div class="controls-group">
-            <div class="row-fluid">
-              <div class="controls controls-row">
-                <button type="submit" class="btn btn-primary btn-large">Query</button>
-                <button class="btn btn-info btn-large preview">Preview</button>
-              </div>
-            </div>
-          </div>
-        </form>
-      </div>
     </div>
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/src/fauxton/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index 42b7836..56d1453 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -519,6 +519,10 @@ footer#mainFooter{
   padding: 0 20px;
 }
 
+.db-views-smaller {
+  max-width: 500px;
+}
+
 .nav-tabs > li{
   margin-right: 2px;
   > a {
@@ -969,6 +973,8 @@ div.spinner {
 #jump-to-doc {
   width: 88%;
   max-width: 600px;
+  float:right;
+  margin-right: 40px;
 
   #jump-to-doc-label {
     width: 100%;

http://git-wip-us.apache.org/repos/asf/couchdb/blob/bcb4fba3/src/fauxton/test/core/routeObjectSpec.js
----------------------------------------------------------------------
diff --git a/src/fauxton/test/core/routeObjectSpec.js b/src/fauxton/test/core/routeObjectSpec.js
index d043d63..987d5b7 100644
--- a/src/fauxton/test/core/routeObjectSpec.js
+++ b/src/fauxton/test/core/routeObjectSpec.js
@@ -27,6 +27,8 @@ define([
         });
 
         testRouteObject = new TestRouteObject();
+        var apiBar = {};
+        apiBar.hide = sinon.spy();
 
         // Need to find a better way of doing this
         mockLayout = {
@@ -35,7 +37,8 @@ define([
           setView: sinon.spy(),
           renderView: sinon.spy(),
           hooks: [],
-          setBreadcrumbs: sinon.spy()
+          setBreadcrumbs: sinon.spy(),
+          apiBar: apiBar
         };
 
       });


[41/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Fauxton: Added expand/collapse to all docs


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

Branch: refs/heads/1853-fauxton-route-events
Commit: ff3fd64d93041d2cc3063b53d29eaaf3e1215716
Parents: 308b993
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Oct 23 17:46:28 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 23 17:48:51 2013 +0200

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/resources.js  | 50 ++++++++++++++++++++
 src/fauxton/app/modules/documents/views.js      | 22 ++++++++-
 .../app/templates/documents/all_docs_list.html  |  5 ++
 3 files changed, 75 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/ff3fd64d/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 5512add..75df7d1 100644
--- a/src/fauxton/app/modules/documents/resources.js
+++ b/src/fauxton/app/modules/documents/resources.js
@@ -282,6 +282,20 @@ function(app, FauxtonAPI) {
       return app.host + "/" + this.database.id + "/_all_docs" + query;
     },
 
+    simple: function () {
+      var docs = this.map(function (item) {
+        return {
+          _id: item.id,
+          _rev: item.get('_rev'),
+        };
+      });
+
+      return new Documents.AllDocs(docs, {
+        database: this.database,
+        params: this.params
+      });
+    },
+
     urlNextPage: function (num, lastId) {
       if (!lastId) {
         var doc = this.last();
@@ -438,6 +452,23 @@ function(app, FauxtonAPI) {
       return this.viewMeta.update_seq || false;
     },
 
+    simple: function () {
+      var docs = this.map(function (item) {
+        return {
+          _id: item.id,
+          key: item.get('key'),
+          value: item.get('value')
+        };
+      });
+
+      return new Documents.IndexCollection(docs, {
+        database: this.database,
+        params: this.params,
+        view: this.view,
+        design: this.design
+      });
+    },
+
     parse: function(resp) {
       var rows = resp.rows;
       this.endTime = new Date().getTime();
@@ -529,6 +560,25 @@ function(app, FauxtonAPI) {
       return '';
     },
 
+    simple: function () {
+      var docs = this.map(function (item) {
+        return {
+          _id: item.id,
+          key: item.get('key'),
+          value: item.get('value')
+        };
+      });
+
+      return new Documents.PouchIndexCollection(docs, {
+        database: this.database,
+        params: this.params,
+        view: this.view,
+        design: this.design,
+        rows: this.rows
+      });
+
+    },
+
     fetch: function() {
       var deferred = FauxtonAPI.Deferred();
       this.reset(this.rows, {silent: true});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ff3fd64d/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index cf5dd35..55ca405 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -539,6 +539,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
     events: {
       "click button.all": "selectAll",
       "click button.bulk-delete": "bulkDelete",
+      "click #collapse": "collapse",
       "change .row-select":"toggleTrash"
     },
 
@@ -560,6 +561,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
         this.ddocID = options.ddocInfo.id;
       }
       this.newView = options.newView || false;
+      this.expandDocs = true;
       this.addPagination();
     },
 
@@ -586,10 +588,23 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
       return {
         viewList: this.viewList,
-        requestDuration: requestDuration
+        requestDuration: requestDuration,
+        expandDocs: this.expandDocs
       };
     },
 
+    collapse: function (event) {
+      event.preventDefault();
+
+      if (this.expandDocs) {
+        this.expandDocs = false;
+      } else {
+        this.expandDocs = true;
+      }
+
+      this.render();
+    },
+
     /*
      * TODO: this should be reconsidered
      * This currently performs delete operations on the model level,
@@ -667,7 +682,10 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
       }));
 
       this.insertView('#documents-pagination', this.pagination);
-      this.collection.each(function(doc) {
+      var docs = this.expandDocs ? this.collection : this.collection.simple();
+      console.log('docs', docs);
+
+      docs.each(function(doc) {
         this.rows[doc.id] = this.insertView("table.all-docs tbody", new this.nestedView({
           model: doc
         }));

http://git-wip-us.apache.org/repos/asf/couchdb/blob/ff3fd64d/src/fauxton/app/templates/documents/all_docs_list.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/templates/documents/all_docs_list.html b/src/fauxton/app/templates/documents/all_docs_list.html
index dcb8dda..335b040 100644
--- a/src/fauxton/app/templates/documents/all_docs_list.html
+++ b/src/fauxton/app/templates/documents/all_docs_list.html
@@ -18,6 +18,11 @@ the License.
       <div class="btn-toolbar span6">
         <button type="button" class="btn all" data-toggle="button">✓ All</button>
         <button class="btn btn-small disabled bulk-delete"><i class="icon-trash"></i></button>
+        <% if (expandDocs) { %>
+        <button id="collapse" class="btn"><i class="icon-minus"></i> Collapse</button>
+        <% } else { %>
+        <button id="collapse" class="btn"><i class="icon-plus"></i> Expand</button>
+        <% } %>
       </div>
     </div>
   <% } %>


[11/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
add fauxton source to distribution


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 0b9fef60be7e48bc7e59961f28deae1dfb66a80a
Parents: 0192566
Author: Jan Lehnardt <ja...@apache.org>
Authored: Wed Oct 9 18:28:28 2013 +0200
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Wed Oct 9 18:28:28 2013 +0200

----------------------------------------------------------------------
 src/Makefile.am | 258 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/0b9fef60/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index f8466b0..e74637e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,6 +26,10 @@ SUBDIRS = \
     couchjs-node
 
 EXTRA_DIST = \
+    $(MY_FIRST_COUCHDB_PLUGIN_FILES) \
+    $(FAUXTON_FILES)
+
+MY_FIRST_COUCHDB_PLUGIN_FILES = \
   my-first-couchdb-plugin/.gitignore \
   my-first-couchdb-plugin/Makefile \
   my-first-couchdb-plugin/priv/default.d/my_first_couchdb_plugin.ini \
@@ -33,3 +37,257 @@ EXTRA_DIST = \
   my-first-couchdb-plugin/src/my_first_couchdb_plugin.app.src \
   my-first-couchdb-plugin/src/my_first_couchdb_plugin.erl \
   my-first-couchdb-plugin/test/my_first_couchdb_plugin_tests.erl
+
+FAUXTON_FILES = \
+    fauxton/app/addons/activetasks/assets/less/activetasks.less \
+    fauxton/app/addons/activetasks/base.js \
+    fauxton/app/addons/activetasks/resources.js \
+    fauxton/app/addons/activetasks/routes.js \
+    fauxton/app/addons/activetasks/templates/detail.html \
+    fauxton/app/addons/activetasks/templates/table.html \
+    fauxton/app/addons/activetasks/templates/tabledetail.html \
+    fauxton/app/addons/activetasks/templates/tabs.html \
+    fauxton/app/addons/activetasks/tests/viewsSpec.js \
+    fauxton/app/addons/activetasks/views.js \
+    fauxton/app/addons/auth/assets/less/auth.less \
+    fauxton/app/addons/auth/base.js \
+    fauxton/app/addons/auth/resources.js \
+    fauxton/app/addons/auth/routes.js \
+    fauxton/app/addons/auth/templates/change_password.html \
+    fauxton/app/addons/auth/templates/create_admin.html \
+    fauxton/app/addons/auth/templates/login.html \
+    fauxton/app/addons/auth/templates/nav_dropdown.html \
+    fauxton/app/addons/auth/templates/nav_link_title.html \
+    fauxton/app/addons/auth/templates/noAccess.html \
+    fauxton/app/addons/config/base.js \
+    fauxton/app/addons/config/resources.js \
+    fauxton/app/addons/config/routes.js \
+    fauxton/app/addons/config/templates/dashboard.html \
+    fauxton/app/addons/config/templates/item.html \
+    fauxton/app/addons/contribute/base.js \
+    fauxton/app/addons/exampleAuth/base.js \
+    fauxton/app/addons/exampleAuth/templates/noAccess.html \
+    fauxton/app/addons/logs/base.js \
+    fauxton/app/addons/logs/resources.js \
+    fauxton/app/addons/logs/routes.js \
+    fauxton/app/addons/logs/templates/dashboard.html \
+    fauxton/app/addons/logs/templates/filterItem.html \
+    fauxton/app/addons/logs/templates/sidebar.html \
+    fauxton/app/addons/logs/tests/logSpec.js \
+    fauxton/app/addons/permissions/assets/less/permissions.less \
+    fauxton/app/addons/permissions/base.js \
+    fauxton/app/addons/permissions/resources.js \
+    fauxton/app/addons/permissions/routes.js \
+    fauxton/app/addons/permissions/templates/item.html \
+    fauxton/app/addons/permissions/templates/permissions.html \
+    fauxton/app/addons/permissions/templates/section.html \
+    fauxton/app/addons/permissions/tests/resourceSpec.js \
+    fauxton/app/addons/permissions/tests/viewsSpec.js \
+    fauxton/app/addons/permissions/views.js \
+    fauxton/app/addons/plugins/base.js \
+    fauxton/app/addons/plugins/resources.js \
+    fauxton/app/addons/plugins/routes.js \
+    fauxton/app/addons/plugins/templates/plugins.html \
+    fauxton/app/addons/replication/assets/less/replication.less \
+    fauxton/app/addons/replication/base.js \
+    fauxton/app/addons/replication/resources.js \
+    fauxton/app/addons/replication/route.js \
+    fauxton/app/addons/replication/templates/form.html \
+    fauxton/app/addons/replication/templates/progress.html \
+    fauxton/app/addons/replication/tests/replicationSpec.js \
+    fauxton/app/addons/replication/views.js \
+    fauxton/app/addons/stats/assets/less/stats.less \
+    fauxton/app/addons/stats/base.js \
+    fauxton/app/addons/stats/resources.js \
+    fauxton/app/addons/stats/routes.js \
+    fauxton/app/addons/stats/templates/by_method.html \
+    fauxton/app/addons/stats/templates/pie_table.html \
+    fauxton/app/addons/stats/templates/stats.html \
+    fauxton/app/addons/stats/templates/statselect.html \
+    fauxton/app/addons/stats/views.js \
+    fauxton/app/api.js \
+    fauxton/app/app.js \
+    fauxton/app/config.js \
+    fauxton/app/helpers.js \
+    fauxton/app/initialize.js \
+    fauxton/app/load_addons.js.underscore \
+    fauxton/app/main.js \
+    fauxton/app/mixins.js \
+    fauxton/app/modules/databases/base.js \
+    fauxton/app/modules/databases/resources.js \
+    fauxton/app/modules/databases/routes.js \
+    fauxton/app/modules/databases/views.js \
+    fauxton/app/modules/documents/base.js \
+    fauxton/app/modules/documents/resources.js \
+    fauxton/app/modules/documents/routes.js \
+    fauxton/app/modules/documents/tests/resourcesSpec.js \
+    fauxton/app/modules/documents/views.js \
+    fauxton/app/modules/fauxton/base.js \
+    fauxton/app/modules/fauxton/components.js \
+    fauxton/app/modules/fauxton/layout.js \
+    fauxton/app/modules/pouchdb/base.js \
+    fauxton/app/modules/pouchdb/pouch.collate.js \
+    fauxton/app/modules/pouchdb/pouchdb.mapreduce.js \
+    fauxton/app/resizeColumns.js \
+    fauxton/app/router.js \
+    fauxton/app/templates/databases/item.html \
+    fauxton/app/templates/databases/list.html \
+    fauxton/app/templates/databases/newdatabase.html \
+    fauxton/app/templates/databases/sidebar.html \
+    fauxton/app/templates/documents/all_docs_item.html \
+    fauxton/app/templates/documents/all_docs_list.html \
+    fauxton/app/templates/documents/changes.html \
+    fauxton/app/templates/documents/ddoc_info.html \
+    fauxton/app/templates/documents/doc.html \
+    fauxton/app/templates/documents/doc_field_editor.html \
+    fauxton/app/templates/documents/doc_field_editor_tabs.html \
+    fauxton/app/templates/documents/duplicate_doc_modal.html \
+    fauxton/app/templates/documents/edit_tools.html \
+    fauxton/app/templates/documents/index_menu_item.html \
+    fauxton/app/templates/documents/index_row_docular.html \
+    fauxton/app/templates/documents/index_row_tabular.html \
+    fauxton/app/templates/documents/jumpdoc.html \
+    fauxton/app/templates/documents/search.html \
+    fauxton/app/templates/documents/sidebar.html \
+    fauxton/app/templates/documents/tabs.html \
+    fauxton/app/templates/documents/upload_modal.html \
+    fauxton/app/templates/documents/view_editor.html \
+    fauxton/app/templates/fauxton/api_bar.html \
+    fauxton/app/templates/fauxton/breadcrumbs.html \
+    fauxton/app/templates/fauxton/footer.html \
+    fauxton/app/templates/fauxton/index_pagination.html \
+    fauxton/app/templates/fauxton/nav_bar.html \
+    fauxton/app/templates/fauxton/notification.html \
+    fauxton/app/templates/fauxton/pagination.html \
+    fauxton/app/templates/layouts/login_pane.html \
+    fauxton/app/templates/layouts/one_pane.html \
+    fauxton/app/templates/layouts/two_pane.html \
+    fauxton/app/templates/layouts/with_right_sidebar.html \
+    fauxton/app/templates/layouts/with_sidebar.html \
+    fauxton/app/templates/layouts/with_tabs.html \
+    fauxton/app/templates/layouts/with_tabs_sidebar.html \
+    fauxton/assets/css/codemirror.css \
+    fauxton/assets/css/nv.d3.css \
+    fauxton/assets/img/couchdb-site.png \
+    fauxton/assets/img/couchdblogo.png \
+    fauxton/assets/img/fontawesome-webfont.eot \
+    fauxton/assets/img/fontawesome-webfont.svg \
+    fauxton/assets/img/fontawesome-webfont.ttf \
+    fauxton/assets/img/fontawesome-webfont.woff \
+    fauxton/assets/img/FontAwesome.otf \
+    fauxton/assets/img/fontcustom_fauxton.eot \
+    fauxton/assets/img/fontcustom_fauxton.svg \
+    fauxton/assets/img/fontcustom_fauxton.ttf \
+    fauxton/assets/img/fontcustom_fauxton.woff \
+    fauxton/assets/img/glyphicons-halflings-white.png \
+    fauxton/assets/img/glyphicons-halflings.png \
+    fauxton/assets/img/linen.png \
+    fauxton/assets/img/loader.gif \
+    fauxton/assets/img/minilogo.png \
+    fauxton/assets/index.underscore \
+    fauxton/assets/js/libs/almond.js \
+    fauxton/assets/js/libs/backbone.js \
+    fauxton/assets/js/libs/bootstrap.js \
+    fauxton/assets/js/libs/codemirror.js \
+    fauxton/assets/js/libs/d3.js \
+    fauxton/assets/js/libs/jquery.js \
+    fauxton/assets/js/libs/jshint.js \
+    fauxton/assets/js/libs/lodash.js \
+    fauxton/assets/js/libs/nv.d3.js \
+    fauxton/assets/js/libs/require.js \
+    fauxton/assets/js/libs/spin.min.js \
+    fauxton/assets/js/plugins/backbone.layoutmanager.js \
+    fauxton/assets/js/plugins/codemirror-javascript.js \
+    fauxton/assets/js/plugins/jquery.form.js \
+    fauxton/assets/js/plugins/prettify.js \
+    fauxton/assets/less/bootstrap/accordion.less \
+    fauxton/assets/less/bootstrap/alerts.less \
+    fauxton/assets/less/bootstrap/bootstrap.less \
+    fauxton/assets/less/bootstrap/breadcrumbs.less \
+    fauxton/assets/less/bootstrap/button-groups.less \
+    fauxton/assets/less/bootstrap/buttons.less \
+    fauxton/assets/less/bootstrap/carousel.less \
+    fauxton/assets/less/bootstrap/close.less \
+    fauxton/assets/less/bootstrap/code.less \
+    fauxton/assets/less/bootstrap/component-animations.less \
+    fauxton/assets/less/bootstrap/dropdowns.less \
+    fauxton/assets/less/bootstrap/font-awesome/bootstrap.less \
+    fauxton/assets/less/bootstrap/font-awesome/core.less \
+    fauxton/assets/less/bootstrap/font-awesome/extras.less \
+    fauxton/assets/less/bootstrap/font-awesome/font-awesome-ie7.less \
+    fauxton/assets/less/bootstrap/font-awesome/font-awesome.less \
+    fauxton/assets/less/bootstrap/font-awesome/icons.less \
+    fauxton/assets/less/bootstrap/font-awesome/mixins.less \
+    fauxton/assets/less/bootstrap/font-awesome/path.less \
+    fauxton/assets/less/bootstrap/font-awesome/variables.less \
+    fauxton/assets/less/bootstrap/forms.less \
+    fauxton/assets/less/bootstrap/grid.less \
+    fauxton/assets/less/bootstrap/hero-unit.less \
+    fauxton/assets/less/bootstrap/labels-badges.less \
+    fauxton/assets/less/bootstrap/layouts.less \
+    fauxton/assets/less/bootstrap/media.less \
+    fauxton/assets/less/bootstrap/mixins.less \
+    fauxton/assets/less/bootstrap/modals.less \
+    fauxton/assets/less/bootstrap/navbar.less \
+    fauxton/assets/less/bootstrap/navs.less \
+    fauxton/assets/less/bootstrap/pager.less \
+    fauxton/assets/less/bootstrap/pagination.less \
+    fauxton/assets/less/bootstrap/popovers.less \
+    fauxton/assets/less/bootstrap/progress-bars.less \
+    fauxton/assets/less/bootstrap/reset.less \
+    fauxton/assets/less/bootstrap/responsive-1200px-min.less \
+    fauxton/assets/less/bootstrap/responsive-767px-max.less \
+    fauxton/assets/less/bootstrap/responsive-768px-979px.less \
+    fauxton/assets/less/bootstrap/responsive-navbar.less \
+    fauxton/assets/less/bootstrap/responsive-utilities.less \
+    fauxton/assets/less/bootstrap/responsive.less \
+    fauxton/assets/less/bootstrap/scaffolding.less \
+    fauxton/assets/less/bootstrap/sprites.less \
+    fauxton/assets/less/bootstrap/tables.less \
+    fauxton/assets/less/bootstrap/tests/buttons.html \
+    fauxton/assets/less/bootstrap/tests/css-tests.css \
+    fauxton/assets/less/bootstrap/thumbnails.less \
+    fauxton/assets/less/bootstrap/tooltip.less \
+    fauxton/assets/less/bootstrap/type.less \
+    fauxton/assets/less/bootstrap/utilities.less \
+    fauxton/assets/less/bootstrap/variables.less \
+    fauxton/assets/less/bootstrap/wells.less \
+    fauxton/assets/less/config.less \
+    fauxton/assets/less/couchdb.less \
+    fauxton/assets/less/database.less \
+    fauxton/assets/less/fauxton.less \
+    fauxton/assets/less/icons.less \
+    fauxton/assets/less/logs.less \
+    fauxton/assets/less/prettyprint.less \
+    fauxton/assets/less/variables.less \
+    fauxton/bin/grunt \
+    fauxton/couchapp.js \
+    fauxton/favicon.ico \
+    fauxton/Gruntfile.js \
+    fauxton/index.html \
+    fauxton/package.json \
+    fauxton/readme.md \
+    fauxton/settings.json.default \
+    fauxton/settings.json.sample_external \
+    fauxton/tasks/addon/rename.json \
+    fauxton/tasks/addon/root/base.js.underscore \
+    fauxton/tasks/addon/root/resources.js.underscore \
+    fauxton/tasks/addon/root/routes.js.underscore \
+    fauxton/tasks/addon/template.js \
+    fauxton/tasks/couchserver.js \
+    fauxton/tasks/fauxton.js \
+    fauxton/tasks/helper.js \
+    fauxton/test/core/layoutSpec.js \
+    fauxton/test/core/navbarSpec.js \
+    fauxton/test/core/paginateSpec.js \
+    fauxton/test/core/routeObjectSpec.js \
+    fauxton/test/mocha/chai.js \
+    fauxton/test/mocha/mocha.css \
+    fauxton/test/mocha/mocha.js \
+    fauxton/test/mocha/sinon-chai.js \
+    fauxton/test/mocha/sinon.js \
+    fauxton/test/mocha/testUtils.js \
+    fauxton/test/runner.html \
+    fauxton/test/test.config.underscore \
+    fauxton/TODO.md \
+    fauxton/writing_addons.md


[24/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
add apache license


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

Branch: refs/heads/1853-fauxton-route-events
Commit: a61b47e4d969a646298c82515c59249a7270e238
Parents: 9710834
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Oct 16 13:32:03 2013 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Wed Oct 16 13:32:03 2013 +0200

----------------------------------------------------------------------
 .../verifyinstall/assets/less/verifyinstall.less       | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/a61b47e4/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less b/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
index 508994b..8a116df 100644
--- a/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
+++ b/src/fauxton/app/addons/verifyinstall/assets/less/verifyinstall.less
@@ -1,3 +1,16 @@
+/*  Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ *  use this file except in compliance with the License. You may obtain a copy of
+ *  the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ *  License for the specific language governing permissions and limitations under
+ *  the License.
+ */
+
 #start {
   margin-bottom: 20px;
 }


[36/50] git commit: updated refs/heads/1853-fauxton-route-events to b70b7ae

Posted by ga...@apache.org.
Added form validation for when you make a view with a new design doc,  so that you have to enter a design doc name


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

Branch: refs/heads/1853-fauxton-route-events
Commit: 90b6db9f3a91929065a807dd377d0f01df0b47e9
Parents: cee2210
Author: suelockwood <de...@gmail.com>
Authored: Wed Oct 23 11:21:11 2013 -0400
Committer: suelockwood <de...@gmail.com>
Committed: Wed Oct 23 11:21:11 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/90b6db9f/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 5122921..283f7b9 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -1251,7 +1251,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
 
       if (event) { event.preventDefault();}
 
-      if (this.hasValidCode()) {
+      if (this.hasValidCode() && this.$('#new-ddoc:visible').val() !=="") {
         var mapVal = this.mapEditor.getValue(), 
         reduceVal = this.reduceVal(),
         viewName = this.$('#index-name').val(),
@@ -1294,8 +1294,9 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
           });
         });
       } else {
+        var errormessage = (this.$('#new-ddoc:visible').val() ==="")?"Enter a design doc name":"Please fix the Javascript errors and try again.";
         notification = FauxtonAPI.addNotification({
-          msg: "Please fix the Javascript errors and try again.",
+          msg: errormessage,
           type: "error",
           selector: "#define-view .errors-container"
         });