mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 13:51:36 +01:00
add src attribute to popup_init
This commit is contained in:
@@ -12,9 +12,15 @@ function smarty_function_popup_init($args, &$smarty_obj)
|
||||
{
|
||||
// be sure to place overlib.js where Smarty can locate it.
|
||||
// overlib.js came with the distribution of Smarty.
|
||||
echo '<DIV ID="overDiv" STYLE="position:absolute; visibility:hidden; z-index:1000;"></DIV>'."\n".'<SCRIPT LANGUAGE=javascript>'."\n".'<!--'."\n";
|
||||
readfile(SMARTY_DIR."overlib.js",1);
|
||||
echo '// -->'."\n".'</SCRIPT>'."\n";
|
||||
extract($args);
|
||||
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'."\n";
|
||||
if (empty($src)) {
|
||||
echo '<script language="JavaScript">'."\n".'<!--'."\n";
|
||||
readfile(SMARTY_DIR."overlib.js",1);
|
||||
echo '// -->'."\n".'</script>'."\n";
|
||||
} else {
|
||||
echo '<script language="JavaScript" src="'.$src.'"></script>'."\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user