allow to force tooltip for help messages by prepending a pipe "|" character

This commit is contained in:
Ralf Becker 2012-02-19 13:55:24 +00:00
parent 20fe3e458d
commit fdc4134556

View File

@ -1176,13 +1176,14 @@ class etemplate extends boetemplate
{
if ((int)$cell['no_lang'] < 2 && !$no_lang_on_help)
{
if (($use_tooltip_for_help = $help[0] == '|')) $help = substr($help,1);
$help = lang($help);
}
if (substr($help,0,5) == 'call:')
{
$options .= ' onMouseOver="'.html::htmlspecialchars(substr($help,5)).'"';
}
elseif (($use_tooltip_for_help = strpos($help,'<') !== false && strip_tags($help) != $help)) // helptext is html => use a tooltip
elseif (($use_tooltip_for_help = $use_tooltip_for_help || strpos($help,'<') !== false && strip_tags($help) != $help)) // helptext is html => use a tooltip
{
$options .= html::tooltip($help);
}