summaryrefslogtreecommitdiff
path: root/share/www/database.html
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/database.html')
-rw-r--r--share/www/database.html37
1 files changed, 23 insertions, 14 deletions
diff --git a/share/www/database.html b/share/www/database.html
index bafac223..2802ad78 100644
--- a/share/www/database.html
+++ b/share/www/database.html
@@ -20,7 +20,7 @@ specific language governing permissions and limitations under the License.
<link rel="stylesheet" href="style/layout.css?0.11.0" type="text/css">
<script src="script/json2.js"></script>
<script src="script/sha1.js"></script>
- <script src="script/jquery.js?1.3.2"></script>
+ <script src="script/jquery.js?1.4.2"></script>
<script src="script/jquery.couch.js?0.11.0"></script>
<script src="script/jquery.dialog.js?0.11.0"></script>
<script src="script/futon.js?0.11.0"></script>
@@ -37,7 +37,7 @@ specific language governing permissions and limitations under the License.
$(function() {
if (page.redirecting) return;
- $("h1 strong").html('<a href="?' + page.db.name + '">' + page.db.name + '</a>');
+ $("h1 strong").text(page.db.name);
var viewPath = page.viewName || "_all_docs";
if (viewPath != "_temp_view" && viewPath != "_design_docs") {
$("h1 a.raw").attr("href", "/" + encodeURIComponent(page.db.name) +
@@ -71,15 +71,18 @@ specific language governing permissions and limitations under the License.
});
// Restore preferences/state
- $("#documents thead th.key").toggleClass("desc", $.futon.storage.get("desc"));
- var reduce = $.futon.storage.get("reduce");
+ $("#documents thead th.key").toggleClass("desc", !!$.futon.storage.get("desc"));
+ var reduce = !!$.futon.storage.get("reduce");
$("#reduce :checkbox")[0].checked = reduce;
- $("#grouplevel select").val($.futon.storage.get("group_level"));
+ $("#grouplevel select").val(parseInt($.futon.storage.get("group_level")));
$("#grouplevel").toggleClass("disabled", !reduce).find("select").each(function() {
this.disabled = !reduce;
});
- $("#perpage").val($.futon.storage.get("per_page"));
+ $("#perpage").val(parseInt($.futon.storage.get("per_page")));
+
+ var staleViews = !!$.futon.storage.get("stale");
+ $("#staleviews :checkbox")[0].checked = staleViews;
page.populateViewsMenu();
page.populateViewEditor();
@@ -94,6 +97,9 @@ specific language governing permissions and limitations under the License.
location.href = "?" + encodeURIComponent(page.db.name) +
(viewName ? "/" + viewName : "");
});
+ $("#staleviews :checkbox").click(function() {
+ $.futon.storage.set("stale", this.checked);
+ });
$("#documents thead th.key span").click(function() {
$(this).closest("th").toggleClass("desc");
page.updateDocumentListing();
@@ -115,12 +121,11 @@ specific language governing permissions and limitations under the License.
$.futon.storage.set("per_page", this.value);
});
$("#toolbar button.add").click(page.newDocument);
- $("#toolbar button.compact").click(page.compactDatabase);
- $("#toolbar button.viewcleanup").click(page.viewCleanup);
+ $("#toolbar button.compact").click(page.compactAndCleanup);
$("#toolbar button.delete").click(page.deleteDatabase);
- $("#toolbar button.compactview").click(page.compactView);
+ $("#toolbar button.security").click(page.databaseSecurity);
- $('#jumpto input').addPlaceholder("Document ID").suggest(function(text, callback) {
+ $('#jumpto input').suggest(function(text, callback) {
page.db.allDocs({
limit: 10, startkey: text, endkey: text + 'zzz',
success: function(docs) {
@@ -149,6 +154,11 @@ specific language governing permissions and limitations under the License.
<a class="raw" title="Raw view"></a>
</h1>
<div id="content">
+ <div id="staleviews">
+ <label>Stale views
+ <input name="staleviews" type="checkbox" />
+ </label>
+ </div>
<div id="switch">
<label>View: <select autocomplete="false">
<option value="_all_docs">All documents</option>
@@ -158,15 +168,14 @@ specific language governing permissions and limitations under the License.
</div>
<div id="jumpto">
<label>Jump to:
- <input type="text" name="docid" autocomplete="off" />
+ <input type="text" name="docid" placeholder="Document ID" autocomplete="off" />
</label>
</div>
<ul id="toolbar">
<li><button class="add">New Document</button></li>
- <li><button class="compact">Compact Database…</button></li>
- <li><button class="viewcleanup">View Cleanup…</button></li>
+ <li><button class="security">Security…</button></li>
+ <li><button class="compact">Compact &amp; Cleanup…</button></li>
<li><button class="delete">Delete Database…</button></li>
- <li><button class="compactview" style="display: none">Compact View…</button></li>
</ul>
<div id="viewcode" class="collapsed" style="display: none">