Merge pull request #3341 from mfilser/drag_handle_checklist

Drag handles for checklist #3240
This commit is contained in:
Lauri Ojansivu 2020-11-11 13:39:18 +02:00 committed by GitHub
commit ba2c280d56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);

View file

@ -41,6 +41,8 @@ template(name="checklistDetail")
if canModifyCard
h2.title.js-open-inlined-form.is-editable
if isMiniScreenOrShowDesktopDragHandles
span.fa.checklist-handle(class="fa-arrows" title="{{_ 'dragChecklist'}}")
+viewer
= checklist.title
else

View file

@ -42,6 +42,11 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
.js-delete-checklist
@extends .delete-text
span.fa.checklist-handle
padding-right: 20px
padding-top: 6px
float: right
.js-confirm-checklist-delete
background-color: darken(white, 3%)