aboutsummaryrefslogtreecommitdiff
path: root/uploader/static/js/species.js
blob: d42e0817ed96223eeb037c2e7ae513609c6a426b (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
$(() => {
    var speciesDataTable = buildDataTable(
        "#tbl-select-species",
        JSON.parse(
            $("#tbl-select-species").attr("data-species-list")),
        [
            {
                data: (aspecies) => {
                    return `<input type="radio" name="species_id"`
                        + `id="rdo_species_id_${aspecies.SpeciesId}" `
                        + `value="${aspecies.SpeciesId}" class="chk-row-select">`;
                }
            },
            {
                data: (aspecies) => {
                    return `${aspecies.FullName} (${aspecies.SpeciesName})`;
                }
            }
        ],
        {
            select: "single",
            paging: true,
            scrollY: 700,
            deferRender: true,
            scroller: true,
            scrollCollapse: true,
            layout: {
                topStart: "info",
                topEnd: "search",
                bottomStart: "pageLength",
                bottomEnd: false
            }
        });
});