adds visual indication for file drag and drop

This commit is contained in:
Vincent Chan 2016-06-13 23:00:56 +02:00
parent 2abd663419
commit 433cea30c3
2 changed files with 15 additions and 2 deletions

View File

@ -68,9 +68,15 @@
}
.app-files #app-content {
transition: background-color 0.3s ease;
overflow-x: hidden;
}
.file-drag, .file-drag #filestable tbody tr, .file-drag #filestable tbody tr:hover {
transition: background-color 0.3s ease;
background-color: rgb(179, 230, 255);
}
/* icons for sidebar */
.nav-icon-files {
background-image: url('../img/folder.svg');
@ -113,6 +119,7 @@
}
#filestable tbody tr {
transition: background-color 0.3s ease;
background-color: #fff;
height: 40px;
}
@ -125,6 +132,7 @@
#filestable tbody tr.selected,
#filestable tbody tr.searchresult,
table tr.mouseOver td {
transition: background-color 0.3s ease;
background-color: #f8f8f8;
}
tbody a { color:#000; }

View File

@ -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