From f6507e21f87f962c7e7731123450914aa12e227d Mon Sep 17 00:00:00 2001 From: Christopher Lenz Date: Wed, 22 Jul 2009 09:03:40 +0000 Subject: Change document creation in Futon so that it no longer prompts for a document ID, but simply opens the document page for an empty (and unsaved) document, and allows you to modify the ID. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@796635 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/document.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'share/www/document.html') diff --git a/share/www/document.html b/share/www/document.html index c13c745c..f3dcf326 100644 --- a/share/www/document.html +++ b/share/www/document.html @@ -54,7 +54,11 @@ specific language governing permissions and limitations under the License. $("#toolbar button.save").click(page.saveDocument); $("#toolbar button.add").click(page.addField); $("#toolbar button.load").click(page.uploadAttachment); - $("#toolbar button.delete").click(page.deleteDocument); + if (page.isNew) { + $("#toolbar button.delete").hide(); + } else { + $("#toolbar button.delete").click(page.deleteDocument); + } }); @@ -70,8 +74,8 @@ specific language governing permissions and limitations under the License.