};
// warn user not to leave the page while upload is in progress
- $(window).bind('beforeunload', function(e) {
- if ($.assocArraySize(uploadingFiles) > 0) {
- return t('files','File upload is in progress. Leaving the page now will cancel the upload.');
+ $(window).on('beforeunload', function(e) {
+ if (OC.Upload.isProcessing()) {
+ return t('files', 'File upload is in progress. Leaving the page now will cancel the upload.');
}
});
+
//add multiply file upload attribute to all browsers except konqueror (which crashes when it's used)
- if(navigator.userAgent.search(/konqueror/i) === -1) {
- $('#file_upload_start').attr('multiple', 'multiple');
+ if(navigator.userAgent.search(/konqueror/i)==-1){
+ $('#file_upload_start').attr('multiple','multiple');
}
//if the breadcrumb is to long, start by replacing foldernames with '...' except for the current folder