couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deathb...@apache.org
Subject couchdb commit: updated refs/heads/Query-Options-UI to 5b8d877
Date Wed, 19 Mar 2014 16:10:21 GMT
Repository: couchdb
Updated Branches:
  refs/heads/Query-Options-UI 75c5098a1 -> 5b8d8776d


Fix for when errors return for key queries in _all_docs


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

Branch: refs/heads/Query-Options-UI
Commit: 5b8d8776d25828fc92b44dfb70c0a233c76e0ce8
Parents: 75c5098
Author: suelockwood <deathbear@apache.org>
Authored: Wed Mar 19 11:46:23 2014 -0400
Committer: suelockwood <deathbear@apache.org>
Committed: Wed Mar 19 12:09:36 2014 -0400

----------------------------------------------------------------------
 src/fauxton/app/addons/documents/resources.js | 23 ++++++++++++++--------
 src/fauxton/app/addons/documents/views.js     |  6 ++++++
 2 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b8d8776/src/fauxton/app/addons/documents/resources.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/resources.js b/src/fauxton/app/addons/documents/resources.js
index 6f4323a..efd7f69 100644
--- a/src/fauxton/app/addons/documents/resources.js
+++ b/src/fauxton/app/addons/documents/resources.js
@@ -468,14 +468,21 @@ function(app, FauxtonAPI) {
       if (this.skipFirstItem) {
         rows = rows.splice(1);
       }
-      return _.map(rows, function(row) {
-        return {
-          _id: row.id,
-          _rev: row.value.rev,
-          value: row.value,
-          key: row.key,
-          doc: row.doc || undefined
-        };
+      
+      // remove any query errors that may return without doc info
+      // important for when querying keys on all docs
+      var noQueryErrors = _.filter(rows, function(row){
+        return row.value;
+      });
+
+      return _.map(noQueryErrors, function(row) {
+          return {
+            _id: row.id,
+            _rev: row.value.rev,
+            value: row.value,
+            key: row.key,
+            doc: row.doc || undefined
+          };
       });
     }
   }));

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5b8d8776/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 6a4a79e..02bc746 100644
--- a/src/fauxton/app/addons/documents/views.js
+++ b/src/fauxton/app/addons/documents/views.js
@@ -1222,6 +1222,10 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
           }
           this.updateFiltersFor(key, $ele);
           break;
+          case "key": 
+          case "keys": 
+            $form.find("textarea[name='"+key+"']").val(val);
+          break;
           default:
             $form.find("input[name='"+key+"']").val(val);
           break;
@@ -1615,6 +1619,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
resizeColum
     },
 
     toggleIndexNav: function (event) {
+      $('#dashboard-content').scrollTop(0); //scroll up
+      
       var $targetId = this.$(event.target).attr('id'),
           $previousTab = this.$(this.$('li.active a').attr('href')),
           $targetTab = this.$(this.$(event.target).attr('href'));


Mime
View raw message