From afbd373088dc06f2a32d79dc7dee0502f246a85f Mon Sep 17 00:00:00 2001 From: d-buchmann Date: Wed, 13 Aug 2025 11:57:00 +0200 Subject: [PATCH] Modify select panel visibility Make the select panel always visible because several user reports suggest that they are unaware of the feature. Also solves the minor issue that selecting/deselecting a single row changes the position of the table which makes it prone to misclicks. --- assets/controllers/elements/datatables/parts_controller.js | 6 +++--- templates/components/datatables.macro.html.twig | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/controllers/elements/datatables/parts_controller.js b/assets/controllers/elements/datatables/parts_controller.js index 1fe11a20..23e110af 100644 --- a/assets/controllers/elements/datatables/parts_controller.js +++ b/assets/controllers/elements/datatables/parts_controller.js @@ -42,11 +42,11 @@ export default class extends DatatablesController { const selectPanel = this.selectPanelTarget; - //Hide/Unhide panel with the selection tools + //Toggle action button based on selection if (count > 0) { - selectPanel.classList.remove('d-none'); + document.getElementById("selectPanel_submit").disabled = false; } else { - selectPanel.classList.add('d-none'); + document.getElementById("selectPanel_submit").disabled = true; } //Update selection count text diff --git a/templates/components/datatables.macro.html.twig b/templates/components/datatables.macro.html.twig index 5ce0f23f..28885432 100644 --- a/templates/components/datatables.macro.html.twig +++ b/templates/components/datatables.macro.html.twig @@ -29,14 +29,14 @@ -
+
{# #}
- {% trans with {'%count%': ''} %}part_list.action.part_count{% endtrans %} + {% trans with {'%count%': '0'} %}part_list.action.part_count{% endtrans %}