1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-11 00:54:49 +02:00

Issue #5473 Corrected scrolling behavior.

This commit is contained in:
camer0n
2025-04-19 13:15:31 -07:00
parent b395b60695
commit 1f806e4dfd
2 changed files with 35 additions and 12 deletions

View File

@@ -1657,6 +1657,7 @@ class e_admin_dispatcher
// Check if any sub-item is active to expand the parent
foreach($item['sub'] as $subKey => &$subItem)
{
if($selected === $subKey && !empty($subItem['group']))
{
$parent = $subItem['group'];
@@ -1762,6 +1763,11 @@ class e_admin_dispatcher
$item['image_src'] = e_navigation::guessMenuIcon($key);
}
if(!empty($item['group'])) // empty icon for group items.
{
$item['image_src'] = '.glyph';
}
if(!vartrue($item['link']))
{
$item['link'] = e_REQUEST_SELF . '?mode=' . $tmp[0] . '&action=' . ($tmp[1] ?? 'main') . (isset($tmp[2]) ? '&sub=' . $tmp[2] : '');
@@ -2084,7 +2090,8 @@ class e_admin_controller
public function addTitle($title = true, $meta = true)
{
$response = $this->getResponse();
if($title === true)
{
$_dispatcher = $this->getDispatcher();
@@ -2106,6 +2113,16 @@ class e_admin_controller
if(isset($data[$search]))
{
$res = $data[$search];
if(!empty($res['group']))
{
$parent = $res['group'];
$parentCaption = $data[$parent]['caption'] ?? '';
if(!empty($parentCaption))
{
$response->appendTitle($parentCaption);
}
}
}
else
{
@@ -2134,7 +2151,8 @@ class e_admin_controller
// echo "<h3>".__METHOD__." - ".$title."</h3>";
// print_a($title);
$this->getResponse()->appendTitle($title);
$response->appendTitle($title);
if($meta)
{
$this->addMetaTitle($title);