summaryrefslogtreecommitdiffstats
path: root/client/components/lists
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/lists
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/lists')
-rw-r--r--client/components/lists/list.js25
-rw-r--r--client/components/lists/listHeader.jade4
2 files changed, 24 insertions, 5 deletions
diff --git a/client/components/lists/list.js b/client/components/lists/list.js
index 0513f90f..8574caf7 100644
--- a/client/components/lists/list.js
+++ b/client/components/lists/list.js
@@ -133,14 +133,33 @@ BlazeComponent.extendComponent({
$cards.sortable({
handle: '.handle',
});
- } else {
+ } else if (!Utils.isMiniScreen() && !showDesktopDragHandles) {
$cards.sortable({
handle: '.minicard',
});
}
- // Disable drag-dropping if the current user is not a board member or is comment only
- $cards.sortable('option', 'disabled', !userIsMember());
+ if ($cards.data('sortable')) {
+ $cards.sortable(
+ 'option',
+ 'disabled',
+ // Disable drag-dropping when user is not member/is miniscreen
+ !userIsMember(),
+ // Not disable drag-dropping while in multi-selection mode
+ // MultiSelection.isActive() || !userIsMember(),
+ );
+ }
+
+ if ($cards.data('sortable')) {
+ $cards.sortable(
+ 'option',
+ 'disabled',
+ // Disable drag-dropping when user is not member/is miniscreen
+ Utils.isMiniScreen(),
+ // Not disable drag-dropping while in multi-selection mode
+ // MultiSelection.isActive() || !userIsMember(),
+ );
+ }
});
// We want to re-run this function any time a card is added.
diff --git a/client/components/lists/listHeader.jade b/client/components/lists/listHeader.jade
index ec2c556f..182fee9e 100644
--- a/client/components/lists/listHeader.jade
+++ b/client/components/lists/listHeader.jade
@@ -30,10 +30,10 @@ template(name="listHeader")
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-icon
a.fa.fa-navicon.js-open-list-menu
- a.list-header-handle.handle.fa.fa-arrows.js-list-handle
+ //a.list-header-handle.handle.fa.fa-arrows.js-list-handle
else
a.list-header-menu-icon.fa.fa-angle-right.js-select-list
- a.list-header-handle.handle.fa.fa-arrows.js-list-handle
+ //a.list-header-handle.handle.fa.fa-arrows.js-list-handle
else if currentUser.isBoardMember
if isWatching
i.list-header-watch-icon.fa.fa-eye