Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Get rid of the iframe structure in Futon to allow easy bookmarking, r…
…eloading 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
  • Loading branch information
cmlenz committed Jan 8, 2009
1 parent 150ce0e commit 33d9ecafa556754a1416ff8e0cdf46dedf1abb77
Showing 17 changed files with 244 additions and 244 deletions.
@@ -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>

This file was deleted.

@@ -17,14 +17,17 @@
<head>
<title>Configuration</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" href="style/layout.css?0.8.0" type="text/css">
<link rel="stylesheet" href="style/layout.css?0.9.0" type="text/css">
<script src="script/json2.js"></script>
<script src="script/jquery.js?1.2.6"></script>
<script src="script/jquery.couch.js?0.8.0"></script>
<script src="script/pprint.js?0.8.0"></script>
<script src="script/jquery.cookies.js?0.9.0"></script>
<script src="script/jquery.couch.js?0.9.0"></script>
<script src="script/pprint.js?0.9.0"></script>
<script>
$(document).ready(function() {
if (window !== parent) parent.updateNavigation();
$.get("_sidebar.html", function(resp) {
$(resp).insertAfter("#wrap");
});

$(document.body).addClass("loading");
$.couch.config({
@@ -61,14 +64,14 @@
});
</script>
</head>
<body>
<body><div id="wrap">
<h1>
<a href="browse/index.html">Overview</a>
<a href="index.html">Overview</a>
<strong>Configuration</strong>
</h1>
<div id="wrap">
<div id="content">

<table id="config" class="listing">
<table id="config" class="listing" cellspacing="0">
<caption>Configuration</caption>
<thead><tr>
<th>Section</th>
@@ -79,5 +82,5 @@ <h1>
</table>

</div>
</body>
</div></body>
</html>
@@ -17,17 +17,22 @@
<head>
<title>Test Suite</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" href="style/layout.css?0.8.0" type="text/css">
<link rel="stylesheet" href="style/layout.css?0.9.0" type="text/css">
<script src="script/json2.js"></script>
<script src="script/jquery.js?1.2.6"></script>
<script src="script/couch.js?0.8.0"></script>
<script src="script/pprint.js?0.8.0"></script>
<script src="script/jquery.cookies.js?0.9.0"></script>
<script src="script/jquery.couch.js?0.9.0"></script>
<script src="script/couch.js?0.9.0"></script>
<script src="script/pprint.js?0.9.0"></script>
<script src="script/couch_test_runner.js"></script>
<script>
$(function() {
$.get("_sidebar.html", function(resp) {
$(resp).insertAfter("#wrap");
});

updateTestsListing();
$("#toolbar button.run").click(runAllTests);
if (window != parent) parent.updateNavigation();
$("#toolbar button.load").click(function() {
location.reload(true);
});
@@ -36,12 +41,12 @@
loadTests(testsPath||"script/couch_tests.js")
</script>
</head>
<body>
<body><div id="wrap">
<h1>
<a href="browse/index.html">Overview</a>
<a href="index.html">Overview</a>
<strong>Test Suite</strong>
</h1>
<div id="wrap">
<div id="content">
<ul id="toolbar">
<li><button class="run">Run All</button></li>
<li><button class="load">Reload</button></li>
@@ -52,6 +57,7 @@ <h1>
some time, and you'll not be able to do much with your browser while
a test is being executed.
</p>

<table class="listing" id="tests" cellspacing="0">
<caption>Tests</caption>
<thead>
@@ -70,6 +76,7 @@ <h1>
</tr>
</tbody>
</table>

</div>
</body>
</div></body>
</html>
@@ -17,31 +17,34 @@
<head>
<title>Browse Database</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" href="../style/layout.css?0.8.0" type="text/css">
<script src="../script/json2.js"></script>
<script src="../script/jquery.js?1.2.6"></script>
<script src="../script/jquery.cookies.js?0.8.0"></script>
<script src="../script/jquery.couch.js?0.8.0"></script>
<script src="../script/jquery.dialog.js?0.8.0"></script>
<script src="../script/jquery.resizer.js?0.8.0"></script>
<script src="../script/jquery.suggest.js?0.8.0"></script>
<script src="../script/browse.js?0.8.0"></script>
<script src="../script/pprint.js?0.8.0"></script>
<link rel="stylesheet" href="style/layout.css?0.9.0" type="text/css">
<script src="script/json2.js"></script>
<script src="script/jquery.js?1.2.6"></script>
<script src="script/jquery.cookies.js?0.9.0"></script>
<script src="script/jquery.couch.js?0.9.0"></script>
<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/browse.js?0.9.0"></script>
<script src="script/pprint.js?0.9.0"></script>
<script>
var page = new CouchDatabasePage();
if (window != parent) {
parent.updateNavigation(location.pathname,
encodeURIComponent(location.search.split("/", 2)[0]));

$.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(","), parent.location.pathname);
parent.updateRecentDatabasesList();
$.cookies.set("recent", recentDbs.join(","));
updateRecentDatabasesList();
}
}

$(document).ready(function() {
updateNavigation(location.pathname, "?" + page.db.name);
});

$(function() {
$("h1 strong").text(page.db.name);
$("#viewcode span").click(function() {
$("#viewcode").toggleClass("collapsed");
@@ -107,12 +110,12 @@
</script>
</head>

<body>
<body><div id="wrap">
<h1>
<a href="index.html">Overview</a>
<strong>?</strong>
</h1>
<div id="wrap">
<div id="content">
<div id="switch">
<label>Select view: <select autocomplete="false">
<option value="">All documents</option>
@@ -182,5 +185,5 @@ <h1>
</table>

</div>
</body>
</div></body>
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 33d9eca

Please sign in to comment.