couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject [12/15] fauxton commit: updated refs/heads/secondary-indexes to ddd4a01
Date Tue, 05 Aug 2014 20:59:20 GMT
cancel button functionality, styling


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

Branch: refs/heads/secondary-indexes
Commit: fca125e935e797392cfc17f3200d0b8471f56cb7
Parents: 46c60f5
Author: Jenn Schiffer <jenn@pancaketheorem.com>
Authored: Mon Aug 4 17:46:00 2014 -0400
Committer: deathbearbrown <deathbearbrown@gmail.com>
Committed: Tue Aug 5 16:40:43 2014 -0400

----------------------------------------------------------------------
 .../documents/assets/less/advancedOptions.less     |  9 +++++++++
 .../documents/templates/advanced_options.html      | 17 +++++++++++------
 app/addons/documents/views-advancedopts.js         | 15 +++++++++++++--
 3 files changed, 33 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fca125e9/app/addons/documents/assets/less/advancedOptions.less
----------------------------------------------------------------------
diff --git a/app/addons/documents/assets/less/advancedOptions.less b/app/addons/documents/assets/less/advancedOptions.less
index 6844b8d..83b1655 100644
--- a/app/addons/documents/assets/less/advancedOptions.less
+++ b/app/addons/documents/assets/less/advancedOptions.less
@@ -56,6 +56,11 @@
       padding: 8px;
       border: none;
       color: #eee;
+      font-size: 13px;
+    }
+    .input-small {
+      width: 70px;
+      margin-left: 5px;
     }
     .checkbox {
       padding: 0;
@@ -103,6 +108,7 @@
     padding: 10px 0;
   }
   .row-fluid.fieldsets {
+    margin-bottom: 10px;
     .inline {
       width: 32%;
     }
@@ -111,6 +117,9 @@
       width: 34%;
     }
   }
+  .row-fluid.fieldsets:last-child {
+    margin-bottom: 0;
+  }
   #skipRows {
     margin-left: 5px;
   }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fca125e9/app/addons/documents/templates/advanced_options.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/advanced_options.html b/app/addons/documents/templates/advanced_options.html
index a2feb0a..0502301 100644
--- a/app/addons/documents/templates/advanced_options.html
+++ b/app/addons/documents/templates/advanced_options.html
@@ -37,6 +37,7 @@ the License.
                 <label for="check1">Include Docs</label>
               </div>
 
+              <% if (hasReduce) { %>
                 <div class="checkbox inline">
                   <input id="check2" name="reduce" type="checkbox" value="true">
                   <label for="check2">Reduce</label>
@@ -58,6 +59,7 @@ the License.
                     <option value="999" selected="selected">Exact</option>
                   </select>
                 </label>
+              <% } %>
 
           </div>
         </div>
@@ -113,10 +115,13 @@ the License.
       </div>
 
       <div class="row-fluid fieldsets">
-        <div class="checkbox inline">
-          <input id="check7" name="stale" type="checkbox" value="ok">
-          <label for="check7">Stale</label>
-        </div>
+        <% if (showStale) { %>
+          <div class="checkbox inline">
+            <input id="check7" name="stale" type="checkbox" value="ok">
+            <label for="check7">Stale</label>
+          </div>
+        <% } %>
+
         <div class="checkbox inline">
           <input id="check6" name="update_seq" type="checkbox" value="true">
           <label for="check6">Update Sequence</label>
@@ -124,7 +129,7 @@ the License.
 
         <div class="dropdown inline">
           <label class="drop-down">
-            Limit:
+            Limit 
             <select name="limit" class="input-small">
               <option selected="selected">None</option>
               <option>5</option>
@@ -140,7 +145,7 @@ the License.
 
       </div>
 
-      <div class="row-fluid">
+      <div class="row-fluid fieldsets">
         <div class="checkbox inline">
           <input id="check3" name="descending" type="checkbox" value="true">
           <label for="check3">Descending</label>

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fca125e9/app/addons/documents/views-advancedopts.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views-advancedopts.js b/app/addons/documents/views-advancedopts.js
index aaba97d..9a00c63 100644
--- a/app/addons/documents/views-advancedopts.js
+++ b/app/addons/documents/views-advancedopts.js
@@ -40,7 +40,8 @@ function(app, FauxtonAPI, resizeColumns ) {
       "change form.js-view-query-update select": "updateFilters",
       "submit form.js-view-query-update": "updateView",
       "click .toggle-btns > label":  "toggleQueryKeys",
-      "click #toggle-query": "toggleQuery"
+      "click #toggle-query": "toggleQuery",
+      "click .btn-cancel": "resetForm"
     },
 
     toggleQueryKeys: function(e){
@@ -62,9 +63,19 @@ function(app, FauxtonAPI, resizeColumns ) {
       }
     },
 
-    toggleQuery: function (event) {
+    toggleQuery: function(event) {
       $('#dashboard-content').scrollTop(0);
       this.$('#query-options-tray').toggle();
+    }, 
+
+    resetForm: function() {
+      $('input, textarea').each(function(){
+        $(this).val('');
+      });
+      $('input:checkbox').attr('checked', false);
+      $("select").each(function(){ 
+        this.selectedIndex = 0;
+      });
     },
 
     showKeys: function(){


Mime
View raw message