From 490d2c5b3182b0152b98ee763a69dfcc574a8b0a Mon Sep 17 00:00:00 2001 From: llj Date: Thu, 25 Apr 2013 17:52:39 +0800 Subject: [PATCH] [repo] fixed file-upload bug --- templates/snippets/file_upload_progress_js.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/snippets/file_upload_progress_js.html b/templates/snippets/file_upload_progress_js.html index 502724aa85..814b1385c4 100644 --- a/templates/snippets/file_upload_progress_js.html +++ b/templates/snippets/file_upload_progress_js.html @@ -47,8 +47,8 @@ function submitAndShowProgress(form, upload_progress_con) { }; $('#upload-file-form .submit').click(function () { - if (!$.trim($('#upload-file-form input[type=file]').val())) { - $('#upload-file-form .error').html('{% trans "Please choose a file at first." %}').removeClass('hide'); + if (!$.trim($('#upload-file-list').html())) { // when choose a file repeatedly, $('#upload-file-form input[type="file"]').val() is empty, so don't use that to check + $('#upload-file-form .error').html("{% trans "Please choose a file at first." %}").removeClass('hide'); return false; }