2023-10-31 16:00:25 +00:00
|
|
|
// Get Document ID
|
|
|
|
|
|
|
|
function getID(string) {
|
|
|
|
|
|
|
|
return document.getElementById(string)
|
|
|
|
}
|
|
|
|
|
|
|
|
class InfoPop {
|
|
|
|
constructor(name) {
|
|
|
|
this.name = name
|
|
|
|
this.element = getID(this.name)
|
2023-11-02 10:09:47 +00:00
|
|
|
this.element.innerHTML = " "
|
2023-10-31 16:00:25 +00:00
|
|
|
this.element.style.fontSize = "14px"
|
2023-11-02 10:09:47 +00:00
|
|
|
this.element.style.position = "sticky"
|
2023-10-31 16:00:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
clear() {
|
|
|
|
|
2023-11-02 10:09:47 +00:00
|
|
|
this.element.innerHTML = " "
|
2023-10-31 16:00:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
err(text) {
|
|
|
|
|
|
|
|
this.element.classList.add("yellow")
|
|
|
|
this.element.innerHTML = "<i class='fa fa-warning'></i> " + text
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
info(text) {
|
|
|
|
|
|
|
|
this.element.classList.remove("yellow")
|
|
|
|
|
|
|
|
this.element.innerHTML = "<i class='fa fa-info-circle'></i> " + text
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|