10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 05:43:46 +01:00

Add a litle description to allow list

This commit is contained in:
Mickaël Véril 2019-12-19 12:19:32 +01:00
parent ad97382255
commit 68604bea6c

View File

@ -26,7 +26,26 @@ draft: false
var al=$("#AllowList") var al=$("#AllowList")
var ef=$("#exitationFilter") var ef=$("#exitationFilter")
for (const [name,value] of excitationTypes.All) { for (const [name,value] of excitationTypes.All) {
$("<li/>").text(LatexInline[0]+value.LaTeX+LatexInline[1]).appendTo(al) var description=null
switch (Number(value)) {
case Number(excitationTypes.VALENCE):
description=name.toLowerCase()
break;
case Number(excitationTypes.RYDBERG):
const word=name
description=word.charAt(0).toUpperCase()+word.substring(1).toLowerCase()
break;
case Number(excitationTypes.Singulet):
description=name.toLowerCase()
break;
case Number(excitationTypes.Doublet):
description=name.toLowerCase()
break;
default:
description=null;
break;
}
$("<li/>").text(LatexInline[0]+value.LaTeX+LatexInline[1]+(description==null ?'' : ": "+ description)).appendTo(al)
$('<label />', { 'for': 'cb_'+name, text:LatexInline[0]+value.LaTeX+LatexInline[1]}).appendTo(ef); $('<label />', { 'for': 'cb_'+name, text:LatexInline[0]+value.LaTeX+LatexInline[1]}).appendTo(ef);
$("<input/>",{type:"checkbox",id:"cb_"+name, name:name, value:Number(value)}).appendTo(ef) $("<input/>",{type:"checkbox",id:"cb_"+name, name:name, value:Number(value)}).appendTo(ef)
} }