fogsubmenu.class.php (fogproject-1.5.5) | : | fogsubmenu.class.php (fogproject-1.5.6) | ||
---|---|---|---|---|
skipping to change at line 453 | skipping to change at line 453 | |||
self::$_title = $this->fixTitle($title); | self::$_title = $this->fixTitle($title); | |||
echo '<div class="panel-heading">'; | echo '<div class="panel-heading">'; | |||
echo '<h4 class="category">'; | echo '<h4 class="category">'; | |||
echo self::$_title; | echo self::$_title; | |||
echo '</h4>'; | echo '</h4>'; | |||
echo '</div>'; | echo '</div>'; | |||
echo '<div class="panel-body">'; | echo '<div class="panel-body">'; | |||
echo '<ul class="nav nav-pills nav-stacked">'; | echo '<ul class="nav nav-pills nav-stacked">'; | |||
foreach ((array) $data as $label => &$link) { | foreach ((array) $data as $label => &$link) { | |||
$hash = ''; | $hash = ''; | |||
$target = ''; | ||||
if (!$this->isExternalLink($link)) { | if (!$this->isExternalLink($link)) { | |||
$hash = $this->getTarget($link); | $hash = $this->getTarget($link); | |||
if ($hash) { | if ($hash) { | |||
$link = str_replace( | $link = str_replace( | |||
"#$hash", | "#$hash", | |||
'', | '', | |||
$link | $link | |||
); | ); | |||
} | } | |||
} else { | ||||
$target = ' target="_blank"'; | ||||
} | } | |||
if ($label == 'class') { | if ($label == 'class') { | |||
continue; | continue; | |||
} | } | |||
$string = sprintf( | $string = sprintf( | |||
'<li><a class="%s" href="${link}${hash}">%s</a></li>', | '<li><a class="%s" href="${link}${hash}"%s>%s</a></li>', | |||
$hash ?: $node.'-'.$sub, | $hash ?: $node.'-'.$sub, | |||
$target, | ||||
$label | $label | |||
); | ); | |||
if ($this->isExternalLink($link)) { | if ($this->isExternalLink($link)) { | |||
echo str_replace( | echo str_replace( | |||
'${hash}', | '${hash}', | |||
( | ( | |||
$hash ? | $hash ? | |||
"#$hash" : | "#$hash" : | |||
'' | '' | |||
), | ), | |||
End of changes. 4 change blocks. | ||||
1 lines changed or deleted | 5 lines changed or added |