From: David ‘Bombe’ Roden Date: Thu, 30 Dec 2010 20:33:31 +0000 (+0100) Subject: Don’t post a new status if no text was entered. X-Git-Tag: beta-freefall-0.6.2-1~173 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=dd81126b70b09dbde157c8c80de774f4e3906bd8;p=Sone.git Don’t post a new status if no text was entered. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index acb1d46..898c3c0 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -823,6 +823,9 @@ $(document).ready(function() { getTranslation("WebInterface.DefaultText.StatusUpdate", function(defaultText) { registerInputTextareaSwap("#sone #update-status .status-input", defaultText, "text", false, false); $("#sone #update-status").submit(function() { + if ($(this).find(":input").hasClass("default")) { + return false; + } text = $(this).find(":input:enabled").val(); $.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "text": text }, function(data, textStatus) { if ((data != null) && data.success) {