couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject fauxton commit: updated refs/heads/master to 7154857
Date Mon, 24 Nov 2014 10:55:55 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master bff1eb9e7 -> 715485799


New design for docs

Port from #33:

Based on the work of Jenn Schiffer <jenn@pancaketheorem.com>
(@jennschiffer), Sue Lockwood <deathbear@apache.org>
(@deathbearbrown) and Sean Barclay (@seanbarclay)


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

Branch: refs/heads/master
Commit: 715485799085ec8e332257e0c9ed5b2fca877d93
Parents: bff1eb9
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Thu Nov 13 16:33:35 2014 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Mon Nov 24 11:51:48 2014 +0100

----------------------------------------------------------------------
 app/addons/documents/assets/less/documents.less | 116 +++++++++++++------
 app/addons/documents/routes-documents.js        |   1 -
 .../documents/templates/all_docs_item.html      |  35 ++++--
 .../documents/templates/all_docs_list.html      |  33 +++---
 app/addons/documents/templates/ddoc_info.html   |   4 +-
 .../documents/tests/nightwatch/bulkDelete.js    |  27 ++++-
 .../tests/nightwatch/deletesDocument.js         |   9 +-
 app/addons/documents/tests/viewsSpec.js         |   2 +-
 app/addons/documents/views.js                   | 113 +++++++-----------
 assets/less/prettyprint.less                    |   8 +-
 assets/less/variables.less                      |  14 +++
 .../custom-commands/createManyDocuments.js      |  32 +++++
 test/nightwatch_tests/nightwatch.json           |   5 +-
 13 files changed, 247 insertions(+), 152 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/app/addons/documents/assets/less/documents.less
----------------------------------------------------------------------
diff --git a/app/addons/documents/assets/less/documents.less b/app/addons/documents/assets/less/documents.less
index bc71274..1f118fe 100644
--- a/app/addons/documents/assets/less/documents.less
+++ b/app/addons/documents/assets/less/documents.less
@@ -17,16 +17,6 @@
 @import "changes.less";
 @import "sidenav.less";
 
-tr.all-docs-item {
-  border: none;
-  background: transparent;
-  .btn-group {
-    position: absolute;
-    right: 0;
-    top: 6px;
-  }
-}
-
 button.beautify {
   margin-top: 20px;
 }
@@ -50,30 +40,6 @@ button.beautify {
   margin-right: 17px;
 }
 
-/** used in all_docs_list.html **/
-.view {
-  table td div {
-    position: relative;
-  }
-
-  table td div div {
-    display: none;
-    line-height: 1;
-    position: absolute;
-    right: 4px;
-    top: 4px;
-  }
-
-  table td div:hover div a.edits {
-    padding-left: 16px;
-    padding-right: 16px;
-  }
-
-  table td div:hover div {
-    display: block;
-  }
-}
-
 /** used in view_editor.html **/
 .design-doc-group {
   .span3 {
@@ -109,6 +75,10 @@ button.beautify {
   padding-right: 20px;
 }
 
+.metadata-page {
+  padding: 20px;
+}
+
 button.string-edit {
   position: absolute;
   padding: 0;
@@ -178,3 +148,81 @@ button.string-edit[disabled] {
     margin-bottom: 0px;
   }
 }
+
+.show-select {
+  #doc-list {
+    padding: 30px 0 0 0;
+  }
+  .custom-inputs {
+    display: block;
+    float: left;
+  }
+  .checkbox.inline {
+    padding-top: 32px;
+    padding-left: 0;
+    label {
+      padding-left: 23px; // 7px to the right-border + 16px around
+    }
+  }
+  .doc-item {
+    width: auto;
+    overflow: hidden;
+  }
+  label.label-checkbox-doclist {
+    // https://code.google.com/p/chromium/issues/detail?id=411065
+    -webkit-user-select: none;
+    height: 1px;
+    width: 1px;
+  }
+  /* checkboxes in doc-list */
+  input[type="checkbox"] + label:before {
+    background-color: @docCheckBoxUncheckedBG;
+    border: @docCheckBoxUncheckedBorder;
+  }
+  input[type="checkbox"] + label:hover:before {
+    border: @docCheckBoxHoverBorder;
+  }
+  input[type="checkbox"]:checked + label::before {
+    border: @docCheckBoxCheckedBorder;
+    background-color: @docCheckBoxCheckedBG;
+  }
+}
+
+#doc-list {
+  padding: 30px 12px 0 12px;
+  div.doc-row {
+    margin-bottom: 20px;
+    .doc-item {
+      vertical-align: top;
+      position: relative;
+      .box-shadow(3px 4px 0 rgba(0, 0, 0, 0.3));
+      header {
+        font-weight: bold;
+        position: relative;
+        padding: 20px;
+        background-color: @docHeaderBG;
+        border-bottom: 1px solid @docHeaderBorderBottom;
+        border-left: 1px solid @docHeaderOtherBorders;
+        border-right: 1px solid @docHeaderOtherBorders;
+        border-top: 1px solid @docHeaderOtherBorders;
+        .header-doc-id {
+          color: @docHeaderDocId;
+          margin-left: 10px;
+        }
+        .header-keylabel,
+        .fonticon-pencil {
+          color: @docHeaderLabels;
+        }
+        .doc-edit-symbol {
+          margin-top: -3px;
+        }
+        .fonticon-pencil {
+          font-size: 20px;
+        }
+        .fonticon-pencil:hover {
+          color: @docHeaderDocId;
+        }
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/app/addons/documents/routes-documents.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-documents.js b/app/addons/documents/routes-documents.js
index bb07402..1fd7232 100644
--- a/app/addons/documents/routes-documents.js
+++ b/app/addons/documents/routes-documents.js
@@ -344,7 +344,6 @@ function(app, FauxtonAPI, Documents, Changes, Index, DocEditor, Databases,
Resou
       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,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/app/addons/documents/templates/all_docs_item.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/all_docs_item.html b/app/addons/documents/templates/all_docs_item.html
index a8ef20f..e0c62fc 100644
--- a/app/addons/documents/templates/all_docs_item.html
+++ b/app/addons/documents/templates/all_docs_item.html
@@ -1,4 +1,4 @@
-<!--
+<%/*
 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
@@ -10,17 +10,28 @@ 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.
--->
+*/%>
 
-<td class="select"><input <%- checked ? 'checked="checked"' : '' %> type="checkbox"
class="js-row-select"></td>
-<td>
-  <div>
+<div class="custom-inputs">
+  <div class="checkbox inline">
+    <input id="checkbox-<%- docIdentifier %>" <%- checked ? 'checked="checked"'
: '' %> type="checkbox" class="js-row-select">
+    <label class="label-checkbox-doclist" for="checkbox-<%- docIdentifier %>"></label>
+  </div>
+</div>
+<div class="doc-item">
+  <header>
+    <span class="header-keylabel"><%- doc.isEditable() ? 'id' : 'key' %></span>
<span class="header-doc-id">"<%- docIdentifier %>"</span>
+
+  <% if (doc.isEditable()) { %>
+    <div class="doc-edit-symbol pull-right">
+      <a href="#<%- doc.url('web-index') %>">
+        <i class="fonticon-pencil"></i>
+      </a>
+    </div>
+  <% } %>
+  </header>
+  <div class="doc-data">
     <pre class="prettyprint"><%- doc.prettyJSON() %></pre>
-    <% if (doc.isEditable()) { %>
-      <div class="btn-group">
-        <a href="#<%= doc.url('web-index') %>" class="btn btn-small edits">Edit
<%- doc.docType() %></a>
-        <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i
class="icon icon-trash"></i></button>
-      </div>
-    <% } %>
   </div>
-</td>
+</div>
+<div class="clearfix"></div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/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 c77fc05..c41ff20 100644
--- a/app/addons/documents/templates/all_docs_list.html
+++ b/app/addons/documents/templates/all_docs_list.html
@@ -1,22 +1,22 @@
-<!--
-Licensed under the Apache License, Version 2.0 (the "License"); you may not
-use this file except in compliance with the License. You may obtain a copy of
-the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations under
-the License.
--->
+<%
+//Licensed under the Apache License, Version 2.0 (the "License"); you may not
+//use this file except in compliance with the License. You may obtain a copy of
+//the License at
+//
+//  http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+//WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+//License for the specific language governing permissions and limitations under
+//the License.
+%>
 
 <div class="view">
   <% if (!viewList) { %>
     <div class="row">
       <div class="btn-toolbar span6">
-        <button type="button" class="btn btn-small all" data-toggle="button">✓ All</button>
+        <button type="button" class="btn btn-small js-all" data-toggle="button">✓
All</button>
         <button class="btn btn-small disabled js-bulk-delete"><i class="icon-trash"></i></button>
         <% if (expandDocs) { %>
         <button id="collapse" class="btn btn-small"><i class="icon-minus"></i>
Collapse</button>
@@ -26,11 +26,8 @@ the License.
       </div>
     </div>
   <% } %>
-  <p>
 
-  <table class="all-docs table table-striped table-condensed">
-    <tbody></tbody>
-  </table>
+  <div id="doc-list"></div>
 
   <% if (endOfResults) { %>
   <div class="end-of-results text-center well">

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/app/addons/documents/templates/ddoc_info.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/ddoc_info.html b/app/addons/documents/templates/ddoc_info.html
index 5c180ec..fe4d72c 100644
--- a/app/addons/documents/templates/ddoc_info.html
+++ b/app/addons/documents/templates/ddoc_info.html
@@ -11,7 +11,7 @@ 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>
+<div class="metadata-page">
   <header class="page-header">
     <h2>Design Document Metadata: _design/<%-Ddoc%> </h2>
     <p class="help">Information about the specified design document, including the
index, index size and current status of the design document and associated index information.<a
href="<%- getDocUrl('design_doc_metadata') %>" class="help-link" target="_blank" data-bypass="true"><i
class="icon-question-sign"></i></a></p>
@@ -58,4 +58,4 @@ the License.
       </dl>
     </div>
   </div>
-</div>
\ No newline at end of file
+</div>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/app/addons/documents/tests/nightwatch/bulkDelete.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/bulkDelete.js b/app/addons/documents/tests/nightwatch/bulkDelete.js
index 0c1db41..cf8adcf 100644
--- a/app/addons/documents/tests/nightwatch/bulkDelete.js
+++ b/app/addons/documents/tests/nightwatch/bulkDelete.js
@@ -20,10 +20,15 @@ module.exports = {
 
     client
       .loginToGUI()
+      .createDocument(newDocumentName1, newDatabaseName)
+      .createDocument(newDocumentName2, newDatabaseName)
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
-      .waitForElementPresent('.all', waitTime, false)
-      .click('.all')
+      .waitForElementPresent('.js-all', waitTime, false)
+      .click('.js-all')
       .click('.js-bulk-delete')
+      .acceptAlert()
+      .waitForElementVisible('#global-notifications .alert.alert-info', waitTime, false)
+      .waitForElementNotPresent('[data-id="' + newDocumentName1 + '"]', waitTime, false)
       .getText('body', function (result) {
         var data = result.value,
             isPresentFirstDoc = data.indexOf(newDocumentName1) !== -1,
@@ -34,5 +39,23 @@ module.exports = {
           'Checking if documents were deleted');
       })
       .end();
+  },
+
+  'Select all works after changing the page': function (client) {
+    var waitTime = 10000,
+        newDatabaseName = client.globals.testDatabaseName,
+        baseUrl = client.globals.baseUrl;
+
+    client
+      .loginToGUI()
+      .createManyDocuments(25, newDatabaseName)
+      .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementVisible('.js-all', waitTime, false)
+      .click('.js-all')
+      .click('#next')
+      .waitForElementPresent('#previous', waitTime, false)
+      .click('#previous')
+      .waitForElementPresent('.js-all.active', waitTime, false)
+      .end();
   }
 };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/app/addons/documents/tests/nightwatch/deletesDocument.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/deletesDocument.js b/app/addons/documents/tests/nightwatch/deletesDocument.js
index 733c5cc..cd8f5ed 100644
--- a/app/addons/documents/tests/nightwatch/deletesDocument.js
+++ b/app/addons/documents/tests/nightwatch/deletesDocument.js
@@ -21,11 +21,12 @@ module.exports = {
       .loginToGUI()
       .createDocument(newDocumentName, newDatabaseName)
       .url(baseUrl)
-      .waitForElementPresent('#dashboard-content a[href="#/database/'+newDatabaseName+'/_all_docs"]',
waitTime, false)
-      .pause(1000)
+      .waitForElementPresent('#dashboard-content a[href="#/database/' + newDatabaseName +
'/_all_docs"]', waitTime, false)
       .click('#dashboard-content a[href="#/database/'+newDatabaseName+'/_all_docs"]')
-      .waitForElementPresent('[data-id="'+newDocumentName+'"] .btn.btn-small.btn-danger.delete',
waitTime, false)
-      .execute('$("[data-id=\''+newDocumentName+'\'] .btn.btn-small.btn-danger.delete").click();')
+      .waitForElementVisible('label[for="checkbox-' + newDocumentName + '"]', waitTime, false)
+      .click('label[for="checkbox-' + newDocumentName + '"]')
+      .waitForElementPresent('.js-bulk-delete:not(.disabled)', waitTime, false)
+      .click('button.js-bulk-delete')
       .acceptAlert()
       .waitForElementVisible('#global-notifications .alert.alert-info', waitTime, false)
       .url(baseUrl+'/'+newDatabaseName+'/_all_docs')

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/app/addons/documents/tests/viewsSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/viewsSpec.js b/app/addons/documents/tests/viewsSpec.js
index df3abf7..06b782a 100644
--- a/app/addons/documents/tests/viewsSpec.js
+++ b/app/addons/documents/tests/viewsSpec.js
@@ -50,7 +50,7 @@ define([
 
     it('pressing SelectAll should fill the delete-bulk-docs-collection', function () {
       assert.equal(bulkDeleteDocCollection.length, 0);
-      view.$('button.all').trigger('click');
+      view.$('button.js-all').trigger('click');
       assert.equal(bulkDeleteDocCollection.length, 1);
     });
   });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 2b4fe1a..986a823 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -176,15 +176,22 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
 
   Views.Document = FauxtonAPI.View.extend({
     template: "addons/documents/templates/all_docs_item",
-    tagName: "tr",
-    className: "all-docs-item",
+
+    className: function () {
+      var classNames = 'all-docs-item doc-row';
+
+      if (this.checked) {
+        classNames = classNames + ' js-to-delete';
+      }
+
+      return classNames;
+    },
 
     initialize: function (options) {
       this.checked = options.checked;
     },
 
     events: {
-      "click button.delete": "destroy",
       "dblclick pre.prettyprint": "edit"
     },
 
@@ -196,6 +203,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
 
     serialize: function() {
       return {
+        docIdentifier: this.model.isEditable() ? this.model.get('_id') : this.model.get('key'),
         doc: this.model,
         checked: this.checked
       };
@@ -208,61 +216,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
     edit: function(event) {
       event.preventDefault();
       FauxtonAPI.navigate("#" + this.model.url('web-index'));
-    },
-
-    destroy: function(event) {
-      event.preventDefault();
-      var that = this;
-
-      if (!window.confirm("Are you sure you want to delete this doc?")) {
-        return false;
-      }
-
-      this.model.destroy().then(function(resp) {
-        FauxtonAPI.addNotification({
-          msg: "Successfully deleted your doc",
-          clear:  true
-        });
-        that.$el.fadeOut(function () {
-          that.remove();
-        });
-
-        that.model.collection.remove(that.model.id);
-        if (!!that.model.id.match('_design')) {
-          FauxtonAPI.triggerRouteEvent('reloadDesignDocs');
-        }
-      }, function(resp) {
-        FauxtonAPI.addNotification({
-          msg: "Failed to deleted your doc!",
-          type: "error",
-          clear:  true
-        });
-      });
     }
   });
 
-  Views.Row = FauxtonAPI.View.extend({
-    template: "addons/documents/templates/index_row_docular",
-    tagName: "tr",
-
-    events: {
-      "click button.delete": "destroy"
-    },
-
-    destroy: function (event) {
-      event.preventDefault();
-      window.alert('Cannot delete a document generated from a view.');
-    },
-
-    serialize: function() {
-      return {
-        doc: this.model,
-        url: this.model.url('app')
-      };
-    }
-  });
-
-
   Views.AllDocsNumber = FauxtonAPI.View.extend({
     template: "addons/documents/templates/all_docs_number",
 
@@ -327,16 +283,18 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
   // TODO: Rename to reflect that this is a list of rows or documents
   Views.AllDocsList = FauxtonAPI.View.extend({
     template: "addons/documents/templates/all_docs_list",
+
+    className: 'show-select',
+
     events: {
-      "click button.all": "selectAll",
+      'click button.js-all': 'selectAll',
       "click button.js-bulk-delete": "bulkDelete",
       "click #collapse": "collapse",
-      "click .all-docs-item": "toggleDocument",
+      'change input': 'toggleDocument',
       "click #js-end-results": "openQueryOptionsTray"
     },
 
     initialize: function (options) {
-      this.nestedView = options.nestedView || Views.Document;
       this.rows = {};
       this.viewList = !!options.viewList;
 
@@ -362,6 +320,10 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
       }.bind(this))).done(function () {
         this.pagination.updatePerPage(parseInt(this.$('#select-per-page :selected').val(),
10));
         FauxtonAPI.triggerRouteEvent('perPageChange', this.pagination.documentsLeftToFetch());
+        FauxtonAPI.addNotification({
+          msg: 'Successfully deleted your docs',
+          clear:  true
+        });
       }.bind(this));
     },
 
@@ -391,20 +353,20 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
     },
 
     toggleDocument: function (event) {
-      var $row = this.$(event.target).closest('tr'),
+      var $row = this.$(event.target).closest('.doc-row'),
           docId = $row.attr('data-id'),
           rev = this.collection.get(docId).get('_rev'),
           data = {_id: docId, _rev: rev, _deleted: true};
 
       if (!$row.hasClass('js-to-delete')) {
         this.bulkDeleteDocsCollection.add(data);
+        $row.find('.js-row-select').prop('checked', true);
       } else {
         this.bulkDeleteDocsCollection.remove(this.bulkDeleteDocsCollection.get(docId));
+        $row.find('.js-row-select').prop('checked', false);
       }
 
-      $row.find('.js-row-select').prop('checked', !$row.hasClass('js-to-delete'));
       $row.toggleClass('js-to-delete');
-
       this.toggleTrash();
     },
 
@@ -418,6 +380,13 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
       }
     },
 
+    maybeHighlightAllButton: function () {
+      if (this.$('.js-to-delete').length < this.$('.all-docs-item').length) {
+        return;
+      }
+      this.$('.js-all').addClass('active');
+    },
+
     openQueryOptionsTray: function(e) {
       e.preventDefault();
       FauxtonAPI.Events.trigger("QueryOptions:openTray");
@@ -445,21 +414,18 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
     },
 
     selectAll: function (evt) {
-      var $allDocs = this.$('.all-docs'),
-          $rows = $allDocs.find('tr'),
-          $checkboxes = $allDocs.find('input:checkbox'),
+      var $allDocs = this.$('#doc-list'),
+          $rows = $allDocs.find('.all-docs-item'),
+          $checkboxes = $rows.find('input:checkbox'),
+          isActive = $(evt.target).hasClass('active'),
           modelsAffected,
           docs;
 
-      $checkboxes.prop('checked', !$(evt.target).hasClass('active')).trigger('change');
+      $checkboxes.prop('checked', !isActive);
+      $rows.toggleClass('js-to-delete', !isActive);
 
-      if ($(evt.target).hasClass('active')) {
-        modelsAffected = _.reduce($rows, function (acc, el) {
-          var docId = $(el).attr('data-id');
-          acc.push(docId);
-          return acc;
-        }, []);
-        this.bulkDeleteDocsCollection.remove(modelsAffected);
+      if (isActive) {
+        this.bulkDeleteDocsCollection.reset();
       } else {
         modelsAffected = _.reduce($rows, function (acc, el) {
           var docId = $(el).attr('data-id'),
@@ -566,7 +532,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
           id = doc.cid;
         }
 
-        this.rows[id] = this.insertView("table.all-docs tbody", new this.nestedView({
+        this.rows[id] = this.insertView('#doc-list', new Views.Document({
           model: doc,
           checked: isChecked
         }));
@@ -605,6 +571,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
       }
 
       this.toggleTrash();
+      this.maybeHighlightAllButton();
     },
 
     perPage: function () {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/assets/less/prettyprint.less
----------------------------------------------------------------------
diff --git a/assets/less/prettyprint.less b/assets/less/prettyprint.less
index 4367b32..0cc316b 100644
--- a/assets/less/prettyprint.less
+++ b/assets/less/prettyprint.less
@@ -12,7 +12,7 @@
  */
 
 pre.prettyprint {
-  background: #E5E0DD;
+  background: @defaultText;
   border: none;
   font-size: 83%;
   line-height: 1.4;
@@ -20,14 +20,14 @@ pre.prettyprint {
   padding: 16px;
 }
 .prettyprint {
-  .pln, .pun,  .typ {
+  .pln, .pun, .typ {
     color: #333;
   }
   .kwd {
-    color: #ff8300;
+    color: #dddddd;
   }
   .str, .lit {
-    color: @red;
+    color: #fff;
   }
   .com {
     color: #666;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/assets/less/variables.less
----------------------------------------------------------------------
diff --git a/assets/less/variables.less b/assets/less/variables.less
index c062345..a75c513 100644
--- a/assets/less/variables.less
+++ b/assets/less/variables.less
@@ -63,6 +63,20 @@
 @breadcrumbArrow: #999999;
 @breadcrumbBorder: @brandPrimary;
 
+/* document-header in doclist */
+@docHeaderBG: #3a3a3a;
+@docHeaderBorderBottom: #2a2a2a;
+@docHeaderOtherBorders: #000;
+@docHeaderLabels: #909090;
+@docHeaderDocId: @red;
+
+/* checkboxes in doc-list */
+@docCheckBoxUncheckedBG: #EFEFEF;
+@docCheckBoxUncheckedBorder: 2px solid #999;
+@docCheckBoxHoverBorder: 2px solid #ccc;
+@docCheckBoxCheckedBorder: 2px solid #000;
+@docCheckBoxCheckedBG: #3a3a3a;
+
 /* sidebar */
 @sidebarBG: #F2F2F2;
 @sidebarWidth: 330px;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/test/nightwatch_tests/custom-commands/createManyDocuments.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/createManyDocuments.js b/test/nightwatch_tests/custom-commands/createManyDocuments.js
new file mode 100644
index 0000000..95bf7d6
--- /dev/null
+++ b/test/nightwatch_tests/custom-commands/createManyDocuments.js
@@ -0,0 +1,32 @@
+var util = require('util'),
+    events = require('events'),
+    helpers = require('../helpers/helpers.js');
+
+function CreateManyDocuments () {
+  events.EventEmitter.call(this);
+}
+
+// inherit from node's event emitter
+util.inherits(CreateManyDocuments, events.EventEmitter);
+
+CreateManyDocuments.prototype.command = function (amount, databaseName) {
+  var that = this,
+      nano = helpers.getNanoInstance(),
+      database = nano.use(databaseName),
+      docs = [];
+
+  for (var i = 0; i < 100; i++) {
+    docs.push({"_id": "" + i, "dummyKey": "testingValue"});
+  }
+
+  database.bulk({docs: docs}, function (err, body, header) {
+    if (err) {
+      throw err;
+    }
+    that.emit('complete');
+  });
+
+  return this;
+};
+
+module.exports = CreateManyDocuments;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/71548579/test/nightwatch_tests/nightwatch.json
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/nightwatch.json b/test/nightwatch_tests/nightwatch.json
index 2ad9441..1f74596 100644
--- a/test/nightwatch_tests/nightwatch.json
+++ b/test/nightwatch_tests/nightwatch.json
@@ -44,7 +44,10 @@
       "desiredCapabilities" : {
         "browserName" : "chrome",
         "javascriptEnabled" : true,
-        "acceptSslCerts" : true
+        "acceptSslCerts" : true,
+        "chromeOptions" : {
+          "args" : ["window-size=1400,900"]
+        }
       }
     },
 


Mime
View raw message