Add droppable ability to menu and icon switch. Fix colour

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-11-08 16:56:58 +01:00
parent 267b673ccb
commit 41210c8cf1
No known key found for this signature in database
GPG Key ID: FB5ACEED51955BF8
3 changed files with 16 additions and 3 deletions

View File

@ -732,9 +732,9 @@ table.dragshadow td.size {
margin-bottom: 2px; margin-bottom: 2px;
} }
.canDrop, .breadcrumb .canDrop > a,
#filestable tbody tr.canDrop { #filestable tbody tr.canDrop {
background-color: rgba(255, 255, 140, 1); background-color: rgb(179, 230, 255);
} }

View File

@ -183,13 +183,20 @@
// setup drag and drop // setup drag and drop
if (this.onDrop) { if (this.onDrop) {
this.$el.find('.crumb:not(.last)').droppable({ this.$el.find('.crumb:not(:last-child):not(.crumbmenu), .crumblist:not(:last-child)').droppable({
drop: this.onDrop, drop: this.onDrop,
over: this.onOver, over: this.onOver,
out: this.onOut, out: this.onOut,
tolerance: 'pointer', tolerance: 'pointer',
hoverClass: 'canDrop' hoverClass: 'canDrop'
}); });
// Only toggle class to open the menu
this.$el.find('.crumb.crumbmenu').droppable({
over: this.onOver,
out: this.onOut,
tolerance: 'pointer',
hoverClass: 'canDrop'
});
} }
// Menu is destroyed on every change, we need to init it // Menu is destroyed on every change, we need to init it
OC.registerMenu($('.crumbmenu'), $('.crumbmenu > .popovermenu')); OC.registerMenu($('.crumbmenu'), $('.crumbmenu > .popovermenu'));

View File

@ -1406,6 +1406,9 @@ div.crumb {
a { a {
opacity: 0.5 opacity: 0.5
} }
&.canDrop .popovermenu {
display: block;
}
// Fix because of the display flex // Fix because of the display flex
.popovermenu { .popovermenu {
top: 100%; top: 100%;
@ -1413,6 +1416,9 @@ div.crumb {
ul { ul {
max-height: 345px; max-height: 345px;
overflow-y: scroll; overflow-y: scroll;
li.canDrop span:first-child {
background-image: url('../img/filetypes/folder-drag-accept.svg?v=1') !important;
}
} }
.in-breadcrumb { .in-breadcrumb {
display: none; display: none;