From d7e0687f4ecd82af8f2cf25d6a0ba676ee051e23 Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Thu, 10 Apr 2008 10:27:56 +0000 Subject: Add DB compaction button to Futon. Closes COUCHDB-38. Thanks to Jim Lindley for the patch! git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@646734 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/browse.js | 8 ++++++++ share/www/script/jquery.dialog.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'share/www/script') diff --git a/share/www/script/browse.js b/share/www/script/browse.js index cd9b8bd9..7fafc252 100644 --- a/share/www/script/browse.js +++ b/share/www/script/browse.js @@ -84,6 +84,14 @@ function CouchDatabasePage() { }); } + this.compactDatabase = function() { + $.showDialog("_compact_database.html", { + submit: function() { + db.compact(); + } + }); + } + this.deleteDatabase = function() { $.showDialog("_delete_database.html", { submit: function() { diff --git a/share/www/script/jquery.dialog.js b/share/www/script/jquery.dialog.js index dc8f9c5c..09902758 100644 --- a/share/www/script/jquery.dialog.js +++ b/share/www/script/jquery.dialog.js @@ -76,7 +76,7 @@ data[field.name] = field.value; }); var errors = options.submit(data); - if (errors == {}) { + if (errors == null || errors == {}) { dismiss(); } else { for (var name in errors) { -- cgit v1.2.3