You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by cm...@apache.org on 2009/01/08 11:19:22 UTC
svn commit: r732675 - in /couchdb/trunk/share: ./ www/ www/browse/
www/dialog/ www/script/ www/style/
Author: cmlenz
Date: Thu Jan 8 02:19:20 2009
New Revision: 732675
URL: http://svn.apache.org/viewvc?rev=732675&view=rev
Log:
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.
Added:
couchdb/trunk/share/www/_sidebar.html (with props)
couchdb/trunk/share/www/database.html
- copied, changed from r732512, couchdb/trunk/share/www/browse/database.html
couchdb/trunk/share/www/dialog/
- copied from r732512, couchdb/trunk/share/www/browse/
couchdb/trunk/share/www/dialog/_compact_database.html
- copied unchanged from r732651, couchdb/trunk/share/www/browse/_compact_database.html
couchdb/trunk/share/www/dialog/_create_database.html
- copied unchanged from r732651, couchdb/trunk/share/www/browse/_create_database.html
couchdb/trunk/share/www/dialog/_create_document.html
- copied unchanged from r732651, couchdb/trunk/share/www/browse/_create_document.html
couchdb/trunk/share/www/dialog/_delete_database.html
- copied unchanged from r732651, couchdb/trunk/share/www/browse/_delete_database.html
couchdb/trunk/share/www/dialog/_delete_document.html
- copied unchanged from r732651, couchdb/trunk/share/www/browse/_delete_document.html
couchdb/trunk/share/www/dialog/_save_view_as.html
- copied unchanged from r732651, couchdb/trunk/share/www/browse/_save_view_as.html
couchdb/trunk/share/www/dialog/_upload_attachment.html
- copied unchanged from r732651, couchdb/trunk/share/www/browse/_upload_attachment.html
couchdb/trunk/share/www/document.html
- copied, changed from r732512, couchdb/trunk/share/www/browse/document.html
Removed:
couchdb/trunk/share/www/browse/
couchdb/trunk/share/www/dialog/database.html
couchdb/trunk/share/www/dialog/document.html
couchdb/trunk/share/www/dialog/index.html
Modified:
couchdb/trunk/share/Makefile.am
couchdb/trunk/share/www/config.html
couchdb/trunk/share/www/couch_tests.html
couchdb/trunk/share/www/index.html
couchdb/trunk/share/www/replicator.html
couchdb/trunk/share/www/script/browse.js
couchdb/trunk/share/www/style/layout.css
Modified: couchdb/trunk/share/Makefile.am
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/Makefile.am?rev=732675&r1=732674&r2=732675&view=diff
==============================================================================
--- couchdb/trunk/share/Makefile.am (original)
+++ couchdb/trunk/share/Makefile.am Thu Jan 8 02:19:20 2009
@@ -12,16 +12,13 @@
nobase_dist_localdata_DATA = \
server/main.js \
- www/browse/_compact_database.html \
- www/browse/_create_database.html \
- www/browse/_create_document.html \
- www/browse/_delete_database.html \
- www/browse/_delete_document.html \
- www/browse/_save_view_as.html \
- www/browse/_upload_attachment.html \
- www/browse/database.html \
- www/browse/document.html \
- www/browse/index.html \
+ www/dialog/_compact_database.html \
+ www/dialog/_create_database.html \
+ www/dialog/_create_document.html \
+ www/dialog/_delete_database.html \
+ www/dialog/_delete_document.html \
+ www/dialog/_save_view_as.html \
+ www/dialog/_upload_attachment.html \
www/couch_tests.html \
www/favicon.ico \
www/image/add.gif \
@@ -51,8 +48,11 @@
www/image/toggle-collapse.gif \
www/image/toggle-expand.gif \
www/image/twisty.gif \
+ www/_sidebar.html \
www/index.html \
www/config.html \
+ www/database.html \
+ www/document.html \
www/replicator.html \
www/script/browse.js \
www/script/couch.js \
Added: couchdb/trunk/share/www/_sidebar.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/_sidebar.html?rev=732675&view=auto
==============================================================================
--- couchdb/trunk/share/www/_sidebar.html (added)
+++ couchdb/trunk/share/www/_sidebar.html Thu Jan 8 02:19:20 2009
@@ -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>
Propchange: couchdb/trunk/share/www/_sidebar.html
------------------------------------------------------------------------------
svn:eol-style = native
Modified: couchdb/trunk/share/www/config.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/config.html?rev=732675&r1=732674&r2=732675&view=diff
==============================================================================
--- couchdb/trunk/share/www/config.html (original)
+++ couchdb/trunk/share/www/config.html Thu Jan 8 02:19:20 2009
@@ -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 @@
</table>
</div>
- </body>
+ </div></body>
</html>
Modified: couchdb/trunk/share/www/couch_tests.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/couch_tests.html?rev=732675&r1=732674&r2=732675&view=diff
==============================================================================
--- couchdb/trunk/share/www/couch_tests.html [utf-8] (original)
+++ couchdb/trunk/share/www/couch_tests.html [utf-8] Thu Jan 8 02:19:20 2009
@@ -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 @@
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 @@
</tr>
</tbody>
</table>
+
</div>
- </body>
+ </div></body>
</html>
Copied: couchdb/trunk/share/www/database.html (from r732512, couchdb/trunk/share/www/browse/database.html)
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/database.html?p2=couchdb/trunk/share/www/database.html&p1=couchdb/trunk/share/www/browse/database.html&r1=732512&r2=732675&rev=732675&view=diff
==============================================================================
--- couchdb/trunk/share/www/browse/database.html [utf-8] (original)
+++ couchdb/trunk/share/www/database.html [utf-8] Thu Jan 8 02:19:20 2009
@@ -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 @@
</table>
</div>
- </body>
+ </div></body>
</html>
Copied: couchdb/trunk/share/www/document.html (from r732512, couchdb/trunk/share/www/browse/document.html)
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/document.html?p2=couchdb/trunk/share/www/document.html&p1=couchdb/trunk/share/www/browse/document.html&r1=732512&r2=732675&rev=732675&view=diff
==============================================================================
--- couchdb/trunk/share/www/browse/document.html [utf-8] (original)
+++ couchdb/trunk/share/www/document.html [utf-8] Thu Jan 8 02:19:20 2009
@@ -17,27 +17,28 @@
<head>
<title>View Document</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.form.js?0.8.0"></script>
- <script src="../script/jquery.resizer.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.form.js?0.9.0"></script>
+ <script src="script/jquery.resizer.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 CouchDocumentPage();
- if (window != parent) {
- var dbLink = $("h1 a.dbname").get(0);
- parent.updateNavigation(
- location.pathname.replace(/document\.html/, "database.html"),
- encodeURIComponent(location.search.split("/")[0])
- );
- }
$(function() {
+ $.get("_sidebar.html", function(resp) {
+ $(resp).insertAfter("#wrap");
+
+ updateNavigation(
+ location.pathname.replace(/document\.html/, "database.html"),
+ "?" + page.db.name);
+ });
+
$("h1 a.dbname").text(page.dbName)
.attr("href", "database.html?" + encodeURIComponent(page.db.name));
$("h1 strong").text(page.docId);
@@ -68,13 +69,13 @@
</script>
</head>
- <body>
+ <body><div id="wrap">
<h1>
<a href="index.html">Overview</a>
<a class="dbname" href="#">?</a>
<strong>?</strong>
</h1>
- <div id="wrap">
+ <div id="content">
<ul id="toolbar">
<li><button class="save">Save Document</button></li>
<li><button class="add">Add Field</button></li>
@@ -113,5 +114,5 @@
</table>
</div>
- </body>
+ </div></body>
</html>
Modified: couchdb/trunk/share/www/index.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/index.html?rev=732675&r1=732674&r2=732675&view=diff
==============================================================================
--- couchdb/trunk/share/www/index.html [utf-8] (original)
+++ couchdb/trunk/share/www/index.html [utf-8] Thu Jan 8 02:19:20 2009
@@ -15,87 +15,80 @@
-->
<html lang="en">
<head>
- <title>Apache CouchDB: Futon Utility Client</title>
+ <title>Overview</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">
- <style type="text/css">
- html { height: 100%; overflow: hidden; }
- body { background: #fff url(image/bg.png) 100% 0 repeat-y;
- padding: 0; height: 100%; overflow: hidden;
- }
- * html body { padding-right: 210px; }
- iframe { background: transparent; border: none; width: 100%; height: 100%; }
- </style>
+ <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.8.0"></script>
- <script src="script/jquery.couch.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/jquery.dialog.js?0.9.0"></script>
+ <script src="script/browse.js?0.9.0"></script>
+ <script src="script/pprint.js?0.9.0"></script>
<script>
- function updateRecentDatabasesList() {
- $("#dbs").empty();
- var recentDbs = $.cookies.get("recent", "").split(",");
- recentDbs.sort();
- $.each(recentDbs, function(idx, name) {
- $("#dbs").append("<li><a href='browse/database.html?" +
- encodeURIComponent(name) + "' target='content'>" + name +
- "</a></li>");
- });
- }
- function updateNavigation(path, queryString) {
- function fixupPath(path) { // hack for IE/Win
- return (path.charAt(0) != "/") ? ("/" + path) : path;
- }
- if (path == null) {
- var l = frames["content"].location;
- path = l.pathname;
- if (queryString == null) {
- queryString = l.search;
- }
- }
- var href = fixupPath(path + queryString);
- $("#nav li li a").each(function() {
- if (fixupPath(this.pathname) + this.search == href) {
- $(this).parent("li").addClass("selected");
- } else {
- $(this).parent("li").removeClass("selected");
+ var page = new CouchIndexPage();
+ $(document).ready(function() {
+ $.get("_sidebar.html", function(resp) {
+ $(resp).insertAfter("#wrap");
+ if (!/index\.html$/.test(location.pathname)) {
+ updateNavigation(location.pathname + "index.html");
}
});
- $("#nav>li").each(function() {
- if ($(this).is(":has(li.selected)")) {
- $(this).addClass("selected");
- } else {
- $(this).removeClass("selected");
- }
+ var dbsPerPage = $.cookies.get("perpage");
+ if (dbsPerPage) $("#perpage").val(dbsPerPage);
+ $("#perpage").change(function() {
+ page.updateDatabaseListing();
+ $.cookies.set("perpage", this.value);
});
- }
- $(function() {
- $.couch.info({
- success: function(info, status) {
- $("#version").text(info.version);
- }
+
+ page.updateDatabaseListing();
+
+ $("#toolbar button.add").click(function() {
+ page.addDatabase();
});
- updateRecentDatabasesList();
});
</script>
</head>
<body>
- <a href="browse/index.html" target="content">
- <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="browse/index.html" target="content">Overview</a></li>
- <li><a href="replicator.html" target="content">Replicator</a></li>
- <li><a href="config.html" target="content">Configuration</a></li>
- <li><a href="couch_tests.html?script/couch_tests.js" target="content">Test Suite</a></li>
- </ul></li>
- <li><span>Recent Databases</span>
- <ul id="dbs"></ul>
- </li>
- </ul>
- <div id="footer">Futon on Apache CouchDB <span id="version">?</span></div>
- <div id="view">
- <iframe name="content" src="browse/index.html" allowtransparency="true">
+ <div id="wrap">
+ <h1><strong>Overview</strong></h1>
+ <div id="content">
+ <ul id="toolbar">
+ <li><button class="add">Create Database …</button></li>
+ </ul>
+
+ <table class="listing" id="databases" cellspacing="0">
+ <caption>Databases</caption>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th class="size">Size</th>
+ <th class="count">Number of Documents</th>
+ <th class="seq">Update Seq</th>
+ </tr>
+ </thead>
+ <tbody class="content">
+ </tbody>
+ <tbody class="footer">
+ <tr>
+ <td colspan="4">
+ <div id="paging">
+ <a class="prev">← Previous Page</a> |
+ <label>Rows per page: <select id="perpage">
+ <option selected>10</option>
+ <option>25</option>
+ <option>50</option>
+ <option>100</option>
+ </select></label> |
+ <a class="next">Next Page →</a>
+ </div>
+ <span></span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
</div>
</body>
</html>
Modified: couchdb/trunk/share/www/replicator.html
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/replicator.html?rev=732675&r1=732674&r2=732675&view=diff
==============================================================================
--- couchdb/trunk/share/www/replicator.html [utf-8] (original)
+++ couchdb/trunk/share/www/replicator.html [utf-8] Thu Jan 8 02:19:20 2009
@@ -17,14 +17,17 @@
<head>
<title>Replicator</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");
+ });
$("fieldset input[type=radio]").click(function() {
var radio = this;
@@ -95,12 +98,12 @@
});
</script>
</head>
- <body>
+ <body><div id="wrap">
<h1>
- <a href="browse/index.html">Overview</a>
+ <a href="index.html">Overview</a>
<strong>Replicator</strong>
</h1>
- <div id="wrap">
+ <div id="content">
<form id="replicator">
<fieldset id="source">
@@ -129,7 +132,7 @@
</p>
</form>
- <table id="records" class="listing">
+ <table id="records" class="listing" cellspacing="0">
<caption>Replication History</caption>
<thead><tr>
<th>Event</th>
@@ -141,5 +144,5 @@
</table>
</div>
- </body>
+ </div></body>
</html>
Modified: couchdb/trunk/share/www/script/browse.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/browse.js?rev=732675&r1=732674&r2=732675&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/browse.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/browse.js [utf-8] Thu Jan 8 02:19:20 2009
@@ -17,7 +17,7 @@
page = this;
this.addDatabase = function() {
- $.showDialog("_create_database.html", {
+ $.showDialog("dialog/_create_database.html", {
submit: function(data, callback) {
if (!data.name || data.name.length == 0) {
callback({name: "Please enter a name."});
@@ -119,7 +119,7 @@
page = this;
this.addDocument = function() {
- $.showDialog("_create_document.html", {
+ $.showDialog("dialog/_create_document.html", {
submit: function(data, callback) {
db.saveDoc(data.docid ? {_id: data.docid} : {}, {
error: function(status, error, reason) {
@@ -135,7 +135,7 @@
}
this.compactDatabase = function() {
- $.showDialog("_compact_database.html", {
+ $.showDialog("dialog/_compact_database.html", {
submit: function(data, callback) {
db.compact({
success: function(resp) {
@@ -147,16 +147,25 @@
}
this.deleteDatabase = function() {
- $.showDialog("_delete_database.html", {
+ $.showDialog("dialog/_delete_database.html", {
submit: function(data, callback) {
db.drop({
success: function(resp) {
callback();
location.href = "index.html";
if (window !== null) {
- parent.$("#dbs li").filter(function(index) {
+ $("#dbs li").filter(function(index) {
return $("a", this).text() == dbName;
}).remove();
+
+ // remove database from recent databases list
+ var recentDbs = $.cookies.get("recent", "").split(",");
+ var recentIdx = $.inArray(db.name, recentDbs)
+ if (recentIdx >= 0) {
+ recentDbs.splice(recentIdx, 1);
+ $.cookies.set("recent", recentDbs.join(","));
+ updateRecentDatabasesList();
+ }
}
}
});
@@ -173,7 +182,7 @@
dirtyTimeout = setTimeout(function() {
var buttons = $("#viewcode button.save, #viewcode button.revert");
page.isDirty = ($("#viewcode_map").val() != page.storedViewCode.map)
- || ($("#viewcode_reduce").val() != page.storedViewCode.reduce);
+ || ($("#viewcode_reduce").val() != (page.storedViewCode.reduce || ""));
if (page.isDirty) {
buttons.removeAttr("disabled");
} else {
@@ -182,9 +191,7 @@
}, 100);
}
$("#viewcode textarea").bind("input", updateDirtyState);
- if ($.browser.msie) { // sorry, browser detection
- $("#viewcode textarea").get(0).onpropertychange = updateDirtyState
- } else if ($.browser.safari) {
+ if ($.browser.msie || $.browser.safari) {
$("#viewcode textarea").bind("paste", updateDirtyState)
.bind("change", updateDirtyState)
.bind("keydown", updateDirtyState)
@@ -272,7 +279,7 @@
} else {
var designDocId = "", localViewName = ""
}
- $.showDialog("_save_view_as.html", {
+ $.showDialog("dialog/_save_view_as.html", {
load: function(elem) {
$("#input_docid", elem).val(designDocId).suggest(function(text, callback) {
db.allDocs({
@@ -490,7 +497,7 @@
}
if (!viewName) {
- $("#switch select").get(0).selectedIndex = 0;
+ $("#switch select")[0].selectedIndex = 0;
db.allDocs(options);
} else {
if (viewName == "_slow_view") {
@@ -641,7 +648,7 @@
}
this.deleteDocument = function() {
- $.showDialog("_delete_document.html", {
+ $.showDialog("dialog/_delete_document.html", {
submit: function(data, callback) {
db.removeDoc(page.doc, {
success: function(resp) {
@@ -670,7 +677,7 @@
"document before you can attach a new file.");
return false;
}
- $.showDialog("_upload_attachment.html", {
+ $.showDialog("dialog/_upload_attachment.html", {
load: function(elem) {
$("input[name='_rev']", elem).val(page.doc._rev);
},
@@ -919,4 +926,4 @@
encoded.push(encodeURIComponent(parts[i]));
};
return encoded.join('/');
-}
\ No newline at end of file
+}
Modified: couchdb/trunk/share/www/style/layout.css
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/style/layout.css?rev=732675&r1=732674&r2=732675&view=diff
==============================================================================
--- couchdb/trunk/share/www/style/layout.css (original)
+++ couchdb/trunk/share/www/style/layout.css Thu Jan 8 02:19:20 2009
@@ -15,8 +15,11 @@
/* General styles */
-html, body { background: transparent; color: #000;
- font: normal 90% Arial,Helvetica,sans-serif; margin: 0; padding: 0;
+html, body { color: #000; font: normal 90% Arial,Helvetica,sans-serif;
+ height: 100%; margin: 0; padding: 0; overflow: hidden;
+}
+body { background: #fff url(../image/bg.png) 100% 0 repeat-y;
+ padding-right: 210px;
}
:link, :visited { color: #ba1e16; text-decoration: none; }
:link img, :visited img { border: none; }
@@ -130,9 +133,10 @@
/* Logo & Navigation */
-#wrap { padding: 0 20px 3em; }
-
-#logo { position: absolute; top: 20px; right: 18px; }
+#sidebar { background: #fff; position: absolute; top: 0; right: 0;
+ width: 210px; height: 100%;
+}
+#logo { padding: 20px 18px; }
#nav { color: #333; font-size: 110%; font-weight: bold; list-style: none;
margin: 0; overflow: auto; padding: 0; position: absolute; top: 185px;
@@ -164,9 +168,10 @@
font-size: 80%; opacity: .7; padding: 5px 10px; position: absolute; right: 0;
bottom: 0; min-height: 1.3em; width: 190px; text-align: right;
}
-#view { position: absolute; left: 0; right: 210px; top: 0; bottom: 0;
- height: 100%;
-}
+#footer :link, #footer :visited { color: #000; }
+
+#wrap { height: 100%; overflow: auto; }
+#content { padding: 0 20px 3em; }
/* Toolbar */