mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Bugfix: submenu was expanding when some non-submenu items were clicked. eg. page.php?x
This commit is contained in:
@@ -12,9 +12,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/sitelinks_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/sitelinks_class.php,v $
|
||||||
| $Revision: 1.14 $
|
| $Revision: 1.15 $
|
||||||
| $Date: 2007-08-07 19:31:44 $
|
| $Date: 2007-08-19 21:49:32 $
|
||||||
| $Author: e107steved $
|
| $Author: e107coders $
|
||||||
+---------------------------------------------------------------+
|
+---------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -122,8 +122,19 @@ class sitelinks
|
|||||||
|
|
||||||
// if there's a submenu. :
|
// if there's a submenu. :
|
||||||
if (isset($this->eLinkList[$main_linkid]) && is_array($this->eLinkList[$main_linkid])){
|
if (isset($this->eLinkList[$main_linkid]) && is_array($this->eLinkList[$main_linkid])){
|
||||||
$substyle = (strpos(e_SELF, $link['link_url']) !== FALSE || strpos(e_SELF, $link['link_name']) !== FALSE || $link['link_expand'] == FALSE) ? "" : " style='display:none'"; // expanding sub-menus.
|
foreach($this->eLinkList[$main_linkid] as $val) // check that something in the submenu is actually selected.
|
||||||
$render_link[$key] .= "\n\n<div id='{$main_linkid}'".$substyle." class='d_sublink'>\n";
|
{
|
||||||
|
if($this->hilite($val['link_url'],TRUE)== TRUE || $link['link_expand'] == FALSE)
|
||||||
|
{
|
||||||
|
$substyle = "compact";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$substyle = "none";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$render_link[$key] .= "\n\n<div id='{$main_linkid}' style='display:$substyle' class='d_sublink'>\n";
|
||||||
foreach ($this->eLinkList[$main_linkid] as $sub){
|
foreach ($this->eLinkList[$main_linkid] as $sub){
|
||||||
$render_link[$key] .= $this->makeLink($sub, TRUE, $aSubStyle, $css_class);
|
$render_link[$key] .= $this->makeLink($sub, TRUE, $aSubStyle, $css_class);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user