summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardBody.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-02-07 03:16:16 +0200
committerLauri Ojansivu <x@xet7.org>2020-02-07 03:16:16 +0200
commitbf78b093bad7d463ee325ad96e8b485264d4a3be (patch)
tree3e427789351bd5b45117c30b3a494b8db568613a /client/components/boards/boardBody.js
parent8384d68a060ef8f2c202ce2fa6064c5c823d28dc (diff)
downloadwekan-bf78b093bad7d463ee325ad96e8b485264d4a3be.tar.gz
wekan-bf78b093bad7d463ee325ad96e8b485264d4a3be.tar.bz2
wekan-bf78b093bad7d463ee325ad96e8b485264d4a3be.zip
Try to disable dragging Swimlanes/Lists/Cards/Checklists/Subtasks on small mobile smartphones webbrowsers, and hide drag handles on mobile web.
Thanks to xet7 !
Diffstat (limited to 'client/components/boards/boardBody.js')
-rw-r--r--client/components/boards/boardBody.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index 55b8c0a1..e70a9f67 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -205,21 +205,19 @@ BlazeComponent.extendComponent({
} else {
showDesktopDragHandles = false;
}
- if (
- Utils.isMiniScreen() ||
- (!Utils.isMiniScreen() && showDesktopDragHandles)
- ) {
+ if (!Utils.isMiniScreen() && showDesktopDragHandles) {
$swimlanesDom.sortable({
handle: '.js-swimlane-header-handle',
});
- } else {
+ } else if (!Utils.isMiniScreen() && !showDesktopDragHandles) {
$swimlanesDom.sortable({
handle: '.swimlane-header',
});
}
- // Disable drag-dropping if the current user is not a board member or is comment only
+ // Disable drag-dropping if the current user is not a board member or is miniscreen
$swimlanesDom.sortable('option', 'disabled', !userIsMember());
+ $swimlanesDom.sortable('option', 'disabled', Utils.isMiniScreen());
});
function userIsMember() {