You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2014/03/20 11:21:47 UTC
[23/26] couchdb commit: updated refs/heads/Query-Options-UI to cf93bbf
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/f2374114
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f2374114
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f2374114
Branch: refs/heads/Query-Options-UI
Commit: f23741149511f6b799d6e35d690e78857fc051b9
Parents: 2f056a8
Author: suelockwood <de...@apache.org>
Authored: Wed Mar 19 11:46:23 2014 -0400
Committer: Garren Smith <ga...@gmail.com>
Committed: Thu Mar 20 10:33:47 2014 +0200
----------------------------------------------------------------------
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/f2374114/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/f2374114/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 135ba31..d3da5f1 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'));