summaryrefslogtreecommitdiffstats
path: root/data/js
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-02-15 23:58:56 +0100
committerFlorian Pritz <bluewind@xinu.at>2013-02-23 22:34:42 +0100
commitadb6749310ff75f684f730c6e3144194046536a9 (patch)
tree49408542d9f2bce13e36b04b85bc91b9478e553d /data/js
parentea7467a584ad344e13f0cc595f58a1bb22e1649c (diff)
Rearrange upload form
This allows the textarea to be wider without vanishing behind the file upload form. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'data/js')
-rw-r--r--data/js/script.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/data/js/script.js b/data/js/script.js
index cb9afa66c..ffa036280 100644
--- a/data/js/script.js
+++ b/data/js/script.js
@@ -94,6 +94,21 @@ function fixedEncodeURIComponent (str) {
$('.file-upload').bind('change', checkFileUpload);
}
+ $('.text-upload').css('height', '100px');
+ $('.text-upload').bind('blur', function() {
+ $('.text-upload').animate({height: "100px"}, 300);
+ });
+ $('.text-upload').bind('focus', function() {
+ $('.text-upload').animate({height: "300px"}, 300);
+ });
+
+ // work around to submit the form if the click causes the
+ // textarea to shrink and you can't relase the mouse fast enough
+ // so mouseup will be outside the button area and not trigger
+ // submission properly
+ $('.text-upload-form :submit').bind('mousedown', function() {
+ $(this).click();
+ });
});
})(jQuery);