summaryrefslogtreecommitdiff
path: root/share/www/script/futon.browse.js
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-01-21 19:40:19 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-01-21 19:40:19 +0000
commit03d03bdaf3d86de48444ca768a024362fa63ca24 (patch)
tree8323822cd8724d325a0a874dd5690116a04d9dc1 /share/www/script/futon.browse.js
parenta3fec89cdff0deda1c30d15bd0503af2f9b824e2 (diff)
Add caching to the Futon autocompletion feature, and fix the positioning code.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@736387 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/futon.browse.js')
-rw-r--r--share/www/script/futon.browse.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/www/script/futon.browse.js b/share/www/script/futon.browse.js
index ee8da4e6..db899df3 100644
--- a/share/www/script/futon.browse.js
+++ b/share/www/script/futon.browse.js
@@ -335,7 +335,7 @@
var matches = [];
for (var i = 0; i < docs.rows.length; i++) {
var docName = docs.rows[i].id.substr(8);
- if (docName.substr(0, text.length) == text) {
+ if (docName.indexOf(text) == 0) {
matches[i] = docName;
}
}
@@ -350,7 +350,7 @@
var matches = [];
if (!doc.views) return;
for (var viewName in doc.views) {
- if (viewName.substr(0, text.length) == text) {
+ if (viewName.indexOf(text) == 0) {
matches.push(viewName);
}
}