couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [07/15] fauxton commit: updated refs/heads/doc-design to 170fccf
Date Fri, 21 Nov 2014 10:57:13 GMT
show-select & select-all


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

Branch: refs/heads/doc-design
Commit: 084fea8c2daf3dd32a93079b853fe8f8a9fc3947
Parents: 77ac4b0
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Fri Nov 14 15:29:45 2014 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Fri Nov 21 11:49:06 2014 +0100

----------------------------------------------------------------------
 app/addons/documents/assets/less/documents.less | 34 ++++++++++++--------
 .../documents/templates/all_docs_list.html      | 26 +++++++--------
 app/addons/documents/views.js                   | 11 ++++---
 3 files changed, 41 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/084fea8c/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 7e2b119..2b52926 100644
--- a/app/addons/documents/assets/less/documents.less
+++ b/app/addons/documents/assets/less/documents.less
@@ -149,8 +149,24 @@ button.string-edit[disabled] {
   }
 }
 
-
-#doc-list {
+.show-select {
+  #doc-list {
+    padding: 30px 0 0 0;
+  }
+  .custom-inputs {
+    display: block;
+    float: left;
+  }
+  .checkbox {
+    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;
@@ -167,21 +183,13 @@ button.string-edit[disabled] {
     border: @docCheckBoxCheckedBorder;
     background-color: @docCheckBoxCheckedBG;
   }
+}
+
+#doc-list {
   padding: 30px 12px 0 12px;
-  .all-docs-item {
-    .custom-inputs {
-      display:block;
-      width: 10%;
-    }
-    .doc-item {
-      width: 90%;
-    }
-  }
   div.doc-row {
     margin-bottom: 20px;
     .doc-item {
-      float: left;
-      width: 100%;
       vertical-align: top;
       position: relative;
       .box-shadow(3px 4px 0 rgba(0, 0, 0, 0.3));

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/084fea8c/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 cede46b..78743a0 100644
--- a/app/addons/documents/templates/all_docs_list.html
+++ b/app/addons/documents/templates/all_docs_list.html
@@ -1,16 +1,16 @@
-<!--
-Licensed under the Apache License, Version 2.0 (the "License"); you may not
-use this file except in compliance with the License. You may obtain a copy of
-the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-License for the specific language governing permissions and limitations under
-the License.
--->
+<%
+//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) { %>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/084fea8c/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 7cff082..ae6cb65 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -177,7 +177,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions)
   Views.Document = FauxtonAPI.View.extend({
     template: "addons/documents/templates/all_docs_item",
 
-    className: 'show-select all-docs-item doc-row',
+    className: 'all-docs-item doc-row',
 
     initialize: function (options) {
       this.checked = options.checked;
@@ -306,6 +306,9 @@ 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-bulk-delete": "bulkDelete",
@@ -423,9 +426,9 @@ 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'),
           modelsAffected,
           docs;
 


Mime
View raw message