aboutsummaryrefslogtreecommitdiff
path: root/resources/assets/javascripts/chunks/tablesorter.js
blob: 2a86f6d1fb4ba63c4afc0ef751242253eec5944b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import "tablesorter/dist/js/jquery.tablesorter"
import "tablesorter/dist/js/extras/jquery.tablesorter.pager.min.js"
import "tablesorter/dist/js/jquery.tablesorter.widgets.js"

jQuery.tablesorter.addParser({
    id: 'htmldata',
    is: function (s, table, cell, $cell) {
        var c = table.config,
            p = c.parserMetadataName || 'sortValue';
        return $(cell).data(p) !== undefined;
    },
    format: function (s, table, cell) {
        var c = table.config,
            p = c.parserMetadataName || 'sortValue';
        return $(cell).data(p);
    },
    type: 'text'
});