From 655c1db8896518c3bf42677391f3ed44e416c66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Sun, 28 May 2023 18:09:11 +0200 Subject: [PATCH] Fix row selection in bootstrap --- benchmark/scripts/templates/partials/js_select.html | 1 + benchmark/scripts/templates/select.html | 1 + 2 files changed, 2 insertions(+) diff --git a/benchmark/scripts/templates/partials/js_select.html b/benchmark/scripts/templates/partials/js_select.html index 2593b27..4a0feb5 100644 --- a/benchmark/scripts/templates/partials/js_select.html +++ b/benchmark/scripts/templates/partials/js_select.html @@ -12,6 +12,7 @@ "orderable": false }] }); + // Check if row is selected $('#file-table tbody').on('click', 'tr', function () { if ($(this).hasClass('{{ selected }}')) { $(this).removeClass('{{ selected }}'); diff --git a/benchmark/scripts/templates/select.html b/benchmark/scripts/templates/select.html index 74cfdb5..228ce97 100644 --- a/benchmark/scripts/templates/select.html +++ b/benchmark/scripts/templates/select.html @@ -8,6 +8,7 @@ style="--bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem;" onclick="showFile(\''%} {% set button_post = '\')">View' %} + {% set selected = "selected" %} {% else %} {% set button_class = "button is-primary is-small" %} {% set h1_class = "title is-1 has-text-centered" %}