10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-04 13:13:55 +01:00

Merge branch 'master' into QUEST4

This commit is contained in:
Mickaël Véril 2020-05-04 14:24:34 +02:00
commit 5923781e6e
5 changed files with 25 additions and 10 deletions

View File

@ -124,6 +124,12 @@ draft: false
window.defaultDats = window.defaultDats.concat(sub)
}
await doiCache.addRange(Array.from(new Set(window.defaultDats.map(d=>d.DOI.string))))
window.defaultDats = window.defaultDats.sort((datfa,datfb)=>{
const puba = doiCache.get(datfa.DOI.string).format('data', { format: 'object' })[0]
const pubb = doiCache.get(datfb.DOI.string).format('data', { format: 'object' })[0]
return pubUtils.getIssuedDate(puba) - pubUtils.getIssuedDate(pubb)
})
processingIndicator.isActive = false
reloadCustomFiles()
}
@ -621,7 +627,7 @@ draft: false
<li>Choose other excitation parameters you want</li>
<ul id="exTypeList"></ul>
<li>Choose if you want to include unsafe values in statistics</li>
<li>Chse the range of %T1 range using the two number box</li>
<li>Chse the range of \(\mathrm{\%T_1}\) range using the two number box</li>
</ul>
<li>Choose parameters for the statistics</li>
<ul>
@ -701,11 +707,11 @@ draft: false
</li>
</fieldset>
<fieldset>
<legend>%T1</legend>
<input class="range min" airia-label="Minimum value" type="number" id="T1min" step="0.01"
<legend>\(\mathrm{\%T_1}\)</legend>
<input class="range min" airia-label="Minimum value" type="number" id="T1min"
onchange="numberRangeChange(event)" min="0" value="0">
<span>\(\leq \mathrm{\%T1} \leq\)</span>
<input class="range max" airia-label="Maximum value" type="number" id="T1max" step="0.01"
<span>\(\leq \mathrm{\%T_1} \leq\)</span>
<input class="range max" airia-label="Maximum value" type="number" id="T1max"
onchange="numberRangeChange(event)" max="100" value="100">
</fieldset>
<input type="submit" disabled=true value="Load"></input>

View File

@ -23,14 +23,16 @@ draft: false
const sdois = uniq(Object.values(await loadAllData()).flat().map(d => d.DOI.string))
const spubliscite = await Cite.async(sdois)
const pubs = await getPublis()
const spublis = spubliscite.format('data', { format: 'object' })
const uospublis = spubliscite.format('data', { format: 'object' })
const spublis = uospublis.sort((puba,pubb)=>pubUtils.getIssuedDate(puba) - pubUtils.getIssuedDate(pubb))
for (const publi of spublis) {
art=createPubliUI(publi,pubs.sets,true)
$(art).appendTo("#publis_sets")
}
const odois=Array.from(pubs.others.keys())
const opubliscite = await Cite.async(odois)
const opublis = opubliscite.format('data', { format: 'object' })
const uoopublis = opubliscite.format('data', { format: 'object' })
const opublis = uoopublis.sort((puba,pubb)=>pubUtils.getIssuedDate(puba) - pubUtils.getIssuedDate(pubb))
for (const publi of opublis) {
art=createPubliUI(publi,pubs.others,true)
$(art).appendTo("#publis_others")

View File

@ -18,3 +18,4 @@ MathJax.Hub.Config({
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML" onload="MathJaxPolyfillInit()">
</script>
<script src="https://cdn.rawgit.com/larsgw/citation.js/archive/citation.js/citation-0.4.0-9.js" type="text/javascript"></script>
<script src="/js/pubUtils.js"></script>

View File

@ -50,8 +50,8 @@ function createPubliUI(publi,sets=new Map(),toolTips=false) {
else {
$("<span/>").text(publi["container-title"]).appendTo(journaldiv)
}
var datArr = publi.issued["date-parts"][0]
var date = new Date(datArr[0], datArr[1] - 1, datArr[2])
var date = pubUtils.getIssuedDate(publi)
journaldiv.append(" ")
$("<span/>").text(date.getFullYear().toString()).appendTo(journaldiv)
journaldiv.append(" ")
$("<span/>").text(publi.volume).appendTo(journaldiv)

6
static/js/pubUtils.js Normal file
View File

@ -0,0 +1,6 @@
class pubUtils{
static getIssuedDate(publi) {
const parts=publi.issued["date-parts"][0]
return new Date(Date.UTC(parts[0], parts[1] - 1, parts[2]))
}
}