PageSourceSearch

https://www.datavat.com.au/modules/halotype_report/js/halotypeReportFilter.js?v=1009.30102020

js datavat.com.au collected 2026-09-30 16:44:31 UTC 2,227 bytes, 68 lines download raw bytes

1/**
2 * @file Halotype Report Filter
3 */
4var pressSearchHaplotype = false;
5// Check is Block Halotype Report
6var ctx = document.getElementById("block-halotypereportblock");
7if (typeof ctx !== 'undefined' && ctx !== null) {
8    //submit search will call api and reload search result
9    jQuery("#btnSubmit").click(function($) {
10        // Show loading spinner
11        showLoading();
12
13        // Reset selected
14        deselectSearchResult(GlobalVariable.tableHalotype);
15        GlobalVariable.selectedHaplotype = [];
16
17        // Set press Search
18        pressSearchHaplotype = true;
19
20        // reload datatables
21        GlobalVariable.tableHalotype.ajax.reload();
22        
23        // Hide/Show column by breed
24        var pBreedSelect = jQuery('[attr-select-box="h_breed"]');
25        showHideColumnByBreed('All breeds', false);
26        showHideColumnByBreed(pBreedSelect[0].innerText.trim(), true);
27
28        // Set Breed choice
29        GlobalVariable.breedHaplotypeLatest = pBreedSelect[0].innerText.trim();
30    });
31
32    jQuery('form[name="haplotype-search-form"] [key-enter="true"]').keypress(function(e) {
33        if (e.which == 13) {
34            //e.preventDefault();
35            jQuery("#btnSubmit").click();
36        }
37    });
38
39    jQuery('form[name="haplotype-search-form"]').find('#btn-clear').click(function() {
40        jQuery('[name=haplotype-search-form] input[type="text"]').val('');
41
42        var pBreedSelect = jQuery('[attr-select-box="h_breed"]');
43        var breeddSelect = jQuery("#edit-breed option:first");
44        setSelectItemValText(breeddSelect, pBreedSelect);
45        breedSelectItemDiv = pBreedSelect.find('.select-items div');
46        setSelectItemDivClass(breedSelectItemDiv, null);
47
48        jQuery('#btnSubmit').click();
49    });
50
51    function showHideColumnByBreed(breed, isShow) {
52        let breedShow = generateAtributeColumnForHaplotypes(breed);
53
54        breedShow.forEach(element => {
55            GlobalVariable.tableHalotype.columns( element ).visible( isShow );
56        });
57        GlobalVariable.tableHalotype.columns.adjust().draw( false )
58        
59    }
60
61}
62
63jQuery(document).ready(function() {
64    if (jQuery("#halotype-form").length > 0) {
65        createPopover("#halotype-form");
66    }
67
68});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.