aboutsummaryrefslogtreecommitdiff
path: root/uploader/static/js/populations.js
blob: 89ededac645ac3e0886ec9ee0c3fb5b0c07e3d11 (about) (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
$(() => {
    var populationsDataTable = buildDataTable(
        "#tbl-select-population",
        JSON.parse(
            $("#tbl-select-population").attr("data-populations-list")),
        [
            {
                data: (apopulation) => {
                    return `<input type="radio" name="population_id"`
                        + `id="rdo_population_id_${apopulation.InbredSetId}" `
                        + `value="${apopulation.InbredSetId}" `
                        + `class="chk-row-select">`;
                }
            },
            {
                searchable: true,
                data: (apopulation) => {
                    return `${apopulation.FullName} (${apopulation.InbredSetName})`;
                }
            }
        ],
        {
            select: "single",
            paging: true,
            scrollY: 700,
            deferRender: true,
            scroller: true,
            scrollCollapse: true,
            layout: {
                topStart: "info",
                topEnd: "search",
                bottomStart: "pageLength",
                bottomEnd: false
            }
        });
});