mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 02:14:26 +02:00
add src attribute to popup_init
This commit is contained in:
1
NEWS
1
NEWS
@@ -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)
|
||||
|
@@ -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="")
|
||||
{
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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