summaryrefslogtreecommitdiffstats
path: root/files/js/files.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-19 20:57:40 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-19 20:57:40 +0200
commit025129079428d26cadf3d600635653b0de6cdcd5 (patch)
treece3cab57a261a91ebded917bdd8a4a62b4ad8403 /files/js/files.js
parentff54602be06c5a949664d0eec2302075e60f44f7 (diff)
downloadnextcloud-server-025129079428d26cadf3d600635653b0de6cdcd5.tar.gz
nextcloud-server-025129079428d26cadf3d600635653b0de6cdcd5.zip
Show loading icon for uploading files, and disable file actions and DnD for uploading files.
Diffstat (limited to 'files/js/files.js')
-rw-r--r--files/js/files.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/files/js/files.js b/files/js/files.js
index 33573bfbbb9..c8cef87eb94 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -40,11 +40,13 @@ $(document).ready(function() {
$('td.filename a').live('click',function(event) {
event.preventDefault();
var filename=$(this).parent().parent().attr('data-file');
- var mime=$(this).parent().parent().attr('data-mime');
- var type=$(this).parent().parent().attr('data-type');
- var action=FileActions.getDefault(mime,type);
- if(action){
- action(filename);
+ if(!FileList.isLoading(filename)){
+ var mime=$(this).parent().parent().attr('data-mime');
+ var type=$(this).parent().parent().attr('data-type');
+ var action=FileActions.getDefault(mime,type);
+ if(action){
+ action(filename);
+ }
}
});
@@ -152,6 +154,7 @@ $(document).ready(function() {
if(size=='Pending'){
$('tr[data-file='+file.name+'] td.filesize').text(file.size);
}
+ FileList.loadingDone(file.name);
}
});
$('#file_upload_form').submit();
@@ -163,7 +166,7 @@ $(document).ready(function() {
}else{
var size='Pending';
}
- FileList.addFile(files[i].name,size,uploadTime);
+ FileList.addFile(files[i].name,size,uploadTime,true);
}
});