summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Chan <plus.vincchan@gmail.com>2016-06-15 11:28:53 +0200
committerVincent Chan <plus.vincchan@gmail.com>2016-06-15 11:28:53 +0200
commitaecdcf737f30c8a621576d2843a50aac3815d1ab (patch)
tree1961942f44ed753827d98ebd1e8f6e4b4c1c9812
parent62144209747760505aa82526cb050aea2a9f8881 (diff)
downloadnextcloud-server-aecdcf737f30c8a621576d2843a50aac3815d1ab.tar.gz
nextcloud-server-aecdcf737f30c8a621576d2843a50aac3815d1ab.zip
dragging over folder will highlight folder only
-rw-r--r--apps/files/css/files.css8
-rw-r--r--apps/files/js/file-upload.js3
2 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 980332d781b..bb177db7524 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -77,6 +77,14 @@
background-color: rgb(179, 230, 255);
}
+.app-files #app-content.dir-drop, .file-drag #filestable tbody tr{
+ background-color: rgba(0, 0, 0, 0);
+}
+
+.app-files #app-content.dir-drop #filestable tbody tr.dropping-to-dir{
+ background-color: rgb(179, 230, 255);
+}
+
.dropping-to-dir .thumbnail {
background-image: url(/nextcloud/core/img/filetypes/folder-drag-accept.svg)!important;
}
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 3d0385f08ad..d53ce1bd7ec 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -674,15 +674,18 @@ OC.Upload = {
if(!filerow.hasClass('dropping-to-dir')){
$('.dropping-to-dir').removeClass('dropping-to-dir');
+ $('.dir-drop').removeClass('dir-drop');
}
if(filerow.attr('data-type') === 'dir'){
+ $('#app-content').addClass('dir-drop');
filerow.addClass('dropping-to-dir');
}
});
fileupload.on('fileuploaddragleave fileuploaddrop', function (e, data){
$('#app-content').removeClass('file-drag');
$('.dropping-to-dir').removeClass('dropping-to-dir');
+ $('.dir-drop').removeClass('dir-drop');
});
} else {
// for all browsers that don't support the progress bar