couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [8/8] fauxton commit: updated refs/heads/continue-secondary-index to 16049ba
Date Tue, 26 Aug 2014 10:41:58 GMT
Secondary Index work:
Header stuff for all docs
Fixed the resizeColumns code that was the worst
fixing some padding issues in other addons
Commenting out the POC and placeholder stuff
css cleanup
All DBs header update
Fix replication links from all dbs page and header
Fixing rebase issue with the docs
Api button alignment on non all DBs pages
Config add new button was hidden
Verify install too cramped
search icon alignment
Fauxton events in one line
removed Preview from the indexes since it's borked
Fixed on On Save and Build Index
Add Unbinds to the global events on cleanup. This will fix that delete triggering the popup a bunch of times issue
padding to design doc meta data
Removed comment. Fixed case on event
error and comment clean up. All errors will be shown in the global section
remove index-components placeholder file
Removed Pouch for now
comment language update
remove unused eventer
removed table view from dropdown
removed that one index spec because it seemed like a place holder?  Fixed the paginate Spec to include the correct resources


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

Branch: refs/heads/continue-secondary-index
Commit: 16049ba5b4c148577811d2bf191a6f765d9ac205
Parents: 8129168
Author: deathbearbrown <deathbearbrown@gmail.com>
Authored: Thu Aug 14 14:51:55 2014 -0400
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Tue Aug 26 12:40:46 2014 +0200

----------------------------------------------------------------------
 app/addons/config/assets/less/config.less       |   2 +
 app/addons/config/views.js                      |  10 +-
 app/addons/databases/assets/less/databases.less |   3 +
 app/addons/databases/routes.js                  |  11 +-
 .../databases/templates/header_alldbs.html      |  26 ++++
 app/addons/databases/templates/jump_to_db.html  |  19 +++
 app/addons/databases/templates/list.html        |  38 +++---
 app/addons/databases/templates/newdatabase.html |   2 +-
 app/addons/databases/views.js                   | 118 +++++++++++++------
 app/addons/documents/routes.js                  |  13 --
 .../documents/templates/all_docs_list.html      |   2 +-
 .../documents/templates/select-doc-menu.html    |   5 +-
 app/addons/documents/templates/view_editor.html |   0
 app/addons/documents/tests/views-indexSpec.js   |  33 ------
 app/addons/documents/tests/viewsSpec.js.orig    |  57 +++++++++
 app/addons/documents/views-advancedopts.js      |   6 +-
 app/addons/documents/views-sidebar.js           |   4 +
 app/addons/documents/views.js                   |  31 +++--
 app/addons/fauxton/components.js                |   4 +
 app/addons/fauxton/resizeColumns.js             | 112 ++++++------------
 app/addons/fauxton/templates/header_left.html   |   2 +-
 app/addons/fauxton/tests/baseSpec.js            |   6 -
 app/addons/fauxton/tests/paginateSpec.js        |   7 +-
 .../assets/less/new-index-placeholder.less      |   1 +
 app/addons/indexes/base.js                      |  36 +++---
 app/addons/indexes/index-components.js          |  30 -----
 app/addons/indexes/resources.js                 |  69 -----------
 app/addons/indexes/routes-core.js               |  49 ++++----
 app/addons/indexes/routes-viewindexes.js        |   5 +-
 app/addons/indexes/templates/header_right.html  |   4 -
 app/addons/indexes/views.js                     |  60 +---------
 app/addons/permissions/views.js                 |   9 +-
 app/addons/replication/route.js                 |   5 +-
 app/addons/replication/views.js                 |  11 +-
 .../assets/less/verifyinstall.less              |   1 +
 app/addons/verifyinstall/views.js               |   3 +-
 app/core/api.js                                 |   4 +-
 app/templates/layouts/one_pane.html             |   4 +-
 app/templates/layouts/two_pane.html             |   8 +-
 assets/less/bootstrap/dropdowns.less            |   4 +-
 assets/less/bootstrap/variables.less            |   4 +-
 assets/less/fauxton.less                        |   8 ++
 assets/less/headers.less                        |  34 ++++--
 assets/less/pagination.less                     |   1 +
 assets/less/templates.less                      |  20 +---
 45 files changed, 412 insertions(+), 469 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/config/assets/less/config.less
----------------------------------------------------------------------
diff --git a/app/addons/config/assets/less/config.less b/app/addons/config/assets/less/config.less
index 24bbab8..f7b61f8 100644
--- a/app/addons/config/assets/less/config.less
+++ b/app/addons/config/assets/less/config.less
@@ -11,7 +11,9 @@
  *  the License.
  */
 .config-item {
+  margin-top:60px;
   height: 65px;
+  margin-bottom: 10px;
 
   .js-value-input {
     width: 80%;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/config/views.js
----------------------------------------------------------------------
diff --git a/app/addons/config/views.js b/app/addons/config/views.js
index 7952182..792af32 100644
--- a/app/addons/config/views.js
+++ b/app/addons/config/views.js
@@ -46,7 +46,7 @@ function(app, FauxtonAPI, Config, Components) {
 
     uniqueName: function(name){
       var section = _.findWhere(this.collection.toJSON(), {"section":this.model.get("section")});
-      
+
       return _.findWhere(section.options, {name: name});
     },
 
@@ -108,6 +108,8 @@ function(app, FauxtonAPI, Config, Components) {
   });
 
   Views.Table = FauxtonAPI.View.extend({
+    className: "view",
+
     template: "addons/config/templates/dashboard",
 
     events: {
@@ -158,8 +160,8 @@ function(app, FauxtonAPI, Config, Components) {
       "submit #js-add-section-form": "validate"
     },
     initialize: function(){
-      this.sourceArray = _.map(this.collection.toJSON(), function(item, key){ 
-        return item.section; 
+      this.sourceArray = _.map(this.collection.toJSON(), function(item, key){
+        return item.section;
       });
     },
     afterRender: function(){
@@ -200,7 +202,7 @@ function(app, FauxtonAPI, Config, Components) {
           name = this.$('input[name="name"]').val();
           var section = _.findWhere(collection.toJSON(), {"section":sectionName});
           var options = _.findWhere(section.options, {name: name});
-          
+
           return options;
     },
     isSection: function(){

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/databases/assets/less/databases.less
----------------------------------------------------------------------
diff --git a/app/addons/databases/assets/less/databases.less b/app/addons/databases/assets/less/databases.less
index b401e7d..963179e 100644
--- a/app/addons/databases/assets/less/databases.less
+++ b/app/addons/databases/assets/less/databases.less
@@ -32,3 +32,6 @@
         font-size: 19px;
     }
 }
+#new a {
+    text-decoration: none;
+}

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/databases/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/routes.js b/app/addons/databases/routes.js
index 131abf9..a896d1e 100644
--- a/app/addons/databases/routes.js
+++ b/app/addons/databases/routes.js
@@ -36,15 +36,12 @@ function(app, FauxtonAPI, Databases, Views) {
       "_all_dbs(:params)": "allDatabases"
     },
 
-    apiUrl: function() {
-      return [this.databases.url("apiurl"), this.databases.documentation()];
-    },
-
     selectedHeader: "Databases",
 
     initialize: function() {
       this.databases = new Databases.List();
       this.deferred = FauxtonAPI.Deferred();
+
     },
 
     allDatabases: function() {
@@ -55,6 +52,12 @@ function(app, FauxtonAPI, Databases, Views) {
         collection: this.databases
       }));
 
+      this.rightHeader = this.setView("#api-navbar", new Views.RightAllDBsHeader({
+        collection: this.databases,
+        endpoint: this.databases.url("apiurl"),
+        documentation: this.databases.documentation()
+      }));
+
       this.databasesView.setPage(dbPage);
     },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/databases/templates/header_alldbs.html
----------------------------------------------------------------------
diff --git a/app/addons/databases/templates/header_alldbs.html b/app/addons/databases/templates/header_alldbs.html
new file mode 100644
index 0000000..492b5bf
--- /dev/null
+++ b/app/addons/databases/templates/header_alldbs.html
@@ -0,0 +1,26 @@
+<!--
+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.
+-->
+
+  <!-- floats right -->
+
+  <div id="header-api-bar" class="button"></div>
+
+  <!-- add database-->
+  <div class="button" id="add-db-button">
+  </div>
+
+  <!-- search (jump to doc)-->
+  <div id="header-search" class="js-search searchbox-container"></div>
+
+

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/databases/templates/jump_to_db.html
----------------------------------------------------------------------
diff --git a/app/addons/databases/templates/jump_to_db.html b/app/addons/databases/templates/jump_to_db.html
new file mode 100644
index 0000000..6c0f03a
--- /dev/null
+++ b/app/addons/databases/templates/jump_to_db.html
@@ -0,0 +1,19 @@
+<!--
+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.
+-->
+<form id="jump-to-db" class="navbar-form pull-right database-search">
+  <div class="input-append">
+    <input type="text" class="search-autocomplete" name="search-query" placeholder="Database name" />
+    <button class="btn btn-primary" type="submit"><i class="icon icon-search"></i></button>
+  </div>
+</form>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/databases/templates/list.html
----------------------------------------------------------------------
diff --git a/app/addons/databases/templates/list.html b/app/addons/databases/templates/list.html
index 1503c32..874801c 100644
--- a/app/addons/databases/templates/list.html
+++ b/app/addons/databases/templates/list.html
@@ -11,27 +11,19 @@ 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="result-tools" style="">
-  <div id="newButton" class="pull-left"></div>
-  <form id="jump-to-db" class="navbar-form pull-right database-search">
-    <div class="input-append">
-      <input type="text" class="search-autocomplete" name="search-query" placeholder="Database name" />
-      <button class="btn btn-primary" type="submit"><i class="icon icon-search"></i></button>
-    </div>
-  </form>
-
-
+<div class="view">
+  <table class="databases table table-striped">
+    <thead>
+      <th>Name</th>
+      <th>Size</th>
+      <th># of Docs</th>
+      <th>Update Seq</th>
+      <th>Actions</th>
+    </thead>
+    <tbody>
+    </tbody>
+  </table>
 </div>
-<table class="databases table table-striped">
-  <thead>
-    <th>Name</th>
-    <th>Size</th>
-    <th># of Docs</th>
-    <th>Update Seq</th>
-    <th>Actions</th>
-  </thead>
-  <tbody>
-  </tbody>
-</table>
-<div id="database-pagination"></div>
+<footer class="pagination-footer window-resizeable-full">
+  <div id="database-pagination"></div>
+</footer>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/databases/templates/newdatabase.html
----------------------------------------------------------------------
diff --git a/app/addons/databases/templates/newdatabase.html b/app/addons/databases/templates/newdatabase.html
index 1376ad5..2b25aac 100644
--- a/app/addons/databases/templates/newdatabase.html
+++ b/app/addons/databases/templates/newdatabase.html
@@ -12,5 +12,5 @@ License for the specific language governing permissions and limitations under
 the License.
 -->
 
-<a class="btn btn-primary new" id="new"><i class="icon fonticon-new-database"></i> Add New Database</a>
+<a id="new"><i class="icon fonticon-new-database"></i> Add New Database</a>
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/databases/views.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/views.js b/app/addons/databases/views.js
index 5629cb1..a0fe6f0 100644
--- a/app/addons/databases/views.js
+++ b/app/addons/databases/views.js
@@ -21,6 +21,38 @@ define([
 function(app, Components, FauxtonAPI, Databases) {
   var Views = {};
 
+  Views.RightAllDBsHeader = FauxtonAPI.View.extend({
+    className: "header-right",
+    template: "addons/databases/templates/header_alldbs",
+    initialize: function(options){
+      //adding the database to the object
+      _.bindAll(this);
+      this.endpoint = options.endpoint;
+    },
+
+    updateApiUrl: function(api){
+      //this will update the api bar when the route changes
+      //you can find the method that updates it in components.js Components.ApiBar()
+      this.apiBar && this.apiBar.update(api);
+    },
+
+    beforeRender:function(){
+      this.headerSearch = this.insertView("#header-search", new Views.JumpToDB({
+        collection: this.collection
+      }));
+
+      this.newbutton = this.insertView("#add-db-button", new Views.NewDatabaseButton({
+        collection: this.collection
+      }));
+
+
+      //Moved the apibar view into the components file so you can include it in your views
+      this.apiBar = this.insertView("#header-api-bar", new Components.ApiBar({
+        endpoint: this.endpoint
+      }));
+    }
+  });
+
   Views.Item = FauxtonAPI.View.extend({
     template: "addons/databases/templates/item",
     tagName: "tr",
@@ -36,25 +68,16 @@ function(app, Components, FauxtonAPI, Databases) {
     }
   });
 
-  Views.List = FauxtonAPI.View.extend({
-    dbLimit: 20,
-    perPage: 20,
-    template: "addons/databases/templates/list",
+
+  Views.JumpToDB = FauxtonAPI.View.extend({
+    template: "addons/databases/templates/jump_to_db",
     events: {
-      "click button.all": "selectAll",
       "submit form#jump-to-db": "switchDatabase"
     },
-
     initialize: function(options) {
       var params = app.getParams();
       this.page = params.page ? parseInt(params.page, 10) : 1;
     },
-
-    serialize: function() {
-      return {
-        databases: this.collection
-      };
-    },
     establish: function(){
       var currentDBs = this.paginated();
       var deferred = FauxtonAPI.Deferred();
@@ -90,6 +113,55 @@ function(app, Components, FauxtonAPI, Databases) {
         });
       }
     },
+    afterRender: function() {
+      var that = this,
+          AllDBsArray = _.map(this.collection.toJSON(), function(item, key){
+            return item.name;
+          });
+
+      this.dbSearchTypeahead = new Components.Typeahead({
+        el: "input.search-autocomplete",
+        source: AllDBsArray,
+        onUpdate: function (item) {
+          that.switchDatabase(null, item);
+        }
+      });
+      this.dbSearchTypeahead.render();
+      this.$el.find(".js-db-graveyard").tooltip();
+    }
+  });
+
+  Views.List = FauxtonAPI.View.extend({
+    dbLimit: 20,
+    perPage: 20,
+    template: "addons/databases/templates/list",
+    events: {
+      "click button.all": "selectAll"
+    },
+
+    initialize: function(options) {
+      var params = app.getParams();
+      this.page = params.page ? parseInt(params.page, 10) : 1;
+    },
+
+    serialize: function() {
+      return {
+        databases: this.collection
+      };
+    },
+    establish: function(){
+      var currentDBs = this.paginated();
+      var deferred = FauxtonAPI.Deferred();
+
+      FauxtonAPI.when(currentDBs.map(function(database) {
+        return database.status.fetchOnce();
+      })).always(function(resp) {
+        //make this always so that even if a user is not allowed access to a database
+        //they will still see a list of all databases
+        deferred.resolve();
+      });
+      return [deferred];
+    },
 
     paginated: function() {
       var start = (this.page - 1) * this.perPage;
@@ -99,10 +171,6 @@ function(app, Components, FauxtonAPI, Databases) {
 
     beforeRender: function() {
 
-      this.insertView("#newButton", new Views.NewDatabaseButton({
-        collection: this.collection
-      }));
-
       _.each(this.paginated(), function(database) {
         this.insertView("table.databases tbody", new Views.Item({
           model: database
@@ -122,24 +190,6 @@ function(app, Components, FauxtonAPI, Databases) {
     setPage: function(page) {
       this.page = page || 1;
     },
-
-    afterRender: function() {
-      var that = this,
-          AllDBsArray = _.map(this.collection.toJSON(), function(item, key){
-            return item.name;
-          });
-
-      this.dbSearchTypeahead = new Components.Typeahead({
-        el: "input.search-autocomplete",
-        source: AllDBsArray,
-        onUpdate: function (item) {
-          that.switchDatabase(null, item);
-        }
-      });
-      this.dbSearchTypeahead.render();
-      this.$el.find(".js-db-graveyard").tooltip();
-    },
-
     selectAll: function(evt){
       $("input:checkbox").attr('checked', !$(evt.target).hasClass('active'));
     }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes.js b/app/addons/documents/routes.js
index 46fbc51..600b215 100644
--- a/app/addons/documents/routes.js
+++ b/app/addons/documents/routes.js
@@ -392,19 +392,6 @@ function(app, FauxtonAPI, Components, Documents, Changes, DocEditor, Databases,
       };
     },
 
-    // createViewDocumentsView: function (options) {
-
-    //   return this.setView("#dashboard-lower-content", new Documents.Views.AllDocsList({
-    //     database: options.database,
-    //     collection: options.indexedDocs,
-    //     nestedView: Documents.Views.Row,
-    //     viewList: true,
-    //     ddocInfo: this.ddocInfo(options.designDoc, options.designDocs, options.view),
-    //     docParams: options.docParams,
-    //     params: options.urlParams
-    //   }));
-    // },
-
     updateAllDocsFromView: function (event) {
       var view = event.view,
           params = this.createParams(),

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/templates/all_docs_list.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/all_docs_list.html b/app/addons/documents/templates/all_docs_list.html
index bf7e250..4a9482d 100644
--- a/app/addons/documents/templates/all_docs_list.html
+++ b/app/addons/documents/templates/all_docs_list.html
@@ -24,7 +24,7 @@ the License.
     </div>
   <% } %>
 </div>
-<footer class="pagination-footer window-resizeable">
+<footer class="pagination-footer window-resizeable<%=resizeLayout%>">
   <div id="item-numbers"> </div>
   <div id="documents-pagination"></div>
 </footer>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/templates/select-doc-menu.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/select-doc-menu.html b/app/addons/documents/templates/select-doc-menu.html
index a00c851..44295c9 100644
--- a/app/addons/documents/templates/select-doc-menu.html
+++ b/app/addons/documents/templates/select-doc-menu.html
@@ -21,9 +21,6 @@ the License.
 
 <button class="button btn btn-small disabled js-bulk-delete"><i class="icon-trash"></i></button>
 
-<% if (expandDocs) { %>
+
 <button id="collapse" class="button btn btn-small"><i class="icon-minus"></i> Collapse</button>
-<% } else { %>
-<button id="collapse" class="button btn btn-small"><i class="icon-plus"></i> Expand</button>
-<% } %>
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/templates/view_editor.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/view_editor.html b/app/addons/documents/templates/view_editor.html
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/tests/views-indexSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/views-indexSpec.js b/app/addons/documents/tests/views-indexSpec.js
deleted file mode 100644
index 7012a04..0000000
--- a/app/addons/documents/tests/views-indexSpec.js
+++ /dev/null
@@ -1,33 +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.
-define([
-        'addons/documents/views-index',
-        'testUtils'
-], function (Views, testUtils) {
-  var assert = testUtils.assert,
-      ViewSandbox = testUtils.ViewSandbox,
-      viewSandbox;
-
-  describe('Documents Indexes', function () {
-    var view;
-      beforeEach(function () {
-        viewSandbox = new ViewSandbox();
-        viewSandbox.renderView(view);
-      });
-
-      afterEach(function () {
-        viewSandbox.remove();
-      });
-  });
-});
-
-

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/tests/viewsSpec.js.orig
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/viewsSpec.js.orig b/app/addons/documents/tests/viewsSpec.js.orig
new file mode 100644
index 0000000..df3abf7
--- /dev/null
+++ b/app/addons/documents/tests/viewsSpec.js.orig
@@ -0,0 +1,57 @@
+// 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([
+        'addons/documents/views',
+        'addons/documents/resources',
+        'addons/databases/base',
+        'testUtils'
+], function (Views, Resources, Databases, testUtils) {
+  var assert = testUtils.assert,
+      ViewSandbox = testUtils.ViewSandbox,
+      viewSandbox;
+
+  describe('AllDocsList', function () {
+    var database = new Databases.Model({id: 'registry'}),
+        bulkDeleteDocCollection = new Resources.BulkDeleteDocCollection([], {databaseId: 'registry'});
+
+    database.allDocs = new Resources.AllDocs({_id: "ente"}, {
+      database: database,
+      viewMeta: {update_seq: 1},
+      params: {}
+    });
+
+    var view = new Views.Views.AllDocsList({
+      viewList: false,
+      bulkDeleteDocsCollection: bulkDeleteDocCollection,
+      collection: database.allDocs
+    });
+
+    beforeEach(function (done) {
+      viewSandbox = new ViewSandbox();
+      viewSandbox.renderView(view, done);
+    });
+
+    afterEach(function () {
+      viewSandbox.remove();
+    });
+
+    it('should load', function () {
+      assert.equal(typeof Views.Views.AllDocsList, 'function');
+    });
+
+    it('pressing SelectAll should fill the delete-bulk-docs-collection', function () {
+      assert.equal(bulkDeleteDocCollection.length, 0);
+      view.$('button.all').trigger('click');
+      assert.equal(bulkDeleteDocCollection.length, 1);
+    });
+  });
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/views-advancedopts.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-advancedopts.js b/app/addons/documents/views-advancedopts.js
index 993750f..75c00a9 100644
--- a/app/addons/documents/views-advancedopts.js
+++ b/app/addons/documents/views-advancedopts.js
@@ -66,7 +66,7 @@ function(app, FauxtonAPI, resizeColumns ) {
       $('#dashboard-content').scrollTop(0);
       this.$('#query-options-tray').toggle();
       FauxtonAPI.Events.trigger('APIbar:closeTray');
-    }, 
+    },
 
     closeTray: function(){
       $('#query-options-tray').hide();
@@ -278,7 +278,9 @@ function(app, FauxtonAPI, resizeColumns ) {
         }
       }, this);
     },
-
+    cleanup: function (){
+      FauxtonAPI.Events.unbind('AdvancedOptions:closeTray');
+    },
     serialize: function () {
       return {
         hasReduce: this.hasReduce,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/views-sidebar.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-sidebar.js b/app/addons/documents/views-sidebar.js
index fa3f8d6..c392b72 100644
--- a/app/addons/documents/views-sidebar.js
+++ b/app/addons/documents/views-sidebar.js
@@ -117,6 +117,10 @@ function(app, FauxtonAPI, Components, Documents, Databases) {
       },this);
     },
 
+    cleanup: function(){
+      FauxtonAPI.Events.unbind('database:delete');
+    },
+
     afterRender: function () {
       if (this.selectedTab) {
         this.setSelectedTab(this.selectedTab);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index eaf2c84..ac8b794 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -38,7 +38,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     });
   }
 
-  //Header for alldocs with search, Query options,& api bar
   Views.RightAllDocsHeader = FauxtonAPI.View.extend({
     className: "header-right",
     template: "addons/documents/templates/header_alldocs",
@@ -55,9 +54,14 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
       FauxtonAPI.Events.on('success:bulkDelete', this.selectAllMenu);
     },
 
+    cleanup:function(){
+      FauxtonAPI.Events.unbind('advancedOptions:updateView');
+      FauxtonAPI.Events.unbind('success:bulkDelete');
+    },
+
     selectAllMenu: function(e){
       FauxtonAPI.triggerRouteEvent("toggleSelectHeader");
-      FauxtonAPI.Events.trigger("documents:show-select-all",this.selectVisible);
+      FauxtonAPI.Events.trigger("documents:showSelectAll",this.selectVisible);
     },
 
     addAllDocsMenu: function(){
@@ -127,21 +131,15 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
 
       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",
             clear:  true
           });
         });
         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",
           clear:  true
         });
 
@@ -172,7 +170,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
 
     selectAllMenu: function(e){
       FauxtonAPI.triggerRouteEvent("toggleSelectHeader");
-      FauxtonAPI.Events.trigger("documents:show-select-all",this.selectVisible);
+      FauxtonAPI.Events.trigger("documents:showSelectAll",this.selectVisible);
     },
 
     bulkDelete: function(){
@@ -240,16 +238,23 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     className: function(){
       return (this.showSelect? "showSelect":"") + " all-docs-item doc-row";
     },
+
     initialize: function (options) {
       this.checked = options.checked;
       this.expanded = options.expanded;
       this.showSelect = false;
       _.bindAll(this);
-      FauxtonAPI.Events.on("documents:show-select-all", this.showSelectBox);
+      FauxtonAPI.Events.on("documents:showSelectAll", this.showSelectBox);
       FauxtonAPI.Events.on("documents:collapse", this.collapse);
       FauxtonAPI.Events.on("documents:selectAll", this.selectAll);
     },
 
+    cleanup: function(){
+      FauxtonAPI.Events.unbind("documents:showSelectAll");
+      FauxtonAPI.Events.unbind("documents:collapse");
+      FauxtonAPI.Events.unbind("documents:selectAll");
+    },
+
     showSelectBox: function(bool){
       this.$el.toggleClass('showSelect');
     },
@@ -536,8 +541,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
 
     serialize: function() {
       return {
-        viewList: this.viewList,
-        expandDocs: this.expandDocs,
+        resizeLayout: this.viewList?"-half":"",
         endOfResults: !this.pagination.canShowNextfn()
       };
     },
@@ -565,6 +569,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     },
 
     cleanup: function () {
+      FauxtonAPI.Events.unbind("documents:bulkDelete");
+      FauxtonAPI.Events.unbind("documents:selectAll");
       this.pagination && this.pagination.remove();
       this.allDocsNumber && this.allDocsNumber.remove();
       _.each(this.rows, function (row) {row.remove();});
@@ -671,6 +677,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
 
 
   Views.DdocInfo = FauxtonAPI.View.extend({
+    className: "view",
     template: "addons/documents/templates/ddoc_info",
 
     initialize: function (options) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/fauxton/components.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js
index e8bd559..afec0b4 100644
--- a/app/addons/fauxton/components.js
+++ b/app/addons/fauxton/components.js
@@ -140,6 +140,10 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) {
       this.render();
     },
 
+    cleanup: function(){
+      FauxtonAPI.Events.unbind('APIbar:closeTray');
+    },
+
     afterRender: function(){
       ZeroClipboard.config({ moviePath: "/assets/js/plugins/zeroclipboard/ZeroClipboard.swf" });
       var client = new ZeroClipboard(this.$(".copy-url"));

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/fauxton/resizeColumns.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/resizeColumns.js b/app/addons/fauxton/resizeColumns.js
index 3fd1883..f88a3aa 100644
--- a/app/addons/fauxton/resizeColumns.js
+++ b/app/addons/fauxton/resizeColumns.js
@@ -28,101 +28,67 @@ function(FauxtonAPI) {
   };
 
   Resize.prototype = {
-    getPrimaryNavWidth: function(){
-      var primaryNavWidth  = $('body').hasClass('closeMenu') ? 64 : 220;
-      return primaryNavWidth;
-    },
-
-    getSinglePanelWidth: function(){
-      var sidebarWidth = $('#sidebar-content').length > 0 ? $('#sidebar-content').outerWidth() : 0,
-          borders = parseInt($('#dashboard').css('border-left-width'), 10) +
-                    parseInt($('#dashboard-content').css('border-left-width'), 10) +
-                    parseInt($('#dashboard-content').css('border-right-width'), 10);
-
-      return (this.getPrimaryNavWidth() + sidebarWidth + borders);
-    },
-
-    getTwoPanelWidth: function(){
-      var borders = parseInt($('#dashboard').css('border-left-width'), 10) +
-          parseInt($('#right-content').css('border-left-width'), 10) +
-          parseInt($('#left-content').css('border-right-width'), 10)+
-          parseInt($('#left-content').css('border-left-width'), 10) +
-          parseInt($('#right-content').css('border-right-width'), 10);
-      return (this.getPrimaryNavWidth()+ borders);
-    },
 
     initialize: function(){
-     // $(window).off('resize');
-      var that = this;
       //add throttler :)
+      var that = this;
       this.lazyLayout = _.debounce(that.onResizeHandler, 300).bind(this);
       FauxtonAPI.utils.addWindowResize(this.lazyLayout,"animation");
       FauxtonAPI.utils.initWindowResize();
       this.onResizeHandler();
     },
 
-    updateOptions:function(options){
-      this.options = {};
-      this.options = options;
-    },
+    onResizeHandler: function (){
+      var fullWidth = this.getFullWidth(),
+          halfWidth = this.getHalfWidth(),
+          sidebarWidth = this.getSidebarContentWidth(),
+          left = $('.window-resizeable-half').length > 0? halfWidth : sidebarWidth;
 
-    turnOff:function(){
-      FauxtonAPI.utils.removeWindowResize("animation");
+      $('.window-resizeable').innerWidth(sidebarWidth);
+      $('.window-resizeable-half').innerWidth(halfWidth);
+      $('.window-resizeable-full').innerWidth(fullWidth);
+
+      //set left
+      this.setLeftPosition(left);
+      //if there is a callback, run that
+      this.options.callback && this.options.callback();
+      this.trigger('resize');
     },
 
     cleanupCallback: function(){
       this.callback = null;
     },
 
-    singlePanelResize: function(){
-      var combinedWidth = window.innerWidth - this.getSinglePanelWidth(),
-      smallWidthConstraint = ($('#sidebar-content').length > 0)? 470:800,
-      panelWidth;
-
-      if (combinedWidth > smallWidthConstraint) {
-        panelWidth = combinedWidth;
-      } else if (combinedWidth < smallWidthConstraint){
-        panelWidth = smallWidthConstraint;
-      }
-      return panelWidth;
+    getPrimaryNavWidth: function(){
+      var primaryNavWidth  = $('body').hasClass('closeMenu') ? 64 : $('#primary-navbar').outerWidth();
+      //$('body').hasClass('closeMenu') ? 64 : 220;
+      return primaryNavWidth;
     },
 
-    getPanelWidth: function(){
-      var panelWidth;
-      if ($('#dashboard').hasClass('two-pane')){
-        panelWidth = (window.innerWidth - this.getTwoPanelWidth())/2;
-      } else {
-        panelWidth = this.singlePanelResize();
-      }
-      return panelWidth;
+    getWindowWidth: function(){
+      return window.innerWidth;
     },
 
-    setPosition: function(panelWidth){
-      var primary = this.getPrimaryNavWidth();
-      $('.set-left-position').css('left',panelWidth+primary+4);
+    getFullWidth: function(){
+      return this.getWindowWidth() - this.getPrimaryNavWidth();
     },
 
-    onResizeHandler: function (){
-      //if there is an override, do that instead
-      if (this.options.onResizeHandler){
-        this.options.onResizeHandler();
-      } else {
-        /*
-          Just so we all are aware:
-          This entire file and the html of the layouts is bonkers
-          crazy. I hate what horrible things happened in this file.
-          It will change soon with a layout overhaul.
-        */
-
-        var panelWidth = this.getPanelWidth();
-        this.setPosition(panelWidth);
-        $('.window-resizeable').innerWidth(panelWidth);
-      }
-      //if there is a callback, run that
-      if(this.options.callback) {
-        this.options.callback();
-      }
-      this.trigger('resize');
+    getSidebarWidth: function(){
+      return $('#breadcrumbs').length > 0 ? $('#breadcrumbs').outerWidth() : 0;
+    },
+
+    getSidebarContentWidth: function(){
+      return this.getFullWidth() - this.getSidebarWidth() -5;
+    },
+
+    getHalfWidth: function(){
+      var fullWidth = this.getFullWidth();
+      return fullWidth/2;
+    },
+
+    setLeftPosition: function(panelWidth){
+      var primary = this.getPrimaryNavWidth();
+      $('.set-left-position').css('left',panelWidth+primary+4);
     }
   };
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/fauxton/templates/header_left.html
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/templates/header_left.html b/app/addons/fauxton/templates/header_left.html
index 13bea60..420b90b 100644
--- a/app/addons/fauxton/templates/header_left.html
+++ b/app/addons/fauxton/templates/header_left.html
@@ -14,4 +14,4 @@ the License.
 <!--back arrow-->
 <div id="header-breadcrumbs"></div>
   <!-- Menu gear-->
-<div id="header-dropdown-menu"></div>
+<div id="header-dropdown-menu" class="add-dropdown"></div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/fauxton/tests/baseSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/tests/baseSpec.js b/app/addons/fauxton/tests/baseSpec.js
index b9814bc..8a41cff 100644
--- a/app/addons/fauxton/tests/baseSpec.js
+++ b/app/addons/fauxton/tests/baseSpec.js
@@ -61,12 +61,6 @@ define([
       FauxtonAPI.masterLayout = _layout;
     });
 
-    it('Should clear breadcrumbs', function () {
-      FauxtonAPI.masterLayout = mockLayout;
-      testRouteObject.renderWith('the-route', mockLayout, 'args');
-      assert.ok(mockLayout.removeView.calledWith('#breadcrumbs'), 'Clear Breadcrumbs called');
-    });
-
     it('Should set breadcrumbs when breadcrumbs exist', function () {
       FauxtonAPI.masterLayout = mockLayout;
       testRouteObject.renderWith('the-route', mockLayout, 'args');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/fauxton/tests/paginateSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/tests/paginateSpec.js b/app/addons/fauxton/tests/paginateSpec.js
index f97b255..cc03b76 100644
--- a/app/addons/fauxton/tests/paginateSpec.js
+++ b/app/addons/fauxton/tests/paginateSpec.js
@@ -13,9 +13,10 @@ define([
        'app',
        'addons/fauxton/components',
        'addons/documents/resources',
+       'addons/indexes/resources',
        'testUtils',
        'api'
-], function (app, Views, Models, testUtils, FauxtonAPI) {
+], function (app, Views, Models, IndexModels, testUtils, FauxtonAPI) {
   var assert = testUtils.assert,
   ViewSandbox = testUtils.ViewSandbox;
 
@@ -23,7 +24,7 @@ define([
   describe('IndexPaginate', function () {
     var viewSandbox, paginate, collection, navigateMock;
     beforeEach(function (done) {
-      collection = new Models.IndexCollection([{
+      collection = new IndexModels.IndexCollection([{
         id:'myId1',
         doc: 'num1'
       },
@@ -55,7 +56,7 @@ define([
         //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(); 
+        //FauxtonAPI.navigate.restore && FauxtonAPI.navigate.restore();
       });
 
       it('Should trigger routeEvent', function () {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/indexes/assets/less/new-index-placeholder.less
----------------------------------------------------------------------
diff --git a/app/addons/indexes/assets/less/new-index-placeholder.less b/app/addons/indexes/assets/less/new-index-placeholder.less
index ade1d3a..b5ca506 100644
--- a/app/addons/indexes/assets/less/new-index-placeholder.less
+++ b/app/addons/indexes/assets/less/new-index-placeholder.less
@@ -14,6 +14,7 @@
   min-height: 400px;
   padding-top: 60%;
   text-align: center;
+  margin: 0 20%;
   h3 {
     border-bottom: 1px solid #ccc;
     padding-bottom:10px;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/indexes/base.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/base.js b/app/addons/indexes/base.js
index 6365c61..f2220fa 100644
--- a/app/addons/indexes/base.js
+++ b/app/addons/indexes/base.js
@@ -44,14 +44,16 @@ function(app, FauxtonAPI, Routes) {
       ddocType:'view',
       icon: "fonticon-sidenav-map-reduce"
     });
-    FauxtonAPI.registerExtension('sidebar:list', {
-      selector:'list',
-      icon: "fonticon-sidenav-list-function"
-    });
-    FauxtonAPI.registerExtension('sidebar:list', {
-      selector:'show',
-      icon: "fonticon-sidenav-show-function"
-    });
+
+    //Commented out since they are just POCs
+    // FauxtonAPI.registerExtension('sidebar:list', {
+    //   selector:'list',
+    //   icon: "fonticon-sidenav-list-function"
+    // });
+    // FauxtonAPI.registerExtension('sidebar:list', {
+    //   selector:'show',
+    //   icon: "fonticon-sidenav-show-function"
+    // });
 
 
     /* show in the add new menu dropdown */
@@ -59,15 +61,17 @@ function(app, FauxtonAPI, Routes) {
       title: "Secondary View",
       url: "new_view"
     });
-    FauxtonAPI.registerExtension('sidebar:links', {
-      title: "List Function",
-      url: "new_list"
-    });
 
-    FauxtonAPI.registerExtension('sidebar:links', {
-      url: 'new_show',
-      title: 'Show Index'
-    });
+    //Commented out since they are just POCs
+    // FauxtonAPI.registerExtension('sidebar:links', {
+    //   title: "List Function",
+    //   url: "new_list"
+    // });
+
+    // FauxtonAPI.registerExtension('sidebar:links', {
+    //   url: 'new_show',
+    //   title: 'Show Index'
+    // });
 
   };
   return Routes;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/indexes/index-components.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/index-components.js b/app/addons/indexes/index-components.js
deleted file mode 100644
index 1ec34e2..0000000
--- a/app/addons/indexes/index-components.js
+++ /dev/null
@@ -1,30 +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.
-
-
-/*
-  Index components includes any common, generic, and reusable code for creating secondary indexes
-  View functions, List functions, Show Functions, and Filter functions, as well as anything created by
-  couchdb affiliates.
-*/
-
-define([
-  "app",
-  "api"
-],
-
-function(app, FauxtonAPI) {
-  var Components = {};
-
-
-  return Components;
-});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/indexes/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/resources.js b/app/addons/indexes/resources.js
index 626d984..2b5fbe7 100644
--- a/app/addons/indexes/resources.js
+++ b/app/addons/indexes/resources.js
@@ -77,75 +77,6 @@ function(app, FauxtonAPI, PagingCollection) {
   });
 
 
-  Resources.PouchIndexCollection = PagingCollection.extend({
-    model: Resources.ViewRow,
-    documentation: function(){
-      return "docs";
-    },
-    initialize: function(_models, options) {
-      this.database = options.database;
-      this.rows = options.rows;
-      this.view = options.view;
-      this.design = options.design.replace('_design/','');
-      this.params = _.extend({limit: 20, reduce: false}, options.params);
-
-      this.idxType = "_view";
-    },
-
-    url: function () {
-      return '';
-    },
-
-    simple: function () {
-      var docs = this.map(function (item) {
-        return {
-          _id: item.id,
-          key: item.get('key'),
-          value: item.get('value')
-        };
-      });
-
-      return new Resources.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});
-
-      this.viewMeta = {
-        total_rows: this.rows.length,
-        offset: 0,
-        update_seq: false
-      };
-
-      deferred.resolve();
-      return deferred;
-    },
-
-    totalRows: function() {
-      return this.viewMeta.total_rows || "unknown";
-    },
-
-    updateSeq: function() {
-      return this.viewMeta.update_seq || false;
-    },
-
-    buildAllDocs: function(){
-      this.fetch();
-    },
-
-    allDocs: function(){
-      return this.models;
-    }
-  });
-
 
   Resources.IndexCollection = PagingCollection.extend({
     model: Resources.ViewRow,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/indexes/routes-core.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes-core.js b/app/addons/indexes/routes-core.js
index 402ae99..1277c6b 100644
--- a/app/addons/indexes/routes-core.js
+++ b/app/addons/indexes/routes-core.js
@@ -63,7 +63,6 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) {
     },
 
     events: {
-      "route:updatePreviewDocs": "updateAllDocsFromPreview",
       "route:perPageChange": "perPageChange",
       "route:paginate": "paginate",
       "route:updateAllDocs": "updateAllDocsFromView"
@@ -125,7 +124,7 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) {
     },
 
     /* --------------------------------------------------
-      Stored docs in preview
+      determines how many docs to display for the request
     ----------------------------------------------------*/
     getDocPerPageLimit: function (urlParams, perPage) {
       var storedPerPage = perPage;
@@ -174,6 +173,28 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) {
         collection = this.data.database.allDocs;
         collection.paging.pageSize = pageSize;
 
+      } else {
+        collection = this.data.indexedDocs = new Resources.IndexCollection(null, {
+          database: this.data.database,
+          design: ddoc,
+          view: view,
+          params: docParams,
+          paging: {
+            pageSize: pageSize
+          }
+        });
+
+        if (!this.documentsView) {
+          this.documentsView = this.createViewDocumentsView({
+            designDoc: ddoc,
+            docParams: docParams,
+            urlParams: urlParams,
+            database: this.data.database,
+            indexedDocs: this.indexedDocs,
+            designDocs: this.data.designDocs,
+            view: view
+          });
+        }
       }
 
       this.documentsView.setCollection(collection);
@@ -195,30 +216,6 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources) {
         docParams: options.docParams,
         params: options.urlParams
       }));
-    },
-
-
-    /* --------------------------------------------------
-      If Preview worked....
-    ----------------------------------------------------*/
-    updateAllDocsFromPreview: function (event) {
-      var view = event.view,
-      rows = event.rows,
-      ddoc = event.ddoc;
-
-      this.data.indexedDocs = new Documents.PouchIndexCollection(null, {
-        database: this.data.database,
-        design: ddoc,
-        view: view,
-        rows: rows
-      });
-
-      this.documentsView = this.setView("#right-content", new Documents.Views.AllDocsList({
-        database: this.data.database,
-        collection: this.data.indexedDocs,
-        nestedView: Views.Row,
-        viewList: true
-      }));
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/indexes/routes-viewindexes.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/routes-viewindexes.js b/app/addons/indexes/routes-viewindexes.js
index 546d72c..663e0e8 100644
--- a/app/addons/indexes/routes-viewindexes.js
+++ b/app/addons/indexes/routes-viewindexes.js
@@ -85,10 +85,7 @@ function (app, FauxtonAPI, Databases, Views, Documents, Resources, RouteCore, Co
       ];
 
       var dropdown = [{
-        links: [{
-          title: 'Duplicate Index',
-          icon: 'fonticon-documents'
-        },
+        links: [
         {
           title: 'Delete',
           icon: 'fonticon-trash',

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/indexes/templates/header_right.html
----------------------------------------------------------------------
diff --git a/app/addons/indexes/templates/header_right.html b/app/addons/indexes/templates/header_right.html
index 0370e51..2fba038 100644
--- a/app/addons/indexes/templates/header_right.html
+++ b/app/addons/indexes/templates/header_right.html
@@ -21,7 +21,3 @@ the License.
   </div>
 
 
-  <div id="header-select-all" class="button">
-    <span class="toggle-select-menu icon fonticon-ok-circled">Select</span>
-  </div>
-

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/indexes/views.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/views.js b/app/addons/indexes/views.js
index 421495f..a0d5d0d 100644
--- a/app/addons/indexes/views.js
+++ b/app/addons/indexes/views.js
@@ -46,7 +46,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       this.api = options.api;
       this.endpoint = options.endpoint;
       this.documentation = options.documentation;
-      this.eventer = _.extend({}, Backbone.Events);
       FauxtonAPI.Events.on('advancedOptions:updateView', this.updateView);
     },
     updateApiUrl: function(api){
@@ -66,10 +65,14 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
         viewName: this.viewName,
         ddocName: this.model.id,
         hasReduce: this.hasReduce(),
-        eventer: this.eventer,
         showStale: true
       }));
     },
+
+    cleanup: function(){
+      FauxtonAPI.Events.unbind('advancedOptions:updateView');
+    },
+
     hasReduce: function(){
 
     },
@@ -81,10 +84,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
 
        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",
@@ -107,48 +106,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
 
        FauxtonAPI.navigate(fragment, {trigger: false});
        FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: this.ddocID, view: this.viewName});
-    },
-
-
-    previewView: function(event, paramsInfo) {
-      event.preventDefault();
-      var that = this,
-      mapVal = this.mapVal(),
-      reduceVal = this.reduceVal(),
-      paramsArr = [];
-
-      if (paramsInfo && paramsInfo.params) {
-        paramsArr = paramsInfo.params;
-      }
-
-      var params = _.reduce(paramsArr, function (params, param) {
-        params[param.name] = param.value;
-        return params;
-      }, {reduce: false});
-
-      FauxtonAPI.addNotification({
-        msg: "<strong>Warning!</strong> Preview executes the Map/Reduce functions in your browser, and may behave differently from CouchDB.",
-        type: "warning",
-        fade: true,
-        escape: false // beware of possible XSS when the message changes
-      });
-
-      var promise = FauxtonAPI.Deferred();
-
-      if (!this.database.allDocs || this.database.allDocs.params.include_docs !== true) {
-        this.database.buildAllDocs({limit: Databases.DocLimit.toString(), include_docs: true});
-        promise = this.database.allDocs.fetch();
-       } else {
-        promise.resolve();
-       }
-
-      promise.then(function () {
-        params.docs = that.database.allDocs.map(function (model) { return model.get('doc');});
-        var queryPromise = pouchdb.runViewQuery({map: mapVal, reduce: reduceVal}, params);
-        queryPromise.then(function (results) {
-          FauxtonAPI.triggerRouteEvent('updatePreviewDocs', {rows: results.rows, ddoc: that.getCurrentDesignDoc().id, view: that.viewName});
-        });
-      });
     }
   });
 
@@ -177,9 +134,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
     beforeRender: function(){
       var newLinks = [{
         links: [{
-          title: 'Table',
-          icon: 'fonticon-table'
-        },{
           title: 'JSON',
           icon: 'fonticon-json'
         }]
@@ -265,8 +219,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
   });
 
 
-
-
   Views.ViewEditor = FauxtonAPI.View.extend({
     template: "addons/indexes/templates/view_editor",
     builtinReduces: ['_sum', '_count', '_stats'],
@@ -275,7 +227,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       "click button.save": "saveView",
       "click button.delete": "deleteView",
       "change select#reduce-function-selector": "updateReduce",
-      "click button.preview": "previewView",
       "click #db-views-tabs-nav": 'toggleIndexNav',
       "click .beautify_map":  "beautifyCode",
       "click .beautify_reduce":  "beautifyCode"
@@ -629,6 +580,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
       targetEditor.setValue(beautifiedCode);
     },
     cleanup: function () {
+      FauxtonAPI.Events.unbind('index:delete');
       this.mapEditor && this.mapEditor.remove();
       this.reduceEditor && this.reduceEditor.remove();
     }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/permissions/views.js
----------------------------------------------------------------------
diff --git a/app/addons/permissions/views.js b/app/addons/permissions/views.js
index 43f5aab..0080da7 100644
--- a/app/addons/permissions/views.js
+++ b/app/addons/permissions/views.js
@@ -20,6 +20,7 @@ function (app, FauxtonAPI, Permissions ) {
   Permissions.events = _.extend(events, Backbone.Events);
 
   Permissions.Permissions = FauxtonAPI.View.extend({
+    className: "view",
     template: "addons/permissions/templates/permissions",
 
     initialize: function (options) {
@@ -80,7 +81,7 @@ function (app, FauxtonAPI, Permissions ) {
 
     beforeRender: function () {
       var section = this.model.get(this.section);
-      
+
       this.nameViews = [];
       this.roleViews = [];
 
@@ -107,11 +108,11 @@ function (app, FauxtonAPI, Permissions ) {
 
     discardRemovedViews: function () {
       this.nameViews = _.filter(this.nameViews, function (view) {
-        return !view.removed; 
+        return !view.removed;
       });
 
       this.roleViews = _.filter(this.roleViews, function (view) {
-        return !view.removed; 
+        return !view.removed;
       });
     },
 
@@ -178,7 +179,7 @@ function (app, FauxtonAPI, Permissions ) {
     removeItem: function (event) {
       var that = this;
       event.preventDefault();
-      
+
       this.removed = true;
       Permissions.events.trigger('itemRemoved');
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/replication/route.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/route.js b/app/addons/replication/route.js
index 17368f8..d0c298a 100644
--- a/app/addons/replication/route.js
+++ b/app/addons/replication/route.js
@@ -22,6 +22,7 @@ function(app, FauxtonAPI, Replication, Views) {
     roles: ["_admin"],
     routes: {
       "replication": "defaultView",
+      "replication/new/:dbname": "defaultView",
       "replication/:dbname": "defaultView"
     },
     selectedHeader: "Replication",
@@ -29,7 +30,7 @@ function(app, FauxtonAPI, Replication, Views) {
       return [this.replication.url(), this.replication.documentation];
     },
     crumbs: [
-      {"name": "Replicate changes from: ", "link": "replication"}
+      {"name": "Replicate ", "link": "replication"}
     ],
     defaultView: function(dbname){
 			this.databases = new Replication.DBList({});
@@ -39,7 +40,7 @@ function(app, FauxtonAPI, Replication, Views) {
         selectedDB: dbname ||"",
 				collection: this.databases,
         status:  this.tasks
-			}));  
+			}));
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/replication/views.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/views.js b/app/addons/replication/views.js
index a19e609..672022a 100644
--- a/app/addons/replication/views.js
+++ b/app/addons/replication/views.js
@@ -32,7 +32,7 @@ function(app, FauxtonAPI, Components, replication) {
   // -----------------------------------
   // afterRender: autocomplete on the target input field
   // beforeRender:  add the status table
-  // disableFields:  disable non active fields on submit 
+  // disableFields:  disable non active fields on submit
   // enableFields:  enable field when radio btns are clicked
   // establish:  get the DB list for autocomplete
   // formValidation:  make sure fields aren't empty
@@ -43,6 +43,7 @@ function(app, FauxtonAPI, Components, replication) {
   // toggleAdvancedOptions:  toggle advanced
 
   View.ReplicationForm = FauxtonAPI.View.extend({
+    className: "view",
     template: "addons/replication/templates/form",
     events:  {
       "submit #replication": "validate",
@@ -153,7 +154,7 @@ function(app, FauxtonAPI, Components, replication) {
         }
       });
       this.enableFields();
-    },		
+    },
     updateButtonText: function(wait){
       var $button = this.$('#replication button[type=submit]');
       if(wait){
@@ -163,7 +164,7 @@ function(app, FauxtonAPI, Components, replication) {
       }
     },
     submit: function(e){
-      this.disableFields(); 
+      this.disableFields();
       var formJSON = {};
       _.map(this.$(e.currentTarget).serializeArray(), function(formData){
         if(formData.value !== ''){
@@ -173,7 +174,7 @@ function(app, FauxtonAPI, Components, replication) {
 
       this.updateButtonText(true);
       this.startReplication(formJSON);
-    },	
+    },
     swapFields: function(e){
       //WALL O' VARIABLES
       var $fromSelect = this.$('#from_name'),
@@ -219,7 +220,7 @@ function(app, FauxtonAPI, Components, replication) {
     },
     beforeRender:  function(){
       this.collection.forEach(function(item) {
-        this.insertView(new View.replicationItem({ 
+        this.insertView(new View.replicationItem({
           model: item
         }));
       }, this);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/verifyinstall/assets/less/verifyinstall.less
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/assets/less/verifyinstall.less b/app/addons/verifyinstall/assets/less/verifyinstall.less
index e084cb3..b1b15d5 100644
--- a/app/addons/verifyinstall/assets/less/verifyinstall.less
+++ b/app/addons/verifyinstall/assets/less/verifyinstall.less
@@ -11,6 +11,7 @@
 // the License.
 
 #start {
+  margin-top: 20px;
   margin-bottom: 20px;
 }
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/addons/verifyinstall/views.js
----------------------------------------------------------------------
diff --git a/app/addons/verifyinstall/views.js b/app/addons/verifyinstall/views.js
index 1e7e6f5..524e8e0 100644
--- a/app/addons/verifyinstall/views.js
+++ b/app/addons/verifyinstall/views.js
@@ -18,6 +18,7 @@ define([
 function(app, FauxtonAPI, VerifyInstall) {
 
   VerifyInstall.Main = FauxtonAPI.View.extend({
+    className: "view",
     template: 'addons/verifyinstall/templates/main',
 
     events: {
@@ -70,7 +71,7 @@ function(app, FauxtonAPI, VerifyInstall) {
       };
     },
 
-    
+
     startTest: function () {
       this.disableButton();
       this.$('.status').text('');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/core/api.js
----------------------------------------------------------------------
diff --git a/app/core/api.js b/app/core/api.js
index 50a8b12..6053d65 100644
--- a/app/core/api.js
+++ b/app/core/api.js
@@ -27,9 +27,7 @@ function(FauxtonAPI, Layout, Router, RouteObject, utils) {
   });
 
   //global app events
-  FauxtonAPI.Events = {};
-  _.extend(FauxtonAPI.Events, Backbone.Events);
-
+  FauxtonAPI.Events = _.extend({}, Backbone.Events);
 
   FauxtonAPI.navigate = function(url, _opts) {
     var options = _.extend({trigger: true}, _opts );

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/templates/layouts/one_pane.html
----------------------------------------------------------------------
diff --git a/app/templates/layouts/one_pane.html b/app/templates/layouts/one_pane.html
index 0bbc989..a3c770b 100644
--- a/app/templates/layouts/one_pane.html
+++ b/app/templates/layouts/one_pane.html
@@ -17,13 +17,13 @@ the License.
   <div id="global-notifications" class="container errors-container window-resizeable"></div>
   <div class="fixed-header">
     <div id="breadcrumbs"></div>
-    <div id="api-navbar"></div>
+    <div id="api-navbar" class="window-resizeable"></div>
   </div>
 
 
   <div class="row-fluid content-area">
   	<div id="tabs" class="row"></div>
-    <div id="dashboard-content" class="window-resizeable"></div>
+    <div id="dashboard-content" class="window-resizeable-full"></div>
   </div>
 </div>
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/app/templates/layouts/two_pane.html
----------------------------------------------------------------------
diff --git a/app/templates/layouts/two_pane.html b/app/templates/layouts/two_pane.html
index 053285a..aa7e30e 100644
--- a/app/templates/layouts/two_pane.html
+++ b/app/templates/layouts/two_pane.html
@@ -16,12 +16,12 @@ the License.
 <div id="dashboard" class="container-fluid two-pane">
   <div id="global-notifications" class="container errors-container window-resizeable set-left-position"></div>
   <header class="fixed-header row-fluid">
-    <div id="breadcrumbs" class="window-resizeable"></div>
-    <div id="api-navbar" class="window-resizeable"></div>
+    <div id="breadcrumbs" class="window-resizeable-half"></div>
+    <div id="api-navbar" class="window-resizeable-half"></div>
   </header>
 
   <div class="content-area two-pane">
-    <div id="left-content" class="span6 window-resizeable"></div>
-    <div id="right-content" class="span6 window-resizeable set-left-position"></div>
+    <div id="left-content" class="span6 window-resizeable-half"></div>
+    <div id="right-content" class="span6 window-resizeable-half set-left-position"></div>
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/assets/less/bootstrap/dropdowns.less
----------------------------------------------------------------------
diff --git a/assets/less/bootstrap/dropdowns.less b/assets/less/bootstrap/dropdowns.less
index f510b17..62dda0d 100644
--- a/assets/less/bootstrap/dropdowns.less
+++ b/assets/less/bootstrap/dropdowns.less
@@ -65,8 +65,8 @@
   }
   li.header-label{
     background-color: #1A1A1A;
-    color: #676767;
-    padding: 3px 20px;
+    color: #fff;
+    padding: 3px 10px;
     font-size: 13px;
   }
   &.arrow {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/assets/less/bootstrap/variables.less
----------------------------------------------------------------------
diff --git a/assets/less/bootstrap/variables.less b/assets/less/bootstrap/variables.less
index eee77a0..0539bbe 100644
--- a/assets/less/bootstrap/variables.less
+++ b/assets/less/bootstrap/variables.less
@@ -119,12 +119,12 @@
 
 // Dropdowns
 // -------------------------
-@dropdownBackground:            #2B2F33;
+@dropdownBackground:            #1A1A1A;
 @dropdownBorder:                rgba(0,0,0,.2);
 @dropdownDividerTop:            #1A1A1A;
 @dropdownDividerBottom:         #1A1A1A;
 
-@dropdownLinkColor:             #D9D9D9;
+@dropdownLinkColor:             #E33F3B;
 @dropdownLinkColorHover:        @white;
 @dropdownLinkColorActive:       @white;
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/assets/less/fauxton.less
----------------------------------------------------------------------
diff --git a/assets/less/fauxton.less b/assets/less/fauxton.less
index 74c698a..0b3fede 100644
--- a/assets/less/fauxton.less
+++ b/assets/less/fauxton.less
@@ -248,6 +248,14 @@ div.spinner {
   top: 50%;
 }
 
+#api-navbar{
+  > div{
+    > .api-url-btn {
+      padding:10px;
+    }
+  }
+}
+
 .api-url-btn {
   .icon {
     font-size: 11px;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/assets/less/headers.less
----------------------------------------------------------------------
diff --git a/assets/less/headers.less b/assets/less/headers.less
index a110714..27feffa 100644
--- a/assets/less/headers.less
+++ b/assets/less/headers.less
@@ -49,12 +49,7 @@
     }
   }
   .one-pane & {
-    #breadcrumbs{
-      width: 90%;
-    }
-    position: relative;
-    border: none;
-    .box-shadow(none);
+    .bottom-shadow-border;
     left: auto;
   }
   /* these styles are for the new header*/
@@ -74,9 +69,7 @@
 
 #breadcrumbs {
   height: 60px;
-  &.sidebar{
-    width: @sidebarWidth - 4;
-  }
+  width: @sidebarWidth - 4;
   /* these styles are for the new header*/
   .header-left{
     > div{
@@ -97,7 +90,7 @@
       height: 60px;
       vertical-align: top;
       &:first-child {
-        font-size: 30px;
+        font-size: 24px;
         .with-sidebar &,
         .two-pane & {
           padding:20px 10px;
@@ -132,7 +125,7 @@
       color: #666666;
     }
     a {
-      padding: 10px 20px;
+      padding: 10px;
       text-decoration: none;
     }
     .dropdown {
@@ -140,7 +133,7 @@
       padding: 20px 0px;
     }
     .dropdown-menu {
-      left: -109px;
+      left: -115px;
       top: 48px;
     }
   }
@@ -216,9 +209,15 @@
       border: none;
       position: absolute;
       right: 12px;
-      top: 8px;
+      top: 0px;
+      height:60px;
       z-index: 2;
       color: #999;
+      .icon-search{
+        position: absolute;
+        top: 22px;
+        right: 15px;
+      }
     }
   }
   > div {
@@ -237,3 +236,12 @@
   right: 25px;
 }
 
+#jump-to-doc{
+  .btn-primary {
+    .icon-search{
+      position: absolute;
+      top: 18px;
+      right: 15px;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/assets/less/pagination.less
----------------------------------------------------------------------
diff --git a/assets/less/pagination.less b/assets/less/pagination.less
index df0740a..3911b90 100644
--- a/assets/less/pagination.less
+++ b/assets/less/pagination.less
@@ -11,6 +11,7 @@
  *  the License.
  */
 footer.pagination-footer {
+  min-width: 600px;
   position:fixed;
   background-color:#fff;
   bottom:0;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/16049ba5/assets/less/templates.less
----------------------------------------------------------------------
diff --git a/assets/less/templates.less b/assets/less/templates.less
index abf1c4b..cf66117 100644
--- a/assets/less/templates.less
+++ b/assets/less/templates.less
@@ -342,28 +342,20 @@
   }
 }
 
-#dashboard-lower-content .view{
-  padding: 20px;
-}
 
-#dashboard-upper-content{
-  .tab-content {
-    padding-top: 70px;
-  }
-  .well{
+#dashboard-content{
+  .view {
     padding: 20px;
-    .border-radius(0);
-    .box-shadow(none);
   }
-}
-
-#dashboard-content{
   &.row-fluid,
   &.window-resizeable{
     /*remove gutter without rewriting variable*/
     margin-left: 0px;
   }
-  padding: 20px;
+  .one-pane &{
+    margin-top:60px;
+    padding-bottom:60px;
+  }
   .with-sidebar &{
     .left-shadow-border;
     border-right: 1px solid #999;


Mime
View raw message