10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 05:43:46 +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) 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 processingIndicator.isActive = false
reloadCustomFiles() reloadCustomFiles()
} }
@ -621,7 +627,7 @@ draft: false
<li>Choose other excitation parameters you want</li> <li>Choose other excitation parameters you want</li>
<ul id="exTypeList"></ul> <ul id="exTypeList"></ul>
<li>Choose if you want to include unsafe values in statistics</li> <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> </ul>
<li>Choose parameters for the statistics</li> <li>Choose parameters for the statistics</li>
<ul> <ul>
@ -701,11 +707,11 @@ draft: false
</li> </li>
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>%T1</legend> <legend>\(\mathrm{\%T_1}\)</legend>
<input class="range min" airia-label="Minimum value" type="number" id="T1min" step="0.01" <input class="range min" airia-label="Minimum value" type="number" id="T1min"
onchange="numberRangeChange(event)" min="0" value="0"> onchange="numberRangeChange(event)" min="0" value="0">
<span>\(\leq \mathrm{\%T1} \leq\)</span> <span>\(\leq \mathrm{\%T_1} \leq\)</span>
<input class="range max" airia-label="Maximum value" type="number" id="T1max" step="0.01" <input class="range max" airia-label="Maximum value" type="number" id="T1max"
onchange="numberRangeChange(event)" max="100" value="100"> onchange="numberRangeChange(event)" max="100" value="100">
</fieldset> </fieldset>
<input type="submit" disabled=true value="Load"></input> <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 sdois = uniq(Object.values(await loadAllData()).flat().map(d => d.DOI.string))
const spubliscite = await Cite.async(sdois) const spubliscite = await Cite.async(sdois)
const pubs = await getPublis() 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) { for (const publi of spublis) {
art=createPubliUI(publi,pubs.sets,true) art=createPubliUI(publi,pubs.sets,true)
$(art).appendTo("#publis_sets") $(art).appendTo("#publis_sets")
} }
const odois=Array.from(pubs.others.keys()) const odois=Array.from(pubs.others.keys())
const opubliscite = await Cite.async(odois) 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) { for (const publi of opublis) {
art=createPubliUI(publi,pubs.others,true) art=createPubliUI(publi,pubs.others,true)
$(art).appendTo("#publis_others") $(art).appendTo("#publis_others")

View File

@ -17,4 +17,5 @@ MathJax.Hub.Config({
<script type="text/javascript" async <script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML" onload="MathJaxPolyfillInit()"> src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML" onload="MathJaxPolyfillInit()">
</script> </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="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 { else {
$("<span/>").text(publi["container-title"]).appendTo(journaldiv) $("<span/>").text(publi["container-title"]).appendTo(journaldiv)
} }
var datArr = publi.issued["date-parts"][0] var date = pubUtils.getIssuedDate(publi)
var date = new Date(datArr[0], datArr[1] - 1, datArr[2]) journaldiv.append(" ")
$("<span/>").text(date.getFullYear().toString()).appendTo(journaldiv) $("<span/>").text(date.getFullYear().toString()).appendTo(journaldiv)
journaldiv.append(" ") journaldiv.append(" ")
$("<span/>").text(publi.volume).appendTo(journaldiv) $("<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]))
}
}