Commit a3831192 authored by Phil Hughes's avatar Phil Hughes

Added cursor for when moving

parent 22f2f231
...@@ -48,8 +48,16 @@ ...@@ -48,8 +48,16 @@
forceFallback: true, forceFallback: true,
fallbackClass: 'is-dragging', fallbackClass: 'is-dragging',
ghostClass: 'is-ghost', ghostClass: 'is-ghost',
scrollSensitivity: 150,
scrollSpeed: 50,
onUpdate: function (e) { onUpdate: function (e) {
BoardsStore.moveList(e.oldIndex, e.newIndex); BoardsStore.moveList(e.oldIndex, e.newIndex);
},
onStart: function () {
document.body.classList.add('is-dragging');
},
onEnd: function () {
document.body.classList.remove('is-dragging');
} }
}); });
} }
......
...@@ -44,14 +44,18 @@ ...@@ -44,14 +44,18 @@
forceFallback: true, forceFallback: true,
fallbackClass: 'is-dragging', fallbackClass: 'is-dragging',
ghostClass: 'is-ghost', ghostClass: 'is-ghost',
onAdd: (e) => { onAdd: function (e) {
let fromListId = e.from.getAttribute('data-board'); const fromListId = parseInt(e.from.getAttribute('data-board')),
fromListId = parseInt(fromListId) || fromListId; toListId = parseInt(e.to.getAttribute('data-board')),
let toListId = e.to.getAttribute('data-board'); issueId = parseInt(e.item.getAttribute('data-issue'));
toListId = parseInt(toListId) || toListId;
const issueId = parseInt(e.item.getAttribute('data-issue'));
BoardsStore.moveCardToList(fromListId, toListId, issueId); BoardsStore.moveCardToList(fromListId, toListId, issueId);
},
onStart: function () {
document.body.classList.add('is-dragging');
},
onEnd: function () {
document.body.classList.remove('is-dragging');
} }
}); });
......
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
display: none; display: none;
} }
.is-dragging {
* {
cursor: -webkit-grabbing;
cursor: grabbing;
}
}
.dropdown-menu-issues-board-new { .dropdown-menu-issues-board-new {
width: 320px; width: 320px;
...@@ -94,6 +101,8 @@ ...@@ -94,6 +101,8 @@
.board-header { .board-header {
border-top-left-radius: $border-radius-default; border-top-left-radius: $border-radius-default;
border-top-right-radius: $border-radius-default; border-top-right-radius: $border-radius-default;
cursor: -webkit-grab;
cursor: grab;
&.has-border { &.has-border {
padding-top: ($gl-padding - 3px); padding-top: ($gl-padding - 3px);
...@@ -212,10 +221,16 @@ ...@@ -212,10 +221,16 @@
border-radius: $border-radius-default; border-radius: $border-radius-default;
box-shadow: 0 1px 2px rgba(186, 186, 186, 0.5); box-shadow: 0 1px 2px rgba(186, 186, 186, 0.5);
list-style: none; list-style: none;
cursor: -webkit-grab;
cursor: grab;
&:not(:last-child) { &:not(:last-child) {
margin-bottom: 5px; margin-bottom: 5px;
} }
a {
cursor: pointer;
}
} }
.card-title { .card-title {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment