You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2014/03/12 14:56:04 UTC
couchdb commit: updated refs/heads/master to 8276adf
Repository: couchdb
Updated Branches:
refs/heads/master 160f826e5 -> 8276adffd
Changed the typeahead to not make a call to _all_dbs and instead use the existing fetched collection.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/8276adff
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/8276adff
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/8276adff
Branch: refs/heads/master
Commit: 8276adffd56afad57c210f90459fb9016af30fe5
Parents: 160f826
Author: suelockwood <de...@apache.org>
Authored: Tue Mar 11 11:50:57 2014 -0400
Committer: suelockwood <de...@apache.org>
Committed: Wed Mar 12 09:55:55 2014 -0400
----------------------------------------------------------------------
src/fauxton/app/addons/databases/views.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/8276adff/src/fauxton/app/addons/databases/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/databases/views.js b/src/fauxton/app/addons/databases/views.js
index a56267f..ef52b2f 100644
--- a/src/fauxton/app/addons/databases/views.js
+++ b/src/fauxton/app/addons/databases/views.js
@@ -124,15 +124,18 @@ function(app, Components, FauxtonAPI, Databases) {
},
afterRender: function() {
- var that = this;
- this.dbSearchTypeahead = new Components.DbSearchTypeahead({
- dbLimit: this.dbLimit,
+ var that = this,
+ AllDBsArray = _.map(this.collection.toJSON(), function(item, key){
+ return item.name;
+ });
+
+ this.dbSearchTypeahead = new Components.Typeahead({
el: "input.search-autocomplete",
+ source: AllDBsArray,
onUpdate: function (item) {
that.switchDatabase(null, item);
}
});
-
this.dbSearchTypeahead.render();
},