couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [44/48] fauxton commit: updated refs/heads/secondary-indexes to 8688d16
Date Mon, 25 Aug 2014 13:40:24 GMT
removed that one index spec because it seemed like a place holder?  Fixed the paginate Spec
to include the correct resources
removed table view from dropdown
remove unused eventer
comment language update
Removed Pouch for now
remove index-components placeholder file
error and comment clean up. All errors will be shown in the global section
Removed comment. Fixed case on event
padding to design doc meta data
Add Unbinds to the global events on cleanup. This will fix that delete triggering the popup
a bunch of times issue
Fixed on On Save and Build Index
removed Preview from the indexes since it's borked
Fauxton events in one line
search icon alignment
Verify install too cramped
Config add new button was hidden
Api button alignment on non all DBs pages


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

Branch: refs/heads/secondary-indexes
Commit: 8688d16f3bf99cc1a57e938258afbb01c8c72b70
Parents: 66d9757
Author: deathbearbrown <deathbearbrown@gmail.com>
Authored: Sun Aug 24 16:33:43 2014 +0200
Committer: deathbearbrown <deathbearbrown@gmail.com>
Committed: Mon Aug 25 09:37:37 2014 -0400

----------------------------------------------------------------------
 app/addons/config/assets/less/config.less       |  2 +
 app/addons/databases/views.js                   |  1 -
 app/addons/documents/routes.js                  | 13 ----
 .../documents/templates/select-doc-menu.html    |  5 +-
 app/addons/documents/tests/views-indexSpec.js   | 33 ----------
 app/addons/documents/views-advancedopts.js      |  6 +-
 app/addons/documents/views-sidebar.js           |  4 ++
 app/addons/documents/views.js                   | 28 +++++---
 app/addons/fauxton/components.js                |  4 ++
 app/addons/fauxton/tests/paginateSpec.js        | 11 ++--
 app/addons/indexes/index-components.js          | 30 ---------
 app/addons/indexes/resources.js                 | 69 --------------------
 app/addons/indexes/routes-core.js               | 49 +++++++-------
 app/addons/indexes/views.js                     | 60 ++---------------
 .../assets/less/verifyinstall.less              |  1 +
 app/addons/verifyinstall/views.js               |  3 +-
 app/core/api.js                                 |  4 +-
 assets/less/fauxton.less                        |  8 +++
 assets/less/headers.less                        | 19 +++++-
 assets/less/pagination.less                     |  1 +
 20 files changed, 98 insertions(+), 253 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/8688d16f/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/8688d16f/app/addons/databases/views.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/views.js b/app/addons/databases/views.js
index e2f0d52..a0fe6f0 100644
--- a/app/addons/databases/views.js
+++ b/app/addons/databases/views.js
@@ -21,7 +21,6 @@ define([
 function(app, Components, FauxtonAPI, Databases) {
   var Views = {};
 
-  //Header for alldocs with search, Query options,& api bar
   Views.RightAllDBsHeader = FauxtonAPI.View.extend({
     className: "header-right",
     template: "addons/databases/templates/header_alldbs",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/8688d16f/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/8688d16f/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/8688d16f/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/8688d16f/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/8688d16f/app/addons/documents/views-sidebar.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-sidebar.js b/app/addons/documents/views-sidebar.js
index 3b970cb..21a6f25 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/8688d16f/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 22cdf65..d787474 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');
     },
@@ -534,6 +539,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();});
@@ -640,6 +647,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/8688d16f/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/8688d16f/app/addons/fauxton/tests/paginateSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/tests/paginateSpec.js b/app/addons/fauxton/tests/paginateSpec.js
index f97b255..2974f61 100644
--- a/app/addons/fauxton/tests/paginateSpec.js
+++ b/app/addons/fauxton/tests/paginateSpec.js
@@ -13,17 +13,18 @@ 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;
 
 
   describe('IndexPaginate', function () {
     var viewSandbox, paginate, collection, navigateMock;
-    beforeEach(function (done) {
-      collection = new Models.IndexCollection([{
+    beforeEach(function () {
+      collection = new IndexModels.IndexCollection([{
         id:'myId1',
         doc: 'num1'
       },
@@ -43,7 +44,7 @@ define([
         canShowNextfn: function () { return true;}
       });
       viewSandbox = new ViewSandbox();
-      viewSandbox.renderView(paginate, done); 
+      viewSandbox.renderView(paginate);
     });
 
     afterEach(function () {
@@ -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/8688d16f/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/8688d16f/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/8688d16f/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/8688d16f/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/8688d16f/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/8688d16f/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/8688d16f/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/8688d16f/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/8688d16f/assets/less/headers.less
----------------------------------------------------------------------
diff --git a/assets/less/headers.less b/assets/less/headers.less
index 1ef0743..27feffa 100644
--- a/assets/less/headers.less
+++ b/assets/less/headers.less
@@ -90,7 +90,7 @@
       height: 60px;
       vertical-align: top;
       &:first-child {
-        font-size: 30px;
+        font-size: 24px;
         .with-sidebar &,
         .two-pane & {
           padding:20px 10px;
@@ -209,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 {
@@ -230,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/8688d16f/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;


Mime
View raw message