/* Sone JavaScript functions. */
-function registerInputTextareaSwap(inputSelector, defaultText) {
+function registerInputTextareaSwap(inputSelector, defaultText, inputFieldName) {
$(inputSelector).each(function() {
- textarea = $("<textarea name=\"text\"></textarea>").blur(function() {
+ textarea = $("<textarea name=\"" + inputFieldName + "\"></textarea>").blur(function() {
if ($(this).val() == "") {
$(this).hide();
$(this).data("inputField").show().removeAttr("disabled");
<script language="javascript">
$(document).ready(function() {
- registerInputTextareaSwap("#sone #update-status .status-input", "What are you doing?");
+ registerInputTextareaSwap("#sone #update-status .status-input", "What are you doing?", "text");
});
</script>
<script language="javascript">
/* register input field/textarea swap. */
$(document).ready(function() {
- registerInputTextareaSwap("#sone input.reply-input", "Write a Reply…");
+ registerInputTextareaSwap("#sone input.reply-input", "Write a Reply…", "text");
addCommentLinks();
});
</script>
<script language="javascript">
$(document).ready(function() {
- registerInputTextareaSwap("#add-sone input[name=request-uri]", "Sone Request Key");
+ registerInputTextareaSwap("#add-sone input[name=request-uri]", "Sone Request Key", "request-uri");
})
</script>