diff options
author | Christopher Lenz <cmlenz@apache.org> | 2008-04-15 00:07:08 +0000 |
---|---|---|
committer | Christopher Lenz <cmlenz@apache.org> | 2008-04-15 00:07:08 +0000 |
commit | 01060528e2f94e0ae4374eb3746093a868b6a2f2 (patch) | |
tree | ce7c28082894a84e6ad7a494e5fb034b274d1d6d /share/www/index.html | |
parent | 4c6263150674c231239b4e1aeee804a3c5974c9a (diff) |
Merged futon-async branch back into trunk.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@648074 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/index.html')
-rw-r--r-- | share/www/index.html | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/share/www/index.html b/share/www/index.html index 8616989a..f74e672d 100644 --- a/share/www/index.html +++ b/share/www/index.html @@ -28,16 +28,20 @@ specific language governing permissions and limitations under the License. </style> <script src="script/json2.js"></script> <script src="script/jquery.js"></script> - <script src="script/couch.js"></script> + <script src="script/jquery.couch.js"></script> <script> function updateDatabaseList() { - var dbs = CouchDB.allDbs(); - $("#dbs").empty(); - for (var i = 0; i < dbs.length; i++) { - var dbname = dbs[i]; - $("#dbs").append("<li><a href='browse/database.html?" + dbname + - "' target='content'>" + dbname + "</a></li>"); - } + var list = $("#dbs").empty(); + var dbs = $.couch.allDbs({ + success: function(dbs, status) { + for (var i = 0; i < dbs.length; i++) { + var dbName = dbs[i]; + list.append("<li><a href='browse/database.html?" + + encodeURIComponent(dbName) + "' target='content'>" + dbName + + "</a></li>"); + } + } + }); } function updateNavigation(path, queryString) { function fixupPath(path) { // hack for IE/Win @@ -67,7 +71,11 @@ specific language governing permissions and limitations under the License. }); } $(function() { - $("#version").text(CouchDB.getVersion()); + $.couch.info({ + success: function(info, status) { + $("#version").text(info.version); + } + }); updateDatabaseList(); }); </script> |