diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-11-13 19:33:13 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-11-13 19:40:48 +0200 |
commit | 274a997e62b421b034e1eb0b3a486813fe127240 (patch) | |
tree | 580d0926825d368cf231c0869c4fa5d389ff9a44 /client/components/boards | |
parent | 82f092491467fa773a662eb2a2a9bc9b20646312 (diff) | |
download | wekan-274a997e62b421b034e1eb0b3a486813fe127240.tar.gz wekan-274a997e62b421b034e1eb0b3a486813fe127240.tar.bz2 wekan-274a997e62b421b034e1eb0b3a486813fe127240.zip |
Fix card, list and swimlane move.
Allow moving cards in multiselect mode.
Closes #2771,
closes #2743,
closes #2704,
related #2081
Diffstat (limited to 'client/components/boards')
-rw-r--r-- | client/components/boards/boardBody.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index 47042ae7..82f12c40 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -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() && |