Fix: [ bug #1715 ] Valign and width attributes are used in div tags

This commit is contained in:
Marcos García de La Fuente 2014-12-25 22:50:15 +01:00
parent f60d7ea2de
commit 7b6a4d1bfd
2 changed files with 15 additions and 3 deletions

View File

@ -400,14 +400,26 @@ class Form
else $paramfortooltiptd =($extracss?' class="'.$extracss.'"':''); // Attribut to put on td text tag
$s="";
if (empty($notabs)) $s.='<table class="nobordernopadding" summary=""><tr>';
if ($direction < 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
if ($direction < 0) {
$s.='<'.$tag.$paramfortooltipimg;
if ($tag == 'td') {
$s .= 'valign="top" ';
}
$s.= 'width="14">'.$img.'</'.$tag.'>';
}
// Use another method to help avoid having a space in value in order to use this value with jquery
// TODO add this in css
//if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?'&nbsp;':'').$text.(($direction > 0)?'&nbsp;':'').'</'.$tag.'>';
$paramfortooltiptd.= (($direction < 0)?' style="padding-left: 3px !important;"':'');
$paramfortooltiptd.= (($direction > 0)?' style="padding-right: 3px !important;"':'');
if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.'</'.$tag.'>';
if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.'</'.$tag.'>';
if ($direction > 0) {
$s.='<'.$tag.$paramfortooltipimg;
if ($tag == 'td') {
$s .= 'valign="top" ';
}
$s.= 'width="14">'.$img.'</'.$tag.'>';
}
if (empty($notabs)) $s.='</tr></table>';
return $s;

View File

@ -149,7 +149,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
if (! empty($conf->browser->phone)) print '</div>';
else print '</td>';
if (! empty($conf->browser->phone)) print '<div class="fichehalfright" valign="middle">';
if (! empty($conf->browser->phone)) print '<div class="fichehalfright">';
else print '<td align="center" valign="middle" class="nowrap">';
print '<table><tr><td align="center">';