]> source.dussan.org Git - redmine.git/commitdiff
Fixed that JS warning is not displayed when attachment maximum size is 0 (#13949).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 13 May 2013 18:30:56 +0000 (18:30 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 13 May 2013 18:30:56 +0000 (18:30 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11841 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/attachments.js

index 260c060e478cb5e409feac6a376a10343db16d58..5876800a63b367c47b204acde7e8fae73a70951a 100644 (file)
@@ -141,7 +141,7 @@ function uploadAndAttachFiles(files, inputEl) {
 
   var sizeExceeded = false;
   $.each(files, function() {
-    if (this.size && maxFileSize && this.size > parseInt(maxFileSize)) {sizeExceeded=true;}
+    if (this.size && maxFileSize != null && this.size > parseInt(maxFileSize)) {sizeExceeded=true;}
   });
   if (sizeExceeded) {
     window.alert(maxFileSizeExceeded);