add src attribute to popup_init

This commit is contained in:
mohrt
2002-02-18 15:22:28 +00:00
parent 60617aa799
commit 7790cc88a7
4 changed files with 20 additions and 7 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- update popup_init to accept src attribute (Monte, Duncan Forrest)
- implemented several optimizations, speeding up Smarty significantly in
most cases. (Andrei)
- implemented plugin architecture. (Andrei)

View File

@@ -6269,7 +6269,7 @@ OUTPUT:
// this assumes your form elements are named
// startDate_Day, startDate_Month, startDate_Year
$startDate = makeTimeStamp($startDate_Year,$startDate_Month,$startDate_day);
$startDate = makeTimeStamp($startDate_Year,$startDate_Month,$startDate_Day);
function makeTimeStamp($year="",$month="",$day="")
{

View File

@@ -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";
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";
echo '// -->'."\n".'</script>'."\n";
} else {
echo '<script language="JavaScript" src="'.$src.'"></script>'."\n";
}
return;
}

View File

@@ -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";
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";
echo '// -->'."\n".'</script>'."\n";
} else {
echo '<script language="JavaScript" src="'.$src.'"></script>'."\n";
}
return;
}