diff options
author | Christopher Lenz <cmlenz@apache.org> | 2009-01-09 18:20:37 +0000 |
---|---|---|
committer | Christopher Lenz <cmlenz@apache.org> | 2009-01-09 18:20:37 +0000 |
commit | e19b5124101f2ff5aa755df99b0fcbd0923aa01f (patch) | |
tree | f94bbddb7bdd113b5ee8e2fd00e53375b313daa7 /share/www/database.html | |
parent | 3e0e530cae34bd8d5c9bb45a78923a9bfbc256ca (diff) |
Refactoring in Futon to clean up interactions between specific pages and the navigation. Also, switched some graphics over to PNGs with alpha-transparency (screw you IE6), and added a button for removing databases from the recent databases list.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@733104 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/database.html')
-rw-r--r-- | share/www/database.html | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/share/www/database.html b/share/www/database.html index abe9e28c..ec5134d6 100644 --- a/share/www/database.html +++ b/share/www/database.html @@ -25,23 +25,15 @@ specific language governing permissions and limitations under the License. <script src="script/jquery.dialog.js?0.9.0"></script> <script src="script/jquery.resizer.js?0.9.0"></script> <script src="script/jquery.suggest.js?0.9.0"></script> + <script src="script/futon.js?0.9.0"></script> <script src="script/browse.js?0.9.0"></script> <script src="script/pprint.js?0.9.0"></script> <script> var page = new CouchDatabasePage(); - $.get("_sidebar.html", function(resp) { - $(resp).insertAfter("#wrap"); - - var recentDbs = $.cookies.get("recent", "").split(","); - if ($.inArray(page.db.name, recentDbs) == -1) { - recentDbs.unshift(page.db.name); - if (recentDbs.length > 10) recentDbs.length = 10; - $.cookies.set("recent", recentDbs.join(",")); - updateRecentDatabasesList(); - } - - updateNavigation(location.pathname, "?" + page.db.name); + $.futon.navigation.ready(function() { + this.addDatabase(page.db.name); + this.updateSelection(location.pathname, "?" + page.db.name); }); $(function() { @@ -91,6 +83,7 @@ specific language governing permissions and limitations under the License. $("#switch select").change(function() { var viewName = $(this).val(); + console.log(viewName); if (!viewName) $.cookies.remove(page.db.name + ".view"); location.href = "?" + encodeURIComponent(page.db.name) + (viewName ? "/" + encodeURIComponent(viewName) : ""); @@ -118,7 +111,7 @@ specific language governing permissions and limitations under the License. <div id="content"> <div id="switch"> <label>Select view: <select autocomplete="false"> - <option value="">All documents</option> + <option value="_all_docs">All documents</option> <option value="_design_docs">Design documents</option> <option value="_slow_view">Custom query…</option> </select></label> |