mirror of
https://github.com/redmine/redmine.git
synced 2025-11-12 16:26:03 +01:00
Check attachment size when the user selects a file (#9667).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7926 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -106,6 +106,18 @@ function removeFileField(el) {
|
||||
}
|
||||
}
|
||||
|
||||
function checkFileSize(el, maxSize, message) {
|
||||
var files = el.files;
|
||||
if (files) {
|
||||
for (var i=0; i<files.length; i++) {
|
||||
if (files[i].size > maxSize) {
|
||||
alert(message);
|
||||
el.value = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showTab(name) {
|
||||
var f = $$('div#content .tab-content');
|
||||
for(var i=0; i<f.length; i++){
|
||||
|
||||
Reference in New Issue
Block a user