From 6e35f12e3a7c99a18f2a09aed0e8fc679dc29b37 Mon Sep 17 00:00:00 2001 From: marktaiwan Date: Wed, 18 Mar 2015 18:44:47 +0800 Subject: [PATCH] Fallback for browsers that disables javascript --- js/file-selector.js | 3 ++- stylesheets/style.css | 3 --- templates/post_form.html | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/js/file-selector.js b/js/file-selector.js index c820db48..ddae2d09 100644 --- a/js/file-selector.js +++ b/js/file-selector.js @@ -140,7 +140,8 @@ var dropHandlers = { } }; -$('.dropzone').css('user-select', 'none') // let jquery add browser specific prefix +$('#upload input[type=file]').hide(); // hide the original file selector +$('.dropzone-wrap').css('user-select', 'none').show(); // let jquery add browser specific prefix // attach handlers $(document).on(dropHandlers, '.dropzone'); diff --git a/stylesheets/style.css b/stylesheets/style.css index 9941a1a3..8978780e 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -1182,9 +1182,6 @@ div.mix { width: 50px; } -input#upload_file { - display: none; -} /* File selector */ .dropzone { color: #000; diff --git a/templates/post_form.html b/templates/post_form.html index b5ef767d..f118f5aa 100644 --- a/templates/post_form.html +++ b/templates/post_form.html @@ -91,7 +91,7 @@ -
+