mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-11-04 13:13:55 +01:00
Sort reference publications by date
This commit is contained in:
parent
974acae266
commit
cc4e332ff4
@ -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()
|
||||
}
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user