phpmyadmin/resources/js/server/plugins.ts
Maurício Meneghini Fauth 01e4a87bbd
Move resources/js/src to resources/js
Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
2025-05-22 13:43:59 -03:00

23 lines
541 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 () {
var $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();
});