Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8412B10840 for ; Tue, 11 Mar 2014 15:58:10 +0000 (UTC) Received: (qmail 34524 invoked by uid 500); 11 Mar 2014 15:58:07 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 32160 invoked by uid 500); 11 Mar 2014 15:58:03 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 30939 invoked by uid 99); 11 Mar 2014 15:58:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2014 15:58:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D63EA940063; Tue, 11 Mar 2014 15:58:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: deathbear@apache.org To: commits@couchdb.apache.org Message-Id: <9d1a849b0be943b9b46220199d20ecfe@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: couchdb commit: updated refs/heads/2113-Fix-DB-search to 9e5f242 Date: Tue, 11 Mar 2014 15:58:01 +0000 (UTC) Repository: couchdb Updated Branches: refs/heads/2113-Fix-DB-search [created] 9e5f242cc 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/9e5f242c Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/9e5f242c Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/9e5f242c Branch: refs/heads/2113-Fix-DB-search Commit: 9e5f242cc1cee120bf265b1ae8eab1e760149ef1 Parents: fffc5b7 Author: suelockwood Authored: Tue Mar 11 11:50:57 2014 -0400 Committer: suelockwood Committed: Tue Mar 11 11:57:53 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/9e5f242c/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(); },