summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorVincent Chan <plus.vincchan@gmail.com>2016-06-13 23:00:56 +0200
committerVincent Chan <plus.vincchan@gmail.com>2016-06-13 23:00:56 +0200
commit433cea30c3ffa7b314ad1f857a7ed2cf48f241e8 (patch)
tree9242dc1d3df1cb14037502b09abc756a4fc9a59a /apps/files/js
parent2abd663419d9caf265b66518c8066dc3f566460d (diff)
downloadnextcloud-server-433cea30c3ffa7b314ad1f857a7ed2cf48f241e8.tar.gz
nextcloud-server-433cea30c3ffa7b314ad1f857a7ed2cf48f241e8.zip
adds visual indication for file drag and drop
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/file-upload.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 3257ded7b89..eadb57d914d 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -494,7 +494,7 @@ OC.Upload = {
* @param {object} e
* @param {object} data
*/
- done:function(e, data) {
+ done: function(e, data) {
OC.Upload.log('done', e, data);
// handle different responses (json or body from iframe for ie)
var response;
@@ -667,7 +667,12 @@ OC.Upload = {
OC.Upload._hideProgressBar();
}
});
-
+ fileupload.on('fileuploaddragover', function(){
+ $('#app-content').addClass('file-drag');
+ });
+ fileupload.on('fileuploaddragleave fileuploaddrop', function (){
+ $('#app-content').removeClass('file-drag');
+ });
} else {
// for all browsers that don't support the progress bar
// IE 8 & 9