diff options
| -rw-r--r-- | familybook.php | 4 | ||||
| -rw-r--r-- | library/WT/Controller/Familybook.php | 43 | ||||
| -rw-r--r-- | library/WT/Controller/Hourglass.php | 26 | ||||
| -rw-r--r-- | themes/clouds/css-1.5.1/style.css | 9 | ||||
| -rw-r--r-- | themes/colors/css-1.5.1/css/colors.css | 6 | ||||
| -rw-r--r-- | themes/fab/css-1.5.1/style.css | 16 | ||||
| -rw-r--r-- | themes/minimal/css-1.5.1/style.css | 6 | ||||
| -rw-r--r-- | themes/webtrees/css-1.5.1/style.css | 6 | ||||
| -rw-r--r-- | themes/xenea/css-1.5.1/style.css | 6 |
9 files changed, 51 insertions, 71 deletions
diff --git a/familybook.php b/familybook.php index 09bcb5be22..545d08ba2c 100644 --- a/familybook.php +++ b/familybook.php @@ -27,9 +27,7 @@ require './includes/session.php'; $controller=new WT_Controller_Familybook(); $controller ->pageHeader() - ->addExternalJavascript(WT_STATIC_URL.'js/autocomplete.js') - ->setupJavascript() - ->addInlineJavascript('sizeLines();'); + ->addExternalJavascript(WT_STATIC_URL.'js/autocomplete.js'); ?> <div id="familybook-page"> diff --git a/library/WT/Controller/Familybook.php b/library/WT/Controller/Familybook.php index 3550070672..db9041750c 100644 --- a/library/WT/Controller/Familybook.php +++ b/library/WT/Controller/Familybook.php @@ -88,7 +88,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { $box_width=$this->box_width; echo '<table>'; echo '<tr>'; - echo '<td width="', ($bwidth-2), '">'; + echo '<td width="', ($bwidth), '">'; $gencount = 0; $numkids = 0; $familycount = 0; @@ -163,19 +163,19 @@ class WT_Controller_Familybook extends WT_Controller_Chart { if ($ct>1) { if ($i==0) { //-- adjust for the first column on left - $h= round(((($bheight)*$kids)/2)-1); + //$h= round(((($bheight)*$kids)/2)-1); + $h= round(((($bheight)*$kids)+8)/2); // Assumes border = 1 and padding = 3 //-- adjust for other vertical columns if ($kids>1) $h = ((($kids-1)*4)+$h); echo '<td class="tdbot">', - '<img class="tvertline" id="vline_',$chil,'" src="',$WT_IMAGES["vline"],'" height="',$h,'" alt=""></td>'; + '<img class="tvertline" id="vline_',$chil,'" src="',$WT_IMAGES["vline"],'" height="',$h-1,'" alt=""></td>'; } else if ($i==$ct-1) { //-- adjust for the first column on left - $h= round(((($bheight)*$kids)/2)+10); + $h= round(((($bheight)*$kids)+8)/2); //-- adjust for other vertical columns if ($kids>1) $h = ((($kids-1)*4)+$h); - echo '<td class="tdtop">', - '<img class="bvertline" id="vline_',$chil,'" src="',$WT_IMAGES["vline"],'" height="',$h,'" alt=""></td>'; + '<img class="bvertline" id="vline_',$chil,'" src="',$WT_IMAGES["vline"],'" height="',$h+1,'" alt=""></td>'; } else { echo '<td style="background: url(',$WT_IMAGES["vline"],');">', '<img class="spacer" src="',$WT_IMAGES["spacer"],'" alt=""></td>'; @@ -196,11 +196,11 @@ class WT_Controller_Familybook extends WT_Controller_Chart { if ($person) { print_pedigree_person($person); echo '</td><td>', - '<img class="line2" src="',$WT_IMAGES["hline"],'" width="7" height="3" alt="">'; - } else { // blank table spaces - echo '<div style="width:',$bwidth+16,'px; height:',$bheight+8,'px;"></div>', - '</td><td width="7">'; - } + '<img class="line2" src="',$WT_IMAGES["hline"],'" width="8" height="3" alt="">'; + } else if ($kids==1 ) + echo '<div style="width:',$bwidth+19,'px; height:',$bheight+8,'px;"></div>', + '</td><td>'; + //----- Print the spouse if ($count==1 ) { if ($this->show_spouse) { @@ -263,7 +263,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { echo '<table>', '<tr>', '<td class="tdbot">', - '<img class="line3 pvline" src="',$WT_IMAGES["vline"],'" height="',$lh,'" alt=""></td>', + '<img class="line3 pvline" src="',$WT_IMAGES["vline"],'" height="',$lh-1,'" alt=""></td>', '<td>', '<img class="line4" src="',$WT_IMAGES["hline"],'" height="3" alt=""></td>', '<td>'; @@ -286,7 +286,7 @@ class WT_Controller_Familybook extends WT_Controller_Chart { } } echo '</tr><tr>', - '<td class="tdtop"><img class="pvline" src="',$WT_IMAGES["vline"],'" height="',$lh,'" alt=""></td>', + '<td class="tdtop"><img class="pvline" src="',$WT_IMAGES["vline"],'" height="',$lh+1,'" alt=""></td>', '<td><img class="line4" src="',$WT_IMAGES["hline"],'" height="3" alt=""></td>', '<td>'; //-- print the mother box @@ -368,21 +368,4 @@ class WT_Controller_Familybook extends WT_Controller_Chart { } } } - /** - * Javascript for pedigree side of Familybook - */ - function setupJavascript() { - global $bhalfheight; -?> -<script> - function sizeLines() { - vlines = document.getElementsByClassName("pvline"); - for (i=0; i < vlines.length; i++) { - vlines[i].style.height=(vlines[i].parentNode.offsetHeight/2-1)+'px'; - } - } -</script> -<?php - return $this; - } } diff --git a/library/WT/Controller/Hourglass.php b/library/WT/Controller/Hourglass.php index 149ef02508..4d0cf5f149 100644 --- a/library/WT/Controller/Hourglass.php +++ b/library/WT/Controller/Hourglass.php @@ -73,10 +73,10 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { } // -- size of the detailed boxes based upon optional width parameter - $Dbwidth=($this->box_width*$bwidth)/100; - $Dbheight=($this->box_width*$bheight)/100; - $bwidth=$Dbwidth; - $bheight=$Dbheight; + $Dbwidth =$this->box_width * $bwidth / 100; + $Dbheight=$this->box_width * $bheight / 100; + $bwidth =$Dbwidth; + $bheight =$Dbheight; // -- adjust size of the compact box if (!$this->show_full) { @@ -117,7 +117,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { //if (!$person) return; $genoffset = $this->generations; // handle pedigree n generations lines //-- calculate how tall the lines should be - $lh = ($bhalfheight+3) * pow(2, ($genoffset-$count-1)); + $lh = ($bhalfheight+4) * pow(2, ($genoffset-$count-1)); // //Prints empty table columns for children w/o parents up to the max generation //This allows vertical line spacing to be consistent @@ -169,7 +169,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { } echo "</tr><tr>"; echo "<td valign=\"top\"><img name=\"pvline\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"$lh\" alt=\"\"></td>"; - echo "<td><img src=\"".$WT_IMAGES["hline"]."\" width=\"7\" height=\"3\" alt=\"\"></td>"; + echo "<td><img class=\"line4\" src=\"".$WT_IMAGES["hline"]."\" width=\"7\" height=\"3\" alt=\"\"></td>"; echo "<td>"; //-- print the mother box print_pedigree_person($family->getWife()); @@ -207,19 +207,18 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { if ($count>$this->dgenerations) return 0; if (!$person) return; $pid=$person->getXref(); - $tablealign = "right"; $otablealign = "left"; if ($TEXT_DIRECTION=="rtl") { $tablealign = "left"; $otablealign = "right"; } + //-- put a space between families on the last generation if ($count==$this->dgenerations-1) { if (isset($lastGenSecondFam)) echo "<br>"; $lastGenSecondFam = true; } - echo "<table id=\"table_$pid\" align=\"".$tablealign."\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"; echo "<tr>"; echo "<td align=\"$tablealign\" width=\"100%\">"; @@ -254,18 +253,19 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { //-- print the lines $twidth = 7; if ($ct==1) $twidth+=3; + if ($ct>1) { if ($i==0) { //-- adjust for the number of kids $h = ($bhalfheight+3)*$numkids; - echo "<td valign=\"bottom\"><img class=\"line1\" name=\"tvertline\" id=\"vline_$chil\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"$h\" alt=\"\"></td>"; + echo "<td valign=\"bottom\"><img class=\"line1\" name=\"tvertline\" id=\"vline_$chil\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" alt=\"\"></td>"; } else if ($i==$ct-1) { $h = ($bhalfheight+3)*$kids; if ($count<$this->dgenerations-1) { if ($this->show_spouse) $h-=15; else $h += 15; } - echo "<td valign=\"top\"><img name=\"bvertline\" id=\"vline_$chil\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" height=\"".$h."\" alt=\"\"></td>"; + echo "<td valign=\"top\"><img name=\"bvertline\" id=\"vline_$chil\" src=\"".$WT_IMAGES["vline"]."\" width=\"3\" alt=\"\"></td>"; } else { echo "<td style=\"background: url('".$WT_IMAGES["vline"]."');\"><img src=\"".$WT_IMAGES["spacer"]."\" width=\"3\" alt=\"\"></td>"; } @@ -512,7 +512,7 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { var pid = vlines[i].id.substr(vlines[i].id.indexOf("_")+1); var hline = document.getElementById("table_"+pid); var hline2 = document.getElementById("table2_"+pid); - var newHeight = Math.abs(hline.offsetHeight - (hline2.offsetTop + <?php echo $bhalfheight+9; ?>)); + var newHeight = Math.abs(hline.offsetHeight - (hline2.offsetTop + <?php echo $bhalfheight+5; ?>)); vlines[i].style.height=newHeight+'px'; } @@ -521,14 +521,14 @@ class WT_Controller_Hourglass extends WT_Controller_Chart { var pid = vlines[i].id.substr(vlines[i].id.indexOf("_")+1); var hline = document.getElementById("table_"+pid); var hline2 = document.getElementById("table2_"+pid); - vlines[i].style.height=(hline.offsetTop+hline2.offsetTop + <?php echo $bhalfheight+9; ?>)+'px'; + vlines[i].style.height=(hline.offsetTop+hline2.offsetTop + <?php echo $bhalfheight+5; ?>)+'px'; } vlines = document.getElementsByName("pvline"); //alert(vlines[0].parentNode.parentNode.parentNode); for (i=0; i < vlines.length; i++) { //vlines[i].parentNode.style.height="50%"; - vlines[i].style.height=(vlines[i].parentNode.offsetHeight/2-1)+'px'; + vlines[i].style.height=(vlines[i].parentNode.offsetHeight/2)+'px'; } } </script> diff --git a/themes/clouds/css-1.5.1/style.css b/themes/clouds/css-1.5.1/style.css index 479c60e5fe..f36440ec7b 100644 --- a/themes/clouds/css-1.5.1/style.css +++ b/themes/clouds/css-1.5.1/style.css @@ -597,10 +597,10 @@ height:25px; } .line1,.line2,.line3 { -vertical-align:bottom; +vertical-align:middle; } -.line4 { +#hourglass_chart img.line4 { vertical-align:middle; } @@ -714,7 +714,8 @@ html[dir=rtl] #descendancy_chart ul {background-position:right top;margin:0 15px #familybook_chart td {margin:0; padding:0;} #familybook_chart h2 {text-align:center;} #familybook_chart .line3, #familybook_chart .pvline, #familybook_chart .spacer {width: 3px} -#familybook_chart .line4 {width: 7px} +#familybook_chart img.line4 {width: 7px; vertical-align:middle;} + [ID^="vline"] {width:3px;} #familybook_chart h3 {font-size: 16px;text-align:center;} #relationship-page h3 {margin:20px 0 0 20px;} @@ -2846,7 +2847,7 @@ html[dir=rtl] #edituser-table .value {margin:0 260px 0 0;} #header_accordion1 {width: 510px!important} html[dir=rtl] #pedigree_chart {left:auto;right:-80px;} #topMenu,#header select,#header input,#footer select,#backprint,#sidebar,form,button,input,#CB_All, #separator {display:none;} - #familybook_chart h3 {margin-bottom: 10px;} + #familybook_chart h3 {margin-bottom: 10px; vertical-align:middle;} /* buttons and input are used out of forms in sortable tables*/ .lifespan_outer {border:none;height:auto;overflow:visible;position:relative;width:auto;} .lifespan_people {left:-10px;position:absolute;top:-60px;width:auto;z-index:1;} diff --git a/themes/colors/css-1.5.1/css/colors.css b/themes/colors/css-1.5.1/css/colors.css index c06a592993..76258a7baf 100644 --- a/themes/colors/css-1.5.1/css/colors.css +++ b/themes/colors/css-1.5.1/css/colors.css @@ -319,7 +319,7 @@ html[dir=rtl] #descendancy_chart ul {background-position:right top;margin:0 15px #familybook_chart td {margin:0; padding:0;} #familybook_chart h2 {text-align:center;} #familybook_chart .line3, #familybook_chart .pvline, #familybook_chart .spacer {width: 3px} -#familybook_chart .line4 {width: 7px} +#familybook_chart .line4 {width: 7px; vertical-align:middle;} [ID^="vline"] {width:3px;} #familybook_chart h3 {font-size: 16px;text-align:center;} #relationship-page h3 {margin:20px 0 0 20px;} @@ -530,8 +530,8 @@ a.showit:hover > span {background:#444444;border-bottom:2px solid #000000;border .execution_stats {padding:12px;text-align:center;} .gchart {border:1px solid #999999;} .iwstyle {width:360px;} -.line1,.line2,.line3 {vertical-align:bottom;} -.line4 {vertical-align:middle;} +.line1,.line2,.line3{vertical-align:middle;} +#hourglass_chart img.line4 {vertical-align:middle;} .line5 {vertical-align:top;} .logo {text-align:center;} .messagebox {background:#dfeeff;border-radius:3px;} diff --git a/themes/fab/css-1.5.1/style.css b/themes/fab/css-1.5.1/style.css index 1a069b38fa..2e6137d41a 100644 --- a/themes/fab/css-1.5.1/style.css +++ b/themes/fab/css-1.5.1/style.css @@ -81,17 +81,15 @@ img.block { vertical-align: middle; } -.line2 { - vertical-align: baseline; -} - -.line1, +.line1, +.line2, .line3 { - vertical-align: bottom; -} -.line4 { vertical-align: middle; } +#hourglass_chart img.line4 { + vertical-align:middle; +} + .line5 { vertical-align: top; } @@ -492,7 +490,7 @@ html[dir=rtl] #index_small_blocks { width: 3px } #familybook_chart .line4 { - width: 7px + width: 7px; vertical-align:middle; } [ID^="vline"] { width: 3px; diff --git a/themes/minimal/css-1.5.1/style.css b/themes/minimal/css-1.5.1/style.css index d7a367f401..9ac4f7b142 100644 --- a/themes/minimal/css-1.5.1/style.css +++ b/themes/minimal/css-1.5.1/style.css @@ -527,8 +527,8 @@ img.block { vertical-align:middle; } -.line1, .line2, .line3 {vertical-align:bottom;} -.line4 {vertical-align:middle;} +.line1, .line2, .line3 {vertical-align:middle;} +#hourglass_chart img.line4 {vertical-align:middle;} .line5 {vertical-align:top;} #index_main_blocks { @@ -573,7 +573,7 @@ width:100%; #familybook_chart td {margin:0; padding:0;} #familybook_chart h2 {text-align:center;} #familybook_chart .line3, #familybook_chart .pvline, #familybook_chart .spacer {width: 3px} -#familybook_chart .line4 {width: 7px} +#familybook_chart .line4 {width: 7px; vertical-align:middle;} [ID^="vline"] {width:3px;} #familybook_chart h3 {font-size: 16px;text-align:center;} #relationship-page h3 {margin:20px 0 0 20px;} diff --git a/themes/webtrees/css-1.5.1/style.css b/themes/webtrees/css-1.5.1/style.css index 4ff85cf0df..12d3b6c8d8 100644 --- a/themes/webtrees/css-1.5.1/style.css +++ b/themes/webtrees/css-1.5.1/style.css @@ -50,8 +50,8 @@ input:required:valid, textarea:required:valid {background-image:url(data:image/p input:required:invalid, textarea:required:invalid {background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMpJREFUeNpi/P//PwMlgImBQjAMDGBBF1jFyOgBpFqAuOYPA8MOoAI4P+z//x0YJoBiARkvYWA486+k5D+IBuJqZD66WnAMogvMA9o4F6j4R3Lyf2R6IQODMVEGTAW6CoirgfjMB2/v/yB6CgNDYQ8W14IwRiB+A7rgOwNDYLChofGcrVvPgugfDAzR/yFhwUAwDJqBNj6Ulf0PooEhV4jMx+YCRvSknAeMBWDotwgwMKRzMTCcfQW0GcQHxkbNJCyxwDiaFxgAAgwAYy67YIOQ//cAAAAASUVORK5CYII=);background-position:right top; background-repeat:no-repeat;} html[dir=rtl] input:required:valid, html[dir=rtl] textarea:required:valid, html[dir=rtl] input:required:invalid, html[dir=rtl] textarea:required:invalid {background-position:left top;} -.line1, .line2, .line3 {vertical-align:bottom;} -.line4 {vertical-align:middle;} +.line1, .line2, .line3 {vertical-align:middle;} +#hourglass_chart img.line4 {vertical-align:middle;} .line5 {vertical-align:top;} #mycart a img {height:15px;} @@ -155,7 +155,7 @@ a:hover .nameZoom {color:#ff0000;font-weight:bold;font-size:14px;} #familybook_chart td {margin:0; padding:0;} #familybook_chart h2 {text-align:center;} #familybook_chart .line3, #familybook_chart .pvline, #familybook_chart .spacer {width: 3px;} -#familybook_chart .line4 {width: 7px;} +#familybook_chart .line4 {width: 7px; vertical-align:middle;} [ID^="vline"] {width:3px;} #familybook_chart h3 {color:#000066;font-size: 16px;text-align:center;} #relationship-page h3 {margin:20px 0 0 20px;} diff --git a/themes/xenea/css-1.5.1/style.css b/themes/xenea/css-1.5.1/style.css index e2c5dd7f88..2287c5052d 100644 --- a/themes/xenea/css-1.5.1/style.css +++ b/themes/xenea/css-1.5.1/style.css @@ -789,8 +789,8 @@ img.block { vertical-align:middle; } -.line1, .line2, .line3 {vertical-align:bottom;} -.line4 {vertical-align:middle;} +.line1, .line2, .line3 {vertical-align:middle;} +#hourglass_chart img.line4 {vertical-align:middle;} .line5 {vertical-align:top;} @@ -834,7 +834,7 @@ width:100%; #familybook_chart td {margin:0; padding:0;} #familybook_chart h2 {text-align:center;} #familybook_chart .line3, #familybook_chart .pvline, #familybook_chart .spacer {width: 3px} -#familybook_chart .line4 {width: 7px} +#familybook_chart .line4 {width: 7px; vertical-align:middle;} [ID^="vline"] {width:3px;} #familybook_chart h3 {font-size: 16px;text-align:center;} #relationship-page h3 {margin:20px 0 0 20px;} |
