add zindex to popup init, fix error message for eval.

This commit is contained in:
mohrt
2002-06-29 16:04:41 +00:00
parent 64605530fb
commit eacfdadf4b
5 changed files with 19 additions and 6 deletions

1
TODO
View File

@@ -9,3 +9,4 @@
* caching all but parts of the template * caching all but parts of the template
* change plugins so $smarty variable always comes first * change plugins so $smarty variable always comes first
* being able to load config files from PHP scripts * being able to load config files from PHP scripts
* get cache ttl with function call

View File

@@ -12,8 +12,8 @@ function smarty_function_eval($params, &$this)
{ {
extract($params); extract($params);
if (empty($var)) { if (!isset($var)) {
$this->trigger_error("assign: missing 'var' parameter"); $this->trigger_error("eval: missing 'var' parameter");
return; return;
} }

View File

@@ -10,8 +10,14 @@
*/ */
function smarty_function_popup_init($params, &$smarty) function smarty_function_popup_init($params, &$smarty)
{ {
$zindex = 1000;
if (!empty($params['zindex'])) {
$zindex = $params['zindex'];
}
if (!empty($params['src'])) { if (!empty($params['src'])) {
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'."\n"; echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>'."\n";
echo '<script language="JavaScript" src="'.$params['src'].'"></script>'."\n"; echo '<script language="JavaScript" src="'.$params['src'].'"></script>'."\n";
} else { } else {
$smarty->trigger_error("popup_init: missing src parameter"); $smarty->trigger_error("popup_init: missing src parameter");

View File

@@ -12,8 +12,8 @@ function smarty_function_eval($params, &$this)
{ {
extract($params); extract($params);
if (empty($var)) { if (!isset($var)) {
$this->trigger_error("assign: missing 'var' parameter"); $this->trigger_error("eval: missing 'var' parameter");
return; return;
} }

View File

@@ -10,8 +10,14 @@
*/ */
function smarty_function_popup_init($params, &$smarty) function smarty_function_popup_init($params, &$smarty)
{ {
$zindex = 1000;
if (!empty($params['zindex'])) {
$zindex = $params['zindex'];
}
if (!empty($params['src'])) { if (!empty($params['src'])) {
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'."\n"; echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>'."\n";
echo '<script language="JavaScript" src="'.$params['src'].'"></script>'."\n"; echo '<script language="JavaScript" src="'.$params['src'].'"></script>'."\n";
} else { } else {
$smarty->trigger_error("popup_init: missing src parameter"); $smarty->trigger_error("popup_init: missing src parameter");