summaryrefslogtreecommitdiff
path: root/individual.php
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2011-10-21 15:03:42 +0000
committerfisharebest <fisharebest@gmail.com>2011-10-21 15:03:42 +0000
commit664f5a84cce34660e57e0ead947fc887e84c0cd0 (patch)
tree4dfb24cadde68543e124a3bf5e5f4588d6ce8249 /individual.php
parentd9947a81cef95fb7f851759bcd0e6604684900cf (diff)
downloadwebtrees-664f5a84cce34660e57e0ead947fc887e84c0cd0.tar.gz
webtrees-664f5a84cce34660e57e0ead947fc887e84c0cd0.tar.bz2
webtrees-664f5a84cce34660e57e0ead947fc887e84c0cd0.zip
#821931 - Individual.php: Default tab isn't selected
Diffstat (limited to 'individual.php')
-rw-r--r--individual.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/individual.php b/individual.php
index 7d24fa8d71..21fc57107b 100644
--- a/individual.php
+++ b/individual.php
@@ -250,12 +250,12 @@ foreach ($controller->tabs as $tab) {
$greyed_out='';
}
if ($tab->hasTabContent()) {
- if ($tab->getName()==$controller->default_tab || !$tab->canLoadAjax()) {
- // The default tab and non-AJAX tabs load immediately
- echo '<li class="'.$greyed_out.'"><a title="', $tab->getName(), '" href="#', $tab->getName(), '">';
- } else {
+ if ($tab->canLoadAjax()) {
// AJAX tabs load only when selected
echo '<li class="'.$greyed_out.'"><a title="', $tab->getName(), '" href="',$controller->indi->getHtmlUrl(),'&amp;action=ajax&amp;module=', $tab->getName(), '">';
+ } else {
+ // Non-AJAX tabs load immediately
+ echo '<li class="'.$greyed_out.'"><a title="', $tab->getName(), '" href="#', $tab->getName(), '">';
}
echo '<span title="', $tab->getTitle(), '">', $tab->getTitle(), '</span></a></li>';
}
@@ -263,7 +263,7 @@ foreach ($controller->tabs as $tab) {
echo '</ul>';
foreach ($controller->tabs as $tab) {
if ($tab->hasTabContent()) {
- if ($tab->getName()==$controller->default_tab || !$tab->canLoadAjax()) {
+ if (!$tab->canLoadAjax()) {
echo '<div id="', $tab->getName(), '">', $tab->getTabContent(), '</div>';
}
}