mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-24 13:23:40 +01:00
Handle excitationType better (with LaTeX)
This commit is contained in:
parent
b0c7ca112d
commit
622cad5b02
@ -25,14 +25,15 @@ draft: false
|
||||
const LatexInline = ['\\(', '\\)']
|
||||
var al=$("#AllowList")
|
||||
var ef=$("#exitationFilter")
|
||||
for (const prop of Object.getOwnPropertyNames(excitationTypes)) {
|
||||
if(!Object.getOwnPropertyNames(URL).includes(prop)){
|
||||
$("<li/>").text(LatexInline[0]+excitationTypes[prop].LaTeX+LatexInline[1]).appendTo(al)
|
||||
$('<label />', { 'for': 'cb_'+prop, text:LatexInline[0]+excitationTypes[prop].LaTeX+LatexInline[1]}).appendTo(ef);
|
||||
$("<input/>",{type:"checkbox",id:"cb_"+prop,value:excitationTypes[prop].Value}).appendTo(ef)
|
||||
}
|
||||
for (const [name,value] of excitationTypes.All) {
|
||||
$("<li/>").text(LatexInline[0]+value.LaTeX+LatexInline[1]).appendTo(al)
|
||||
$('<label />', { 'for': 'cb_'+name, text:LatexInline[0]+value.LaTeX+LatexInline[1]}).appendTo(ef);
|
||||
$("<input/>",{type:"checkbox",id:"cb_"+name,value:Number(value)}).appendTo(ef)
|
||||
}
|
||||
await MathJax.typesetPromise();
|
||||
$("<li/>").text("Unsafe").appendTo(al)
|
||||
$('<label/>', { 'for': 'cb_unsafe', text:"Unsafe"}).appendTo(ef);
|
||||
$("<input/>",{type:"checkbox",id:"cb_unsafe",value:true})
|
||||
delete(al)
|
||||
delete(ef)
|
||||
window.doiCache = new DOICache()
|
||||
|
@ -5,12 +5,30 @@ class excitationTypes {
|
||||
static get nPis(){return new excitationType(8,String.raw`n \rightarrow \pi^\star`)}
|
||||
static get Singulet(){return new excitationType(16,"S")}
|
||||
static get Doublet(){return new excitationType(32,"D")}
|
||||
static get All(){
|
||||
var lst=[]
|
||||
for(const prop of Object.getOwnPropertyNames(excitationTypes)){
|
||||
if (prop!="All") {
|
||||
const value=excitationTypes[prop]
|
||||
if (trueTypeOf(value)==excitationType.name) {
|
||||
lst.push([prop,value])
|
||||
}
|
||||
}
|
||||
}
|
||||
return lst
|
||||
}
|
||||
static GetFlags(value){
|
||||
return this.All().filter((x)=>{value & x[1]})
|
||||
}
|
||||
}
|
||||
class excitationType{
|
||||
constructor(value,laTeX){
|
||||
this.Value=value;
|
||||
this.LaTeX=laTeX
|
||||
}
|
||||
valueOf(){
|
||||
return this.Value;
|
||||
}
|
||||
}
|
||||
class code {
|
||||
constructor(name, version) {
|
||||
|
Loading…
Reference in New Issue
Block a user