Skip to content

Commit 70c9db3

Browse files
Merge branch '6.0/queries-page-in-htmx' into 6.0-trunk
2 parents 23bc7bd + d872377 commit 70c9db3

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

lib/RT/Interface/Web/MenuBuilder.pm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,9 +1559,6 @@ sub _BuildAdminTopMenu {
15591559
title => loc('SQL Queries'),
15601560
description => loc('Browse the SQL queries made in this process'),
15611561
path => '/Admin/Tools/Queries.html',
1562-
attributes => {
1563-
'hx-boost' => 'false',
1564-
},
15651562
);
15661563
}
15671564
$admin_tools->child( rights_inspector =>

share/html/Admin/Tools/Queries.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@
6666
% } elsif (!$history) {
6767
<p><&|/l&>This server process has recorded no SQL queries.</&></p>
6868
% } else {
69-
<script type="text/javascript">
70-
jQuery(function () { jQuery(".tablesorter").tablesorter(); });
71-
</script>
72-
7369
<ol>
7470
% my $r = 0;
7571
% for my $request (@$history) {

share/static/js/init.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,20 @@ document.addEventListener('htmx:load', function(evt) {
817817
}
818818
}
819819

820+
if ( elt.querySelector(".tablesorter") ) {
821+
let checkTableSorterAttempts = 0;
822+
const checkTableSorter = setInterval(function() {
823+
if ( !document.contains(elt) || ++checkTableSorterAttempts >= 100 ) {
824+
clearInterval(checkTableSorter);
825+
return;
826+
}
827+
if ( jQuery.tablesorter ) {
828+
jQuery(elt).find(".tablesorter").tablesorter();
829+
clearInterval(checkTableSorter);
830+
}
831+
}, 50);
832+
}
833+
820834
// Clear orphaned tooltips
821835
document.querySelectorAll('body > div.tooltip[id^=tooltip]').forEach(elt => {
822836
if ( !document.querySelector(`[aria-describedby="${elt.id}"]`) ) {

0 commit comments

Comments
 (0)