diff options
-rw-r--r-- | application/views/file/upload_form.php | 2 | ||||
-rw-r--r-- | data/css/style.css | 16 | ||||
-rw-r--r-- | data/js/script.js | 15 |
3 files changed, 17 insertions, 16 deletions
diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php index c2ee18e2f..0596fcbaf 100644 --- a/application/views/file/upload_form.php +++ b/application/views/file/upload_form.php @@ -4,7 +4,7 @@ <div class="span12 text-upload-form"> <?php echo form_open_multipart('file/do_paste'); ?> <h2>Text paste</h2> - <textarea name="content" class="text-upload span12" style="height: 300px;"></textarea> + <textarea name="content" class="text-upload span12"></textarea><br> <button type="submit" class="btn btn-primary">Paste it!</button> </form> </div> diff --git a/data/css/style.css b/data/css/style.css index f1066fc7a..625ab7a06 100644 --- a/data/css/style.css +++ b/data/css/style.css @@ -28,6 +28,22 @@ body { } +.text-upload { + height: 200px; +} + +@media (min-height: 700px) { + .text-upload { + height: 300px; + } +} + +@media (min-height: 800px) { + .text-upload { + height: 400px; + } +} + .error h1 { font-size: 19px; } diff --git a/data/js/script.js b/data/js/script.js index 7d84eb9a1..ce20e922d 100644 --- a/data/js/script.js +++ b/data/js/script.js @@ -89,21 +89,6 @@ 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); |