Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2011-11-06 15:45:03 +01:00
15 changed files with 909 additions and 789 deletions

View File

@@ -79,19 +79,34 @@ class Form
*/
function editfieldkey($text,$htmlname,$preselected,$paramkey,$paramvalue,$perm,$typeofdata='string')
{
global $conf,$langs;
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) return $langs->trans($text);
else
{
$ret='';
$ret.='<table class="nobordernopadding" width="100%"><tr><td nowrap="nowrap">';
$ret.=$langs->trans($text);
$ret.='</td>';
if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&amp;'.$paramkey.'='.$paramvalue.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
$ret.='</tr></table>';
return $ret;
global $conf,$langs;
$ret='';
if (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE))
{
if ($perm)
{
$tmp=explode(':',$typeofdata);
$ret.= '<div class="editkey_'.$tmp[0].'" id="'.$htmlname.'">';
$ret.= $langs->trans($text);
$ret.= '</div>'."\n";
}
else
{
$ret.= $langs->trans($text);
}
}
else
{
$ret.='<table class="nobordernopadding" width="100%"><tr><td nowrap="nowrap">';
$ret.=$langs->trans($text);
$ret.='</td>';
if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit'.$htmlname.'&amp;'.$paramkey.'='.$paramvalue.'">'.img_edit($langs->trans('Edit'),1).'</a></td>';
$ret.='</tr></table>';
}
return $ret;
}
/**
@@ -222,9 +237,9 @@ class Form
}
}
$out.= '<div class="edit_'.$inputType.'" id="'.$htmlname.'">';
$out.= '<div class="editval_'.$inputType.'" id="val_'.$htmlname.'">';
$out.= $value;
$out.= '</div>';
$out.= '</div>'."\n";
}
else
{