couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject fauxton commit: updated refs/heads/secondary-indexes to e6f79cc
Date Wed, 13 Aug 2014 16:26:55 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/secondary-indexes 09e4aab92 -> e6f79cc2f


Fix styling the select toggle show


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

Branch: refs/heads/secondary-indexes
Commit: e6f79cc2fc150fb5d0ff0ea59927be9aabf289e5
Parents: 09e4aab
Author: deathbearbrown <deathbearbrown@gmail.com>
Authored: Wed Aug 13 12:26:57 2014 -0400
Committer: deathbearbrown <deathbearbrown@gmail.com>
Committed: Wed Aug 13 12:26:57 2014 -0400

----------------------------------------------------------------------
 app/addons/documents/assets/less/documents.less |  5 +----
 .../documents/templates/all_docs_item.html      |  4 ++--
 app/addons/documents/views.js                   |  8 +++----
 app/addons/indexes/assets/less/doc-item.less    | 22 +++++++++++++++-----
 4 files changed, 24 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e6f79cc2/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 33e7e98..0f9836a 100644
--- a/app/addons/documents/assets/less/documents.less
+++ b/app/addons/documents/assets/less/documents.less
@@ -19,10 +19,7 @@
 @import "sidenav.less";
 @import "headers.less";
 
-tr.all-docs-item {
-  border: none;
-  background: transparent;
-}
+
 button.beautify {
   margin-top: 20px;
 }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e6f79cc2/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 783e4f5..4526df2 100644
--- a/app/addons/documents/templates/all_docs_item.html
+++ b/app/addons/documents/templates/all_docs_item.html
@@ -12,8 +12,8 @@ License for the specific language governing permissions and limitations
under
 the License.
 -->
 
-<div class="select" <% if (!showSelect){ %>style="display:none"<%}%> ><input
<%- checked ? 'checked="checked"' : '' %> type="checkbox" class="js-row-select"></div>
-<div class="doc-item  ">
+<div class="select"><input <%- checked ? 'checked="checked"' : '' %> type="checkbox"
class="js-row-select"></div>
+<div class="doc-item">
 
   <header>
     _id <span class="header-id-number">"<%=docID%>"</span>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e6f79cc2/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index c954122..148ee60 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -257,7 +257,9 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
 
   Views.Document = FauxtonAPI.View.extend({
     template: "addons/documents/templates/all_docs_item",
-    className: "all-docs-item doc-row",
+    className: function(){
+      return (this.showSelect? "showSelect":"") + " all-docs-item doc-row"
+    },
     initialize: function (options) {
       this.checked = options.checked;
       this.expanded = options.expanded;
@@ -269,8 +271,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
     },
 
     showSelectBox: function(bool){
-      this.showSelect = bool;
-      this.$('.select').toggle(this.showSelect);
+      this.$el.toggleClass('showSelect');
     },
 
     selectAll: function(checked){
@@ -295,7 +296,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, Views, QueryOptions,
 
     serialize: function() {
       return {
-        showSelect: this.showSelect,
         expanded: this.expanded,
         docID: this.model.get('_id'),
         doc: this.model,

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e6f79cc2/app/addons/indexes/assets/less/doc-item.less
----------------------------------------------------------------------
diff --git a/app/addons/indexes/assets/less/doc-item.less b/app/addons/indexes/assets/less/doc-item.less
index ea92515..3d3e3ad 100644
--- a/app/addons/indexes/assets/less/doc-item.less
+++ b/app/addons/indexes/assets/less/doc-item.less
@@ -13,18 +13,30 @@
   display: block;
 }
 
+
 #doc-list{
   padding-top: 30px;
-  div.doc-row {
-    margin-bottom:20px;
-    div.select {
-      width: 10%;
+  .all-docs-item {
+    .select {
+      display:none;
       float: left;
       vertical-align: top;
     }
+    &.showSelect{
+      .select {
+        display:block;
+        width: 10%;
+      }
+      .doc-item {
+        width:90%;
+      }
+    }
+  }
+  div.doc-row {
+    margin-bottom:20px;
     .doc-item {
       float:left;
-      width:90%;
+      width:100%;
       vertical-align: top;
       position: relative;
       .border-radius(5px 5px 5px 5px);


Mime
View raw message