Added Dropzone-Highlighting to Trash

Signed-off-by: Felix Nüsse <Felix.nuesse@t-online.de>
This commit is contained in:
Felix Nüsse 2018-08-29 11:53:43 +02:00 committed by John Molakvoæ (skjnldsv)
parent 2b0fbf7b89
commit 5c2360961e
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
2 changed files with 20 additions and 1 deletions

View file

@ -102,6 +102,9 @@
.nav-icon-trashbin {
@include icon-color('delete', 'files', $color-black);
}
.nav-icon-trashbin-starred {
@include icon-color('delete', 'files', #ff0000);
}
.nav-icon-deletedshares {
@include icon-color('unshare', 'files', $color-black);
}

View file

@ -65,7 +65,23 @@
this.$el.on('click', 'li a', _.bind(this._onClickItem, this))
this.$el.on('click', 'li button', _.bind(this._onClickMenuButton, this));
$(".nav-trashbin").droppable({
var favListElement=$(".nav-trashbin");
console.log(favListElement);
favListElement.droppable({
over: function( event, ui ) {
favListElement.addClass('dropzone-background')
},
out: function( event, ui ) {
favListElement.removeClass('dropzone-background');
},
activate: function( event, ui ) {
var elem=favListElement.find("a").first();
elem.addClass('nav-icon-trashbin-starred').removeClass('nav-icon-trashbin');
},
deactivate: function( event, ui ) {
var elem=favListElement.find("a").first();
elem.addClass('nav-icon-trashbin').removeClass('nav-icon-trashbin-starred');
},
drop: function( event, ui ) {
var $selectedFiles = $(ui.draggable);