mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Fix card, list and swimlane move.
Allow moving cards in multiselect mode. Closes #2771, closes #2743, closes #2704, related #2081
This commit is contained in:
parent
82f0924914
commit
274a997e62
4 changed files with 54 additions and 30 deletions
|
@ -89,7 +89,6 @@ BlazeComponent.extendComponent({
|
|||
helper.append(list.clone());
|
||||
return helper;
|
||||
},
|
||||
handle: '.js-swimlane-header-handle',
|
||||
items: '.swimlane:not(.placeholder)',
|
||||
placeholder: 'swimlane placeholder',
|
||||
distance: 7,
|
||||
|
@ -193,6 +192,24 @@ BlazeComponent.extendComponent({
|
|||
// ugly touch event hotfix
|
||||
enableClickOnTouch('.js-swimlane:not(.placeholder)');
|
||||
|
||||
this.autorun(() => {
|
||||
if (
|
||||
Utils.isMiniScreen() ||
|
||||
(!Utils.isMiniScreen() && Meteor.user().hasShowDesktopDragHandles())
|
||||
) {
|
||||
$swimlanesDom.sortable({
|
||||
handle: '.js-swimlane-header-handle',
|
||||
});
|
||||
} else {
|
||||
$swimlanesDom.sortable({
|
||||
handle: '.swimlane-header',
|
||||
});
|
||||
}
|
||||
|
||||
// Disable drag-dropping if the current user is not a board member or is comment only
|
||||
$swimlanesDom.sortable('option', 'disabled', !userIsMember());
|
||||
});
|
||||
|
||||
function userIsMember() {
|
||||
return (
|
||||
Meteor.user() &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue