couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [17/50] [abbrv] fauxton commit: updated refs/heads/import-master to b32c617
Date Tue, 01 Apr 2014 09:14:33 GMT
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-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/f06af5d0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/f06af5d0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/f06af5d0

Branch: refs/heads/import-master
Commit: f06af5d00e39ac12b1ab18d86f5cc9585d3c0c36
Parents: 7dcb5fe
Author: suelockwood <deathbear@apache.org>
Authored: Tue Mar 11 11:50:57 2014 -0400
Committer: suelockwood <deathbear@apache.org>
Committed: Wed Mar 12 09:55:55 2014 -0400

----------------------------------------------------------------------
 app/addons/databases/views.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f06af5d0/app/addons/databases/views.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/views.js b/app/addons/databases/views.js
index a56267f..ef52b2f 100644
--- a/app/addons/databases/views.js
+++ b/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();
     },
 


Mime
View raw message