From d64c7c75d5246b08af3b2b5aa3e6fd0190b2fdf1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 29 May 2012 22:36:18 +0200 Subject: [PATCH] Replace single-line inputs with textareas in non-JS mode. This fixes #49. --- src/main/resources/static/javascript/sone.js | 8 ++++++++ src/main/resources/templates/include/updateStatus.html | 2 +- src/main/resources/templates/include/viewPost.html | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 6077049..2063576 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1865,6 +1865,14 @@ var currentSoneMenuTimeoutHandler; $(document).ready(function() { + /* rip out the status update textarea. */ + $("#sone .rip-out").each(function() { + var oldElement = $(this); + newElement = $(""); + newElement.attr("class", oldElement.attr("class")).attr("name", oldElement.attr("name")); + oldElement.before(newElement).remove(); + }); + /* this initializes the status update input field. */ getTranslation("WebInterface.DefaultText.StatusUpdate", function(defaultText) { registerInputTextareaSwap("#sone #update-status .status-input", defaultText, "text", false, false); diff --git a/src/main/resources/templates/include/updateStatus.html b/src/main/resources/templates/include/updateStatus.html index 881aca4..dde0486 100644 --- a/src/main/resources/templates/include/updateStatus.html +++ b/src/main/resources/templates/include/updateStatus.html @@ -10,6 +10,6 @@
- + diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html index 396fa6e..87a2656 100644 --- a/src/main/resources/templates/include/viewPost.html +++ b/src/main/resources/templates/include/viewPost.html @@ -133,7 +133,7 @@
- + -- 2.7.4