From: David ‘Bombe’ Roden Date: Sat, 23 Oct 2010 22:01:10 +0000 (+0200) Subject: Add optional parameter to insert an input field instead of a textarea. X-Git-Tag: 0.1-RC1~48 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=cb0b0e06ada73b22db31a37b0ba49d950bc7aeef;p=Sone.git Add optional parameter to insert an input field instead of a textarea. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index dedb510..715f6c3 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -4,9 +4,9 @@ function isOnline() { return $("#sone").hasClass("online"); } -function registerInputTextareaSwap(inputSelector, defaultText, inputFieldName, optional) { +function registerInputTextareaSwap(inputSelector, defaultText, inputFieldName, optional, dontUseTextarea) { $(inputSelector).each(function() { - textarea = $("").blur(function() { + textarea = $(dontUseTextarea ? "" : "").blur(function() { if ($(this).val() == "") { $(this).hide(); inputField = $(this).data("inputField");