phpmyadmin/resources/js/server/plugins.ts
Maurício Meneghini Fauth 0d843e68fe
Replace var with let or const in TypeScript files
Most of the changes were done by PhpStorm.

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2026-04-09 20:48:22 -03:00

23 lines
543 B
TypeScript

import $ from 'jquery';
import { AJAX } from '../modules/ajax.ts';
/**
* Make columns sortable, but only for tables with more than 1 data row.
*/
function makeColumnsSortable () {
const $tables = $('#plugins_plugins table:has(tbody tr + tr)');
$tables.tablesorter({
sortList: [[0, 0]],
headers: {
1: { sorter: false }
}
});
$tables.find('thead th')
.append('<div class="sorticon"></div>');
}
AJAX.registerOnload('server/plugins.js', function () {
makeColumnsSortable();
});