summaryrefslogtreecommitdiff
path: root/share/www/_sidebar.html
diff options
context:
space:
mode:
authorChristopher Lenz <cmlenz@apache.org>2009-01-08 10:19:20 +0000
committerChristopher Lenz <cmlenz@apache.org>2009-01-08 10:19:20 +0000
commit539a418b1d7bfbffdcb377a7a9a43fd1a3753b6a (patch)
tree61e3563b03327c5157bf0b502a92cb96d992ad33 /share/www/_sidebar.html
parent2408beee6fbef4acbae40e7fa6de98a0c35a53ed (diff)
Get rid of the iframe structure in Futon to allow easy bookmarking, reloading and back/forward button support across all browsers. Resolves COUCHDB-186 and COUCHDB-56.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@732675 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/_sidebar.html')
-rw-r--r--share/www/_sidebar.html65
1 files changed, 65 insertions, 0 deletions
diff --git a/share/www/_sidebar.html b/share/www/_sidebar.html
new file mode 100644
index 00000000..9bddda37
--- /dev/null
+++ b/share/www/_sidebar.html
@@ -0,0 +1,65 @@
+<div id="sidebar">
+ <a href="index.html">
+ <img id="logo" src="image/logo.png" width="175" height="150" alt="Apache CouchDB: Relax">
+ </a>
+ <ul id="nav">
+ <li><span>Tools</span><ul>
+ <li><a href="index.html">Overview</a></li>
+ <li><a href="replicator.html">Replicator</a></li>
+ <li><a href="config.html">Configuration</a></li>
+ <li><a href="couch_tests.html?script/couch_tests.js">Test Suite</a></li>
+ </ul></li>
+ <li><span>Recent Databases</span>
+ <ul id="dbs"></ul>
+ </li>
+ </ul>
+ <div id="footer">
+ Futon on <a href="http://couchdb.apache.org/">Apache CouchDB</a>
+ <span id="version">?</span>
+ </div>
+</div>
+<script type="text/javascript">
+ function updateNavigation(path, queryString) {
+ function fixupPath(path) { // hack for IE/Win
+ return (path.charAt(0) != "/") ? ("/" + path) : path;
+ }
+ if (!path) {
+ path = location.pathname;
+ if (!queryString) {
+ queryString = location.search;
+ }
+ } else if (!queryString) {
+ queryString = "";
+ }
+ var href = fixupPath(path + queryString);
+ $("#nav li").removeClass("selected");
+ $("#nav li a").each(function() {
+ if (fixupPath(this.pathname) + this.search != href) return;
+ $(this).parent("li").addClass("selected").parents("li").addClass("selected");
+ });
+ }
+
+ function updateRecentDatabasesList() {
+ $("#dbs").empty();
+ var recentDbs = $.cookies.get("recent", "").split(",");
+ recentDbs.sort();
+ $.each(recentDbs, function(idx, name) {
+ if (name) {
+ $("#dbs").append("<li><a href='database.html?" +
+ encodeURIComponent(name) + "'>" + name +
+ "</a></li>");
+ }
+ });
+ }
+
+ $(function() {
+ document.title = "Apache CouchDB - Futon: " + document.title;
+ $.couch.info({
+ success: function(info, status) {
+ $("#version").text(info.version);
+ }
+ });
+ updateRecentDatabasesList();
+ updateNavigation();
+ });
+</script>