aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/file-upload.js
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2013-08-23 23:10:37 +0200
committerGeorg Ehrke <developer@georgehrke.com>2013-08-23 23:10:37 +0200
commit6ffa2a28d0ae63b061e1e88ee3b12726d31c3f9d (patch)
treeb564539f21866e6049d69da6d011647ff46540f7 /apps/files/js/file-upload.js
parent1dab0767502013b5e86e8e24e3b12a2a8939f7a8 (diff)
parent02b2b5a808b135007d8d54b837e70c38f02729fd (diff)
downloadnextcloud-server-6ffa2a28d0ae63b061e1e88ee3b12726d31c3f9d.tar.gz
nextcloud-server-6ffa2a28d0ae63b061e1e88ee3b12726d31c3f9d.zip
Merge branch 'master' into oc_preview
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r--apps/files/js/file-upload.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 16d96fbb386..c401419fa42 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -1,6 +1,6 @@
$(document).ready(function() {
- file_upload_param = {
+ var file_upload_param = {
dropZone: $('#content'), // restrict dropZone to content div
//singleFileUploads is on by default, so the data.files array will always have length 1
add: function(e, data) {
@@ -142,7 +142,7 @@ $(document).ready(function() {
$('#uploadprogressbar').progressbar('value',100);
$('#uploadprogressbar').fadeOut();
}
- }
+ };
var file_upload_handler = function() {
$('#file_upload_start').fileupload(file_upload_param);
};
@@ -163,13 +163,14 @@ $(document).ready(function() {
// warn user not to leave the page while upload is in progress
$(window).bind('beforeunload', function(e) {
- if ($.assocArraySize(uploadingFiles) > 0)
+ if ($.assocArraySize(uploadingFiles) > 0) {
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')
+ $('#file_upload_start').attr('multiple','multiple');
}
//if the breadcrumb is to long, start by replacing foldernames with '...' except for the current folder
@@ -302,8 +303,7 @@ $(document).ready(function() {
}
localName = getUniqueName(localName);
//IE < 10 does not fire the necessary events for the progress bar.
- if($('html.lte9').length > 0) {
- } else {
+ if($('html.lte9').length === 0) {
$('#uploadprogressbar').progressbar({value:0});
$('#uploadprogressbar').fadeIn();
}
@@ -311,8 +311,7 @@ $(document).ready(function() {
var eventSource=new OC.EventSource(OC.filePath('files','ajax','newfile.php'),{dir:$('#dir').val(),source:name,filename:localName});
eventSource.listen('progress',function(progress){
//IE < 10 does not fire the necessary events for the progress bar.
- if($('html.lte9').length > 0) {
- } else {
+ if($('html.lte9').length === 0) {
$('#uploadprogressbar').progressbar('value',progress);
}
});