utf stuff, fixing toggling

This commit is contained in:
q
2016-07-04 10:04:27 +03:00
parent 20d5e087cb
commit 44a6ab2d27
3 changed files with 28 additions and 22 deletions

View File

@@ -14,11 +14,17 @@ function reload() {
}
function hidetoggle(name,button) {
document.getElementById(name).style.display='none';
document.getElementById(button).onclick=function(){showtoggle(name,button);};
if (document.getElementById(name).style.display=='inline-block') {
document.getElementById(name).style.display='none';
} else {
document.getElementById(name).style.display='inline-block';
}
var allElements = document.getElementsByTagName("*");
for (var i = 0, n = allElements.length; i < n; ++i) {
var el = allElements[i];
if (el.id) {
if ((el.id.startsWith("disp_")) && (el.id!=name)) {
document.getElementById(el.id).style.display='none';
}}
}
}
function showtoggle(name,button) {
document.getElementById(name).style.display='inline-block';
document.getElementById(button).onclick=function(){hidetoggle(name,button);};
}