diff options
author | Felix Nüsse <Felix.nuesse@t-online.de> | 2018-08-29 11:53:43 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-10-02 08:15:05 +0200 |
commit | 5c2360961eb8c3f2b6617723d5b805f20a067903 (patch) | |
tree | 0c835c4530185884e0512486e053a660c9427e4e /apps | |
parent | 2b0fbf7b89b3b7dc6a1382169ee4899a17e12bc2 (diff) | |
download | nextcloud-server-5c2360961eb8c3f2b6617723d5b805f20a067903.tar.gz nextcloud-server-5c2360961eb8c3f2b6617723d5b805f20a067903.zip |
Added Dropzone-Highlighting to Trash
Signed-off-by: Felix Nüsse <Felix.nuesse@t-online.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/css/files.scss | 3 | ||||
-rw-r--r-- | apps/files/js/navigation.js | 18 |
2 files changed, 20 insertions, 1 deletions
diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index bd57f1907f5..77e39d87af2 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -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); } diff --git a/apps/files/js/navigation.js b/apps/files/js/navigation.js index d8b249411f8..1fed29471f8 100644 --- a/apps/files/js/navigation.js +++ b/apps/files/js/navigation.js @@ -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); |