ui: Set appropriate cursors when the user drags and drops stuff

This commit is contained in:
Johannes Meyer 2019-01-25 10:43:50 +01:00
parent ccdadf68f2
commit b3a5c34c45
2 changed files with 23 additions and 4 deletions

View file

@ -103,6 +103,26 @@ ul.bp {
line-height: 1;
}
// cursors!!!1
&:not([data-sortable-disabled="true"]) {
.movable {
cursor: grab;
&.sortable-chosen {
cursor: grabbing;
}
}
&.progress .movable {
cursor: wait;
}
}
&[data-sortable-disabled="true"] {
li.process > div {
cursor: pointer;
}
}
// ghost style
&.sortable > li.sortable-ghost {
position: relative;
@ -193,10 +213,6 @@ ul.bp {
// collapse handling
li.process {
> div {
cursor: pointer; // So that users know they can interact
}
// toggle, default
> div > a.toggle > i:before {
-webkit-transition: -webkit-transform 0.3s;

View file

@ -120,6 +120,9 @@
$target = $(evt.to);
if (evt.oldIndex !== evt.newIndex || !$target.is($source)) {
var $root = $target.closest('.content > ul.bp');
$root.addClass('progress');
var data = {
csrfToken: $target.data('csrfToken'),
movenode: 'movenode', // That's the submit button..