import {arrayResponse} from './processData.js' import {queryDTO, getData} from './toExport.js' import {processOccData, processSingleContext} from './processData.js' import {flask_be_address} from './config.js' export function checkContext() { $("#lauchSearchContext").css("display", "none"); let resulTable = document.getElementById("result"); const checkBoxes = resulTable.querySelectorAll('input[type="checkbox"]'); let arrayContesti = []; var selected = []; $('#result input:checked').each(function() { //selected.push($(this).attr('id')); var checkNum = $(this).attr('id'); selected.push(checkNum); }); for (var i=0; i processOccData(response)) .fail(err => { console.log(err); $("#loader").css("display", "none"); alert('Something went wrong!'); }); // .always(response => console.log(response)); } export function goToSingleContext(num, parole, periodi, brani) { let params = {"indice": num, "parole": parole, "periodi": periodi, "brani": brani}; let queryGSC = { elem: arrayResponse[num], params: params } getData('/get_single_context', queryGSC) // After request finishes, process response data .done(response => processSingleContext(response)) .fail(err => { console.log(err); $("#loader").css("display", "none"); alert('Something went wrong!'); }); }