Drag handles for checklist #3240

This commit is contained in:
Martin Filser 2020-11-11 00:10:28 +01:00
parent 167d9d34eb
commit fd41e8ba45
5 changed files with 32 additions and 1 deletions

View file

@ -250,12 +250,15 @@ BlazeComponent.extendComponent({
// Disable sorting if the current user is not a board member
this.autorun(() => {
const disabled = !userIsMember() || Utils.isMiniScreen();
const disabled = !userIsMember();
if (
$checklistsDom.data('uiSortable') ||
$checklistsDom.data('sortable')
) {
$checklistsDom.sortable('option', 'disabled', disabled);
if (Utils.isMiniScreenOrShowDesktopDragHandles()) {
$checklistsDom.sortable({ handle: '.checklist-handle'});
}
}
if ($subtasksDom.data('uiSortable') || $subtasksDom.data('sortable')) {
$subtasksDom.sortable('option', 'disabled', disabled);