From f1ffe444bcaf003b34ca40dbe69d39e5782709e7 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Sun, 8 Sep 2013 14:17:46 +0200 Subject: [PATCH] don't remove root msg box on submit, but clear fields --- isso/client/app/isso.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/isso/client/app/isso.js b/isso/client/app/isso.js index cbb3e8f..caed029 100644 --- a/isso/client/app/isso.js +++ b/isso/client/app/isso.js @@ -169,8 +169,6 @@ define(["lib/q", "lib/HTML", "helper/utils", "./api", "./forms", "./logging"], f console.log(utils.heading()); -// return; - var rootmsgbox = forms.msgbox({}); HTML.query("#isso-thread").add("div#isso-root").add(rootmsgbox); rootmsgbox.query("input[type=submit]").addEventListener("click", function(event) { @@ -181,8 +179,10 @@ define(["lib/q", "lib/HTML", "helper/utils", "./api", "./forms", "./logging"], f text: rootmsgbox.query("textarea").value, parent: null }) .then(function(rv) { - // remove box on submit - rootmsgbox.remove() + rootmsgbox.query("[name=author]").value = ""; + rootmsgbox.query("[name=email]").value = ""; + rootmsgbox.query("[name=website]").value = ""; + rootmsgbox.query("textarea").value = ""; insert(rv); }) event.preventDefault()