mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 05:43:46 +01:00
Allow to load Absorbtion and fluorescence at the same time
This commit is contained in:
parent
bd6dd042bd
commit
18be81d5ba
@ -63,34 +63,28 @@ draft: false
|
||||
delete (cbextl)
|
||||
delete (allc)
|
||||
window.doiCache = new DOICache()
|
||||
$('#form_dat > fieldset > input[type=radio]').on('change', async function (event) {
|
||||
}
|
||||
async function loadFiles() {
|
||||
processingIndicator.isActive = true
|
||||
$("#Geom_th,#GSGeom_th,#ESGeom_th").each(function () {
|
||||
$(this).attr("hidden", true)
|
||||
})
|
||||
var result = $(this).val();
|
||||
var proms = [];
|
||||
switch (result) {
|
||||
var chks=[]
|
||||
var chks = $("#form_datFiles > ul > ul > li >input[type=checkbox]:checked")
|
||||
var proms = Array.from(chks).flatMap((c) => {
|
||||
switch (c.value) {
|
||||
case "abs":
|
||||
proms = getAbsFilesName().map((f) => AbsDataFile.loadAsync(f));
|
||||
$("#Geom_th").attr("hidden", false)
|
||||
return getAbsFilesName().map((f) => AbsDataFile.loadAsync(f));
|
||||
break;
|
||||
case "fluo":
|
||||
proms = getFluoFilesName().map((f) => FluoDataFile.loadAsync(f));
|
||||
$("#Geom_th").attr("hidden", false)
|
||||
return getFluoFilesName().map((f) => FluoDataFile.loadAsync(f));
|
||||
break;
|
||||
case "zpe":
|
||||
proms = getZPEFilesName().map((f) => ZPEDataFile.loadAsync(f));
|
||||
$("#GSGeom_th,#ESGeom_th").each(function () {
|
||||
$(this).attr("hidden", false)
|
||||
})
|
||||
default:
|
||||
return []
|
||||
break;
|
||||
}
|
||||
})
|
||||
window.dats = await Promise.all(proms)
|
||||
processingIndicator.isActive = false
|
||||
reloadFileSelector()
|
||||
await reloadSelect()
|
||||
})
|
||||
}
|
||||
function reloadFileSelector() {
|
||||
$("#customFiles_input").attr("value", "").attr("disabled", false)
|
||||
@ -434,16 +428,26 @@ draft: false
|
||||
<li>Now you can see the list of selected data and some statistics about these data</li>
|
||||
</ol>
|
||||
</p>
|
||||
<form id="form_dat" action="javascript:submitdat()" method="post">
|
||||
<fieldset>
|
||||
<form id="form_datFiles" action="javascript:loadFiles()" method="post">
|
||||
<legend>Data type</legend>
|
||||
<input type="radio" id="abs" value="abs" name="datatype">
|
||||
<label for="abs">Absorption</label>
|
||||
<input type="radio" id="fluo" value="fluo" name="datatype">
|
||||
<ul class="nestedCbList" style="padding-left: 0em;">
|
||||
<li>
|
||||
<input type="checkbox" onchange="nestedCheckbox_change(event)" id="cb_fileType_All"></input>
|
||||
<label for="cb_fileType_All"> All</label>
|
||||
</li>
|
||||
<ul class="nestedCbList">
|
||||
<li>
|
||||
<input type="checkbox" onchange="nestedCheckbox_change(event)" id="cb_abs" value="abs" name="datatype">
|
||||
<label for="cb_abs">Absorption</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="checkbox" onchange="nestedCheckbox_change(event)" id="cb_fluo" value="fluo" name="datatype">
|
||||
<label for="fluo">Fluorescence</label>
|
||||
<input type="radio" id="zpe" value="zpe" name="datatype">
|
||||
<label for="zpe">\(\Delta \text{ZPE}\)</label>
|
||||
</fieldset>
|
||||
</ul>
|
||||
</li>
|
||||
<input type="submit" value="Load files" />
|
||||
</form>
|
||||
<form id="form_dat" action="javascript:submitdat()" method="post">
|
||||
<fieldset>
|
||||
<div>
|
||||
<label for="customFiles_input">Add custom data file</label>
|
||||
|
Loading…
Reference in New Issue
Block a user