mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-11-04 13:13:55 +01:00
dissociate Method and basis selector
This commit is contained in:
parent
e4bc15babe
commit
cf683fb59d
@ -120,9 +120,21 @@ draft: false
|
|||||||
$(this).empty()
|
$(this).empty()
|
||||||
})
|
})
|
||||||
$('#form_dat > fieldset > div > select').each(async function () {
|
$('#form_dat > fieldset > div > select').each(async function () {
|
||||||
const vals = uniq(window.dats.map((d) => { return d[$(this).attr("name")] }))
|
const vals = uniq(window.dats.map((d) => {
|
||||||
|
switch ($(this).attr("name")) {
|
||||||
|
case "method":
|
||||||
|
return d.method.name
|
||||||
|
break;
|
||||||
|
case "basis":
|
||||||
|
return d.method.basis
|
||||||
|
default:
|
||||||
|
return d[$(this).attr("name")]
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}))
|
||||||
var sets = await getSets()
|
var sets = await getSets()
|
||||||
for (const val of vals) {
|
for (const val of vals) {
|
||||||
|
if(val!==null) {
|
||||||
var op = $("<option/>", {
|
var op = $("<option/>", {
|
||||||
value: JSON.stringify(val)
|
value: JSON.stringify(val)
|
||||||
})
|
})
|
||||||
@ -143,6 +155,7 @@ draft: false
|
|||||||
}
|
}
|
||||||
op.appendTo(this)
|
op.appendTo(this)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
$('#form_dat > input[type="submit"').prop('disabled', false);
|
$('#form_dat > input[type="submit"').prop('disabled', false);
|
||||||
processingIndicator.isActive = false
|
processingIndicator.isActive = false
|
||||||
@ -267,7 +280,20 @@ draft: false
|
|||||||
if (typeof values == "undefined" || values == null) {
|
if (typeof values == "undefined" || values == null) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return values.includes(JSON.stringify(d[prop]))
|
var val=null
|
||||||
|
switch (prop) {
|
||||||
|
case "method":
|
||||||
|
val=d.method.name
|
||||||
|
break;
|
||||||
|
case "basis":
|
||||||
|
val=d.method.basis
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
val=d[prop]
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return values.includes(JSON.stringify(val))
|
||||||
|
delete(val)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
await window.doiCache.addRange(window.filtData.map((d) => d.DOI.string))
|
await window.doiCache.addRange(window.filtData.map((d) => d.DOI.string))
|
||||||
@ -433,6 +459,10 @@ draft: false
|
|||||||
<label for="method_select">Method</label>
|
<label for="method_select">Method</label>
|
||||||
<select multiple id="method_select" name="method"></select>
|
<select multiple id="method_select" name="method"></select>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="basis_select">Basis</label>
|
||||||
|
<select multiple id="basis_select" name="basis"></select>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="DOI_select">Publication</label>
|
<label for="DOI_select">Publication</label>
|
||||||
<select multiple id="DOI_select" name="DOI"></select>
|
<select multiple id="DOI_select" name="DOI"></select>
|
||||||
|
Loading…
Reference in New Issue
Block a user