mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
reverted {popup_init} as proposed change to insertion behviour was not BC
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,4 +1,3 @@
|
|||||||
- changed {popup_init} to only emit code once during a request (TGKnIght, boots)
|
|
||||||
- fix handling of block-methods of registered objects (El Hombre Gris,
|
- fix handling of block-methods of registered objects (El Hombre Gris,
|
||||||
messju)
|
messju)
|
||||||
|
|
||||||
|
@@ -21,24 +21,20 @@
|
|||||||
*/
|
*/
|
||||||
function smarty_function_popup_init($params, &$smarty)
|
function smarty_function_popup_init($params, &$smarty)
|
||||||
{
|
{
|
||||||
static $already_init;
|
$zindex = 1000;
|
||||||
|
|
||||||
if (!$already_init) {
|
if (!empty($params['zindex'])) {
|
||||||
$zindex = 1000;
|
$zindex = $params['zindex'];
|
||||||
|
}
|
||||||
if (!empty($params['zindex'])) {
|
|
||||||
$zindex = $params['zindex'];
|
if (!empty($params['src'])) {
|
||||||
}
|
return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
|
||||||
|
. '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
|
||||||
if (!empty($params['src'])) {
|
} else {
|
||||||
return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
|
$smarty->trigger_error("popup_init: missing src parameter");
|
||||||
. '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
|
|
||||||
} else {
|
|
||||||
$smarty->trigger_error("popup_init: missing src parameter");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set expandtab: */
|
/* vim: set expandtab: */
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user