fixed drag with arrows

This commit is contained in:
2025-12-03 14:23:14 +01:00
parent 329b3ffdeb
commit 86782d26b2
2 changed files with 76 additions and 27 deletions
+32 -26
View File
@@ -1,7 +1,32 @@
<td class="drag-handle text-center" style="cursor:grab;">
<i class="bi bi-list" style="font-size:1.2rem;"></i>
<td class="text-center align-middle">
<div class="d-flex justify-content-center align-items-center gap-1">
<!-- Maniglia drag & drop -->
<span class="drag-handle" style="cursor:grab;">
<i class="bi bi-list drag-icon" style="font-size:1.2rem;"></i>
</span>
<!-- Freccia sposta tra le due tabelle -->
<?php if (!empty($is_da_programmare) && $is_da_programmare): ?>
<!-- Siamo nella tabella PROGRAMMATI (status 6) manda giù -->
<button type="button"
class="btn btn-link p-0 move-to-daprogrammare"
title="Sposta in 'Da programmare'">
<i class="bi bi-arrow-down-circle"></i>
</button>
<?php else: ?>
<!-- Siamo nella tabella DA PROGRAMMARE (status 1) manda su -->
<button type="button"
class="btn btn-link p-0 move-to-programmati"
title="Sposta in 'Programmati'">
<i class="bi bi-arrow-up-circle"></i>
</button>
<?php endif; ?>
</div>
</td>
<?php if ($r['id_status'] == 6): ?>
<td>
<span class='view'><?= $r['priority'] ?></span>
@@ -23,32 +48,13 @@
</td>
<td>
<?php $matricePhoto = $r['matrice_photo'] ?? null; ?>
<div class="d-flex align-items-center">
<div class="flex-grow-1">
<span class='view'><?= htmlspecialchars($r['matrice']) ?></span>
<select class='inline-edit form-select form-select-sm select2'
name='idmatrice'>
<?= selectOptions($matrici, $r['idmatrice']) ?>
</select>
</div>
<?php if (!empty($matricePhoto)): ?>
<div class="view ms-2">
<img src="photos/matrici/<?= htmlspecialchars($matricePhoto) ?>"
data-full="photos/matrici/<?= htmlspecialchars($matricePhoto) ?>"
class="photo-thumb"
style="width:42px;height:42px;object-fit:cover;
border-radius:6px;border:1px solid #ced4da;
cursor:pointer;">
</div>
<?php endif; ?>
</div>
<span class='view'><?= $r['matrice'] ?></span>
<select class='inline-edit form-select form-select-sm select2'
name='idmatrice'>
<?= selectOptions($matrici, $r['idmatrice']) ?>
</select>
</td>
<td>
<?php