diff options
| author | Nigel Osborne <kiwi3685@me.com> | 2011-06-17 03:46:29 +0000 |
|---|---|---|
| committer | Nigel Osborne <kiwi3685@me.com> | 2011-06-17 03:46:29 +0000 |
| commit | f927b581037df601e0a07adfef79d0945208e7ce (patch) | |
| tree | 6a1d70ac4dcd38a1eab44daab493f8b8ff7bd64b /individual.php | |
| parent | b52ef6b8efc29af2cc1cc4de04900d7dce806041 (diff) | |
| download | webtrees-f927b581037df601e0a07adfef79d0945208e7ce.tar.gz webtrees-f927b581037df601e0a07adfef79d0945208e7ce.tar.bz2 webtrees-f927b581037df601e0a07adfef79d0945208e7ce.zip | |
Fix for http://webtrees.net/en/forums/3-help-for-beta-and-svn-versions/12905-clipped-thumb-on-indi-page-requires-large-window#12932
Diffstat (limited to 'individual.php')
| -rw-r--r-- | individual.php | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/individual.php b/individual.php index b867691c2d..585da71a40 100644 --- a/individual.php +++ b/individual.php @@ -140,6 +140,19 @@ jQuery(document).ready(function() { objSeparator.css('height', objBar.outerHeight() + 'px'); } + // calculate header accordion width from its outer container and thubnail image sizes + var indi_header_div = document.getElementById('indi_header').offsetWidth - 20; + var indi_mainimage_div = document.getElementById('indi_mainimage').offsetWidth +20; + var header_accordion_div = document.getElementById('header_accordion1'); + header_accordion_div.style.width = indi_header_div - indi_mainimage_div +'px'; + + jQuery(window).bind("resize", function(){ + var indi_header_div = document.getElementById('indi_header').offsetWidth - 20; + var indi_mainimage_div = document.getElementById('indi_mainimage').offsetWidth +20; + var header_accordion_div = document.getElementById('header_accordion1'); + header_accordion_div.style.width = indi_header_div - indi_mainimage_div +'px'; + }); + }); <?php echo WT_JS_END; @@ -150,7 +163,12 @@ echo '<div id="indi_left">', '<div id="indi_header">'; if ($controller->indi->canDisplayDetails()) { -$globalfacts=$controller->getGlobalFacts(); + echo '<div id="indi_mainimage">'; // Display highlight image + if ($MULTI_MEDIA && $controller->canShowHighlightedObject()) { + echo $controller->getHighlightedObject(); + } + echo '</div>'; // close #indi_mainimage + $globalfacts=$controller->getGlobalFacts(); echo '<div id="header_accordion1">', // contain accordions for names '<h3 class="name_one ', $controller->getPersonStyle($controller->indi), '"><span>', $controller->indi->getFullName(), '</span>'; // First name accordion element if (WT_USER_IS_ADMIN) { @@ -212,11 +230,6 @@ $globalfacts=$controller->getGlobalFacts(); ' collapsible: true', '});', WT_JS_END; //accordion details - echo '<div id="indi_mainimage">'; // Display highlight image - if ($MULTI_MEDIA && $controller->canShowHighlightedObject()) { - echo $controller->getHighlightedObject(); - } - echo '</div>'; // close #indi_mainimage } echo '</div>';// close #indi_header // ===================================== main content tabs |
