Replace single-line inputs with textareas in non-JS mode.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 29 May 2012 20:36:18 +0000 (22:36 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 29 May 2012 21:18:40 +0000 (23:18 +0200)
This fixes #49.

src/main/resources/static/javascript/sone.js
src/main/resources/templates/include/updateStatus.html
src/main/resources/templates/include/viewPost.html

index 6077049..2063576 100644 (file)
@@ -1865,6 +1865,14 @@ var currentSoneMenuTimeoutHandler;
 
 $(document).ready(function() {
 
+       /* rip out the status update textarea. */
+       $("#sone .rip-out").each(function() {
+               var oldElement = $(this);
+               newElement = $("<input type='text'/>");
+               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);
index 881aca4..dde0486 100644 (file)
@@ -10,6 +10,6 @@
                </select>
        </div>
        <div class="select-sender"><button type="button" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">+</button></div><label for="text"><%= Page.Index.Label.Text|l10n|html></label>
-       <input type="text" class="status-input" name="text" value="" />
+       <textarea class="rip-out status-input" name="text"></textarea>
        <button type="submit"><%= Page.Index.Button.Post|l10n|html></button>
 </form>
index 396fa6e..87a2656 100644 (file)
                                                        </select>
                                                </div>
                                                <div class="select-sender"><button type="button" title="<%= View.UpdateStatus.Text.ChooseSenderIdentity|l10n|html>">+</button></div>
-                                               <input type="text" class="reply-input" name="text" value="" />
+                                               <textarea class="rip-out reply-input" name="text"></textarea>
                                                <button type="submit"><%= View.Post.SendReply|l10n|html></button>
                                        </form>
                                </div>