From 7e0df9eb55f70812fc0042d1216843fbbece5f95 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 19 Feb 2012 13:54:57 +0000 Subject: [PATCH] allow to force tooltip for help messages by prepending a pipe "|" character --- etemplate/inc/class.etemplate.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index 0ad8459043..79c426db69 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -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); }