summaryrefslogtreecommitdiffstats
path: root/client/components/swimlanes
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-04-25 01:41:04 +0300
committerLauri Ojansivu <x@xet7.org>2020-04-25 01:41:04 +0300
commit666186fee809ded9cedfb949cbb09fc41775954c (patch)
tree64043e413566d006e8a19e281e9cb3591460cd78 /client/components/swimlanes
parent5eb5ca5752c3930d056165fcad42d712a7138a3e (diff)
parent6476503137fc41cf52e913aa33aed6bb1abaac6a (diff)
downloadwekan-666186fee809ded9cedfb949cbb09fc41775954c.tar.gz
wekan-666186fee809ded9cedfb949cbb09fc41775954c.tar.bz2
wekan-666186fee809ded9cedfb949cbb09fc41775954c.zip
Merge branch 'mobile' of https://github.com/marc1006/wekan into marc1006-mobile
Diffstat (limited to 'client/components/swimlanes')
-rw-r--r--client/components/swimlanes/swimlanes.js33
1 files changed, 5 insertions, 28 deletions
diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js
index b7a55ce6..2d299ddc 100644
--- a/client/components/swimlanes/swimlanes.js
+++ b/client/components/swimlanes/swimlanes.js
@@ -111,7 +111,7 @@ function initSortable(boardComponent, $listsDom) {
showDesktopDragHandles = false;
}
- if (!Utils.isMiniScreen() && showDesktopDragHandles) {
+ if (Utils.isMiniScreen() || showDesktopDragHandles) {
$listsDom.sortable({
handle: '.js-list-handle',
});
@@ -122,34 +122,12 @@ function initSortable(boardComponent, $listsDom) {
}
const $listDom = $listsDom;
- if ($listDom.data('sortable')) {
+ if ($listDom.data('uiSortable')) {
$listsDom.sortable(
'option',
'disabled',
- // Disable drag-dropping when user is not member/is worker/is miniscreen
- !userIsMember(),
- // Not disable drag-dropping while in multi-selection mode
- // MultiSelection.isActive() || !userIsMember(),
- );
- }
-
- if ($listDom.data('sortable')) {
- $listsDom.sortable(
- 'option',
- 'disabled',
- // Disable drag-dropping when user is not member/is worker/is miniscreen
- Meteor.user().isWorker(),
- // Not disable drag-dropping while in multi-selection mode
- // MultiSelection.isActive() || !userIsMember(),
- );
- }
-
- if ($listDom.data('sortable')) {
- $listsDom.sortable(
- 'option',
- 'disabled',
- // Disable drag-dropping when user is not member/is worker/is miniscreen
- Utils.isMiniScreen(),
+ // Disable drag-dropping when user is not member/is worker
+ !userIsMember() || Meteor.user().isWorker(),
// Not disable drag-dropping while in multi-selection mode
// MultiSelection.isActive() || !userIsMember(),
);
@@ -210,8 +188,7 @@ BlazeComponent.extendComponent({
}
const noDragInside = ['a', 'input', 'textarea', 'p'].concat(
- Utils.isMiniScreen() ||
- (!Utils.isMiniScreen() && showDesktopDragHandles)
+ Utils.isMiniScreen() || showDesktopDragHandles
? ['.js-list-handle', '.js-swimlane-header-handle']
: ['.js-list-header'],
);