Merge branch 'hupptechnologies-ui-feature-drag-handler' into devel

This commit is contained in:
Lauri Ojansivu 2018-12-21 21:52:42 +02:00
commit 32d405bca4
3 changed files with 22 additions and 0 deletions

View file

@ -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 ' > ' }}

View file

@ -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

View file

@ -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',