couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [23/34] couchdb commit: updated refs/heads/paginate-api-options to b63c791
Date Mon, 03 Mar 2014 16:58:35 GMT
remove api options


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

Branch: refs/heads/paginate-api-options
Commit: 69fa6c43e4cc23bf29b0aeeeb625bba20e4571ba
Parents: 2cf0f41
Author: Garren Smith <garren.smith@gmail.com>
Authored: Tue Feb 11 08:49:47 2014 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon Mar 3 11:18:41 2014 +0200

----------------------------------------------------------------------
 .../documents/templates/advanced_options.html   |  4 +--
 .../documents/templates/all_docs_layout.html    |  6 ++--
 .../addons/documents/templates/view_editor.html |  3 ++
 src/fauxton/app/addons/documents/views.js       | 30 +++++++++++---------
 4 files changed, 25 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/69fa6c43/src/fauxton/app/addons/documents/templates/advanced_options.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/templates/advanced_options.html b/src/fauxton/app/addons/documents/templates/advanced_options.html
index 8f592f4..fbf958e 100644
--- a/src/fauxton/app/addons/documents/templates/advanced_options.html
+++ b/src/fauxton/app/addons/documents/templates/advanced_options.html
@@ -71,9 +71,9 @@ the License.
             <option >20</option>
             <option>30</option>
             <option>50</option>
-            <option selected="selected">100</option>
+            <option >100</option>
             <option>500</option>
-            <option>None</option>
+            <option selected="selected">None</option>
           </select>
         </label>
         <div class="checkbox inline">  

http://git-wip-us.apache.org/repos/asf/couchdb/blob/69fa6c43/src/fauxton/app/addons/documents/templates/all_docs_layout.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/templates/all_docs_layout.html b/src/fauxton/app/addons/documents/templates/all_docs_layout.html
index 1bbe59d..2862e16 100644
--- a/src/fauxton/app/addons/documents/templates/all_docs_layout.html
+++ b/src/fauxton/app/addons/documents/templates/all_docs_layout.html
@@ -11,9 +11,11 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 License for the specific language governing permissions and limitations under
 the License.
 -->
-
+<ul class="nav nav-tabs window-resizeable" id="db-views-tabs-nav">
+  <li><a id="toggle-query" href="#query" data-bypass="true" data-toggle="tab">
+    <i class="fonticon fonticon-plus"></i> Query Options</a></li>
+</ul>
 <div class="tab-content">
-  <div id="query-options-wrapper"></div>
   <div class="tab-pane" id="query">
   </div>
 </div>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/69fa6c43/src/fauxton/app/addons/documents/templates/view_editor.html
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/templates/view_editor.html b/src/fauxton/app/addons/documents/templates/view_editor.html
index 36451e8..e08e36e 100644
--- a/src/fauxton/app/addons/documents/templates/view_editor.html
+++ b/src/fauxton/app/addons/documents/templates/view_editor.html
@@ -16,6 +16,9 @@ the License.
       <i class="fonticon-wrench fonticon"></i>
       <% if (newView) { %>Create Index <% } else { %>Edit Index <% } %></a></li>
     <% if (!newView) { %>
+    <li><a data-bypass="true" id="query-nav" href="#query" data-toggle="tab">
+      <i class="fonticon-plus fonticon"></i> Query Options</a>
+    </li>
     <li><a data-bypass="true" id="meta-nav" href="#metadata" data-toggle="tab">Design
Doc Metadata</a></li>
     <% } %>
   </ul>

http://git-wip-us.apache.org/repos/asf/couchdb/blob/69fa6c43/src/fauxton/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js
index 8fa426a..e9a0ee6 100644
--- a/src/fauxton/app/addons/documents/views.js
+++ b/src/fauxton/app/addons/documents/views.js
@@ -26,8 +26,6 @@ define([
        // Plugins
        "plugins/beautify",
        "plugins/prettify",
-
-
 ],
 
 function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColumns, beautify)
{
@@ -498,18 +496,18 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
         eventer: this.eventer
       }));
 
-      this.advancedOptionsMenu = this.insertView('#query-options-wrapper', new Views.AdvancedOptionsMenu({
+      /*this.advancedOptionsMenu = this.insertView('#query-options-wrapper', new Views.AdvancedOptionsMenu({
         hasReduce: false,
         eventer:  this.eventer
-       }));
+       }));*/
 
-      this.$('#query').hide();
+      //this.$('#query').hide();
     },
 
     afterRender: function () {
       if (this.params) {
         this.advancedOptions.updateFromParams(this.params);
-        this.advancedOptionsMenu.updateFromParams(this.params);
+        //this.advancedOptionsMenu.updateFromParams(this.params);
       }
 
     },
@@ -1143,9 +1141,13 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
     queryParams: function () {
       var $form = this.$(".view-query-update");
       // Ignore params without a value
-      var params = _.filter($form.serializeArray(), function(param) {
-        return param.value;
-      });
+      var params = _.reduce($form.serializeArray(), function(params, param) {
+        if (!params.value) { return params; }
+        if (param.name === "limit" && param.value === 'None') { return params; }
+
+        params.push(param.value);
+        return params;
+      }, []);
 
       // Validate *key* params to ensure they're valid JSON
       var keyParams = ["key","keys","startkey","endkey"];
@@ -1467,8 +1469,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
             that.advancedOptions.renderOnUpdatehasReduce(that.hasReduce());
           }
 
-          that.advancedOptionsMenu.setHasReduce(that.hasReduce());
-          that.advancedOptionsMenu.render();
+          //that.advancedOptionsMenu.setHasReduce(that.hasReduce());
+          //that.advancedOptionsMenu.render();
 
           FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: ddocName, view: viewName});
 
@@ -1711,10 +1713,10 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
           eventer: this.eventer
         }));
 
-        this.advancedOptionsMenu = this.insertView('#query-options-wrapper', new Views.AdvancedOptionsMenu({
+        /*this.advancedOptionsMenu = this.insertView('#query-options-wrapper', new Views.AdvancedOptionsMenu({
           hasReduce: this.hasReduce(),
           eventer:  this.eventer
-         }));
+         }));*/
       }
 
     },
@@ -1722,7 +1724,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
     afterRender: function() {
       if (this.params && !this.newView) {
         this.advancedOptions.updateFromParams(this.params);
-        this.advancedOptionsMenu.updateFromParams(this.params);
+        //this.advancedOptionsMenu.updateFromParams(this.params);
       }
 
       this.designDocSelector.updateDesignDoc();


Mime
View raw message