diff --git a/server/index.php b/server/index.php index 56cb48e..9c8abaa 100644 --- a/server/index.php +++ b/server/index.php @@ -95,7 +95,39 @@ else setTimeout(scrollToTop, 24); } - + + function enableMenu(elem, divFrom) + { + elem.style.display = "block"; + divFrom.style['font-weight'] = "bold"; + } + + function disableMenu(elem, divFrom) + { + elem.style.display = "none"; + divFrom.style['font-weight'] = "normal"; + } + + function switchMenuDisplay(id) + { + const array1 = ['admin', 'add_new_password', 'update_masterkey', 'export_database']; + + for (const _id of array1) + { + elem = document.getElementById(_id); + divFrom = document.getElementById("menu_" + _id); + if (_id === id) + { + if (elem.style.display == "block") + disableMenu(elem, divFrom); + else + enableMenu(elem, divFrom); + } + else + disableMenu(elem, divFrom); + } + } + @@ -103,9 +135,15 @@ else
+ \n";?> + + + +