From 76ecd6d95520243c1789c330fe51f59cc911c74d Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Fri, 17 Sep 2021 03:03:58 -0400 Subject: [PATCH] Fix sortable for modern browsers. --- lib/delivery.php | 6 +++--- lib/header.php | 6 +++--- www/jquery.sortable.js | 2 +- www/style.css | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/delivery.php b/lib/delivery.php index 6d7643b..006112c 100644 --- a/lib/delivery.php +++ b/lib/delivery.php @@ -122,15 +122,15 @@ } if ($count > 1) { - echo "
\n"; echo "

Drag delivery details to reorder the schedule.

\n"; + echo "
\n"; } foreach ($orders as $order) { $contact = get_contact_by_id($order->getBeneficiaryId()); if (! $contact) continue; - echo "\n"; + echo "
"; $phones = array(); $area = get_contact_area($contact); @@ -169,7 +169,7 @@ } echo "
\n"; - echo "\n\n"; + echo "
\n\n"; } if ($count > 1) echo "
\n"; diff --git a/lib/header.php b/lib/header.php index a2432d3..7c9cc08 100644 --- a/lib/header.php +++ b/lib/header.php @@ -2,9 +2,9 @@ <?php echo "$charity"; if ($module) echo " - $module"; ?> \n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; ?> diff --git a/www/jquery.sortable.js b/www/jquery.sortable.js index 3e59fe6..6395b52 100644 --- a/www/jquery.sortable.js +++ b/www/jquery.sortable.js @@ -1,7 +1,7 @@ $(function() { $(".sortable").sortable({ axis: "y", - containment: "parent", + containment: "document", placeholder: "sortplaceholder", forcePlaceholderSize: true, start: function( event, ui ) { ui.item.addClass('sortdragging'); }, diff --git a/www/style.css b/www/style.css index 96c3cda..bda32bf 100644 --- a/www/style.css +++ b/www/style.css @@ -116,6 +116,7 @@ table.report > * > tr > td { border-radius: 0.5em; padding-bottom: 1em; background: #eeeeee; + opacity: 0.75; } span.sortdragging hr { -- 2.7.4