Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ServerStatusSorter.js « Server « functions « src « js - github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d03c5eea7415ff9ed7dec543648924832be92e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* vim: set expandtab sw=4 ts=4 sts=4: */

/**
 * Module import
 */
import { $ } from '../../utils/JqueryExtended';
import '../../plugins/jquery/jquery.tablesorter';

// TODO: tablesorter shouldn't sort already sorted columns
/**
 * @access public
 *
 * @param {string} tabid Table id for chart drawing
 *
 * @return {void}
 */
function initTableSorter (tabid) {
    var $table;
    var opts;
    switch (tabid) {
    case 'statustabs_queries':
        $table = $('#serverstatusqueriesdetails');
        opts = {
            sortList: [[3, 1]],
            headers: {
                1: { sorter: 'fancyNumber' },
                2: { sorter: 'fancyNumber' }
            }
        };
        break;
    }
    $table.tablesorter(opts);
    $table.find('tr:first th')
        .append('<div class="sorticon"></div>')
        .addClass('header');
}

/**
 * Module export
 */
export {
    initTableSorter
};