Lines 59-65
function CancelUpload() {
Link Here
|
59 |
$("#fileuploadfailed").show(); |
59 |
$("#fileuploadfailed").show(); |
60 |
$("#fileuploadfailed").text( _("Upload status: Cancelled ") ); |
60 |
$("#fileuploadfailed").text( _("Upload status: Cancelled ") ); |
61 |
} |
61 |
} |
62 |
function cbUpload( status, fileid ) { |
62 |
function cbUpload( status, fileid, errors ) { |
63 |
if( status=='done' ) { |
63 |
if( status=='done' ) { |
64 |
$("#uploadedfileid").val( fileid ); |
64 |
$("#uploadedfileid").val( fileid ); |
65 |
$('#fileToUpload').prop('disabled',true); |
65 |
$('#fileToUpload').prop('disabled',true); |
Lines 72-83
function cbUpload( status, fileid ) {
Link Here
|
72 |
} |
72 |
} |
73 |
$("#processfile").show(); |
73 |
$("#processfile").show(); |
74 |
} else { |
74 |
} else { |
|
|
75 |
var errMsgs = [ _("File already exists"), _("Directory is not writeable"), _("Root directory for uploads not defined"), _("Temporary directory for uploads not defined") ]; |
76 |
var errCode = errors[$('#fileToUpload').prop('files')[0].name].code; |
75 |
$('#fileuploadbutton').show(); |
77 |
$('#fileuploadbutton').show(); |
76 |
$("#fileuploadcancel").hide(); |
78 |
$("#fileuploadcancel").hide(); |
77 |
$("#fileuploadstatus").hide(); |
79 |
$("#fileuploadstatus").hide(); |
78 |
$("#fileuploadfailed").show(); |
80 |
$("#fileuploadfailed").show(); |
79 |
$("#fileuploadfailed").text( _("Upload status: ") + |
81 |
$("#fileuploadfailed").text( _("Upload status: ") + |
80 |
( status=='failed'? _("Failed"): |
82 |
( status=='failed'? _("Failed") + " - (" + errCode + ") " + errMsgs[errCode]: |
81 |
( status=='denied'? _("Denied"): status )) |
83 |
( status=='denied'? _("Denied"): status )) |
82 |
); |
84 |
); |
83 |
} |
85 |
} |
84 |
- |
|
|