Fix: Bad size of image

This commit is contained in:
Laurent Destailleur 2013-06-14 02:25:44 +02:00
parent 8ed5dfeded
commit a9edbf4f24
2 changed files with 8 additions and 6 deletions

View File

@ -2040,15 +2040,16 @@ function img_up($alt = 'default', $selected = 0)
*
* @param string $alt Text to show on alt image
* @param int $selected Selected
* @param string $options Add more attribute on img tag (For example 'style="float: right"')
* @return string Return img tag
*/
function img_left($alt = 'default', $selected = 0)
function img_left($alt = 'default', $selected = 0, $options='')
{
global $conf, $langs;
if ($alt == 'default') $alt = $langs->trans('Left');
return img_picto($alt, ($selected ? '1leftarrow_selected.png' : '1leftarrow.png'));
return img_picto($alt, ($selected ? '1leftarrow_selected.png' : '1leftarrow.png'), $options);
}
/**
@ -2056,15 +2057,16 @@ function img_left($alt = 'default', $selected = 0)
*
* @param string $alt Text to show on alt image
* @param int $selected Selected
* @param string $options Add more attribute on img tag (For example 'style="float: right"')
* @return string Return img tag
*/
function img_right($alt = 'default', $selected = 0)
function img_right($alt = 'default', $selected = 0, $options='')
{
global $conf, $langs;
if ($alt == 'default') $alt = $langs->trans('Right');
return img_picto($alt, ($selected ? '1rightarrow_selected.png' : '1rightarrow.png'));
return img_picto($alt, ($selected ? '1rightarrow_selected.png' : '1rightarrow.png'), $options);
}
/**

View File

@ -558,7 +558,7 @@ if ($step == 2 && $datatoexport)
{
// Selected fields
print '<td>&nbsp;</td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=unselectfield&field='.$code.'">'.img_left().'</a></td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=unselectfield&field='.$code.'">'.img_left('default', 0, 'style="max-width: 20px"').'</a></td>';
print '<td>';
//print $text.'-'.$htmltext."<br>";
print $form->textwithpicto($text,$htmltext);
@ -573,7 +573,7 @@ if ($step == 2 && $datatoexport)
print $form->textwithpicto($text,$htmltext);
//print ' ('.$code.')';
print '</td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=selectfield&field='.$code.'">'.img_right().'</a></td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=selectfield&field='.$code.'">'.img_right('default', 0, 'style="max-width: 20px"').'</a></td>';
print '<td>&nbsp;</td>';
}