use new progressbar for image/buttons with names like xx%

This commit is contained in:
Ralf Becker 2004-02-29 09:55:48 +00:00
parent 77fd33e471
commit 345db0ee59

View File

@ -688,9 +688,16 @@
if ($this->java_script() && ($cell['onchange'] != '' || $img && !$readonly) && !$cell['needed']) // use a link instead of a button
{
$onclick = ($cell['onchange'] == 1 || $img) ? "return submitit(document.eTemplate,'$form_name');" : $cell['onchange'].'; return false;';
if (!$this->html->netscape4 && substr($img,-1) == '%' && is_numeric($percent = substr($img,0,-1)))
{
$html .= $this->html->progressbar($percent,$title,'onclick="'.$onclick.'" '.$options);
}
else
{
$html .= '<a href="" onClick="'.$onclick.'" '.$options.'>' .
($img ? $this->html->image($app,$img,$title,'border="0"') : $title) . '</a>';
}
}
else
{
if (!empty($img))