mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 09:38:49 +01:00
Try to disable dragging Swimlanes/Lists/Cards/Checklists/Subtasks on small mobile smartphones webbrowsers, and hide drag handles on mobile web.
Thanks to xet7 !
This commit is contained in:
parent
8384d68a06
commit
bf78b093ba
8 changed files with 92 additions and 23 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue