Fix navigation
This commit is contained in:
parent
a562e0bf22
commit
9d26c19ee2
@ -145,7 +145,7 @@ function logout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initAjax() {
|
function initAjax() {
|
||||||
let links = document.querySelectorAll('.navsite_item, .navpage_item');
|
let links = document.querySelectorAll('.navsite_link, .navpage_link');
|
||||||
|
|
||||||
// Add click event listener to each link
|
// Add click event listener to each link
|
||||||
links.forEach(function (link) {
|
links.forEach(function (link) {
|
||||||
|
@ -83,12 +83,12 @@ function generateNavigation(): string
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($page_required_permission <= $_SESSION["privilege_level"]) {
|
if($page_required_permission <= $_SESSION["privilege_level"]) {
|
||||||
$navpages .= "<li class='navpage_item' data-site='$site_dir' data-page='$page_basename'><a href='$page_location' $page_class>$page_name</a></li>";
|
$navpages .= "<li class='navpage_item' data-site='$site_dir' data-page='$page_basename'><a data-site='$site_dir' data-page='$page_basename' href='$page_location' $page_class>$page_name</a></li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!empty($navpages)){
|
if(!empty($navpages)){
|
||||||
$default_page = $routerConfig["default_page"];
|
$default_page = $routerConfig["default_page"];
|
||||||
$nav_out .= "<li class='navsite_item' data-page='$default_page' data-site='$site_dir'><a href='$site_location' $site_class>$site_name</a><ul class='navpage_list'>$navpages</ul></li>";
|
$nav_out .= "<li class='navsite_item' data-page='$default_page' data-site='$site_dir'><a data-page='$default_page' data-site='$site_dir' href='$site_location' $site_class>$site_name</a><ul class='navpage_list'>$navpages</ul></li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user