From a9be6b17b9c8c6b4a59a89b9d3670cca1a6ed9af Mon Sep 17 00:00:00 2001 From: hupptechnologies Date: Thu, 20 Dec 2018 14:42:46 +0530 Subject: Issue : UI feature suggestion: drag handles and long press #1772 Resolved #1772 --- client/components/cards/minicard.jade | 2 ++ client/components/cards/minicard.styl | 13 +++++++++++++ client/components/lists/list.js | 7 +++++++ 3 files changed, 22 insertions(+) (limited to 'client') diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index f23e91b3..0dfcee44 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -9,6 +9,8 @@ template(name="minicard") each labels .minicard-label(class="card-label-{{color}}" title="{{name}}") .minicard-title + .handle + .fa.fa-arrows if $eq 'prefix-with-full-path' currentBoard.presentParentTask .parent-prefix | {{ parentString ' > ' }} diff --git a/client/components/cards/minicard.styl b/client/components/cards/minicard.styl index 8fec7238..7ad51161 100644 --- a/client/components/cards/minicard.styl +++ b/client/components/cards/minicard.styl @@ -94,6 +94,19 @@ .minicard-custom-field-item max-width:50%; flex-grow:1; + .handle + width: 20px; + height: 20px; + position: absolute; + right: 5px; + top: 5px; + display:none; + @media only screen and (max-width: 1199px) { + display:block; + } + .fa-arrows + font-size:20px; + color: #ccc; .minicard-title p:last-child margin-bottom: 0 diff --git a/client/components/lists/list.js b/client/components/lists/list.js index 00908faa..043cb77c 100644 --- a/client/components/lists/list.js +++ b/client/components/lists/list.js @@ -26,6 +26,13 @@ BlazeComponent.extendComponent({ const itemsSelector = '.js-minicard:not(.placeholder, .js-card-composer)'; const $cards = this.$('.js-minicards'); + + if(window.matchMedia('(max-width: 1199px)').matches) { + $( '.js-minicards' ).sortable({ + handle: '.handle', + }); + } + $cards.sortable({ connectWith: '.js-minicards:not(.js-list-full)', tolerance: 'pointer', -- cgit v1.2.3-1-g7c22