diff options
author | Chad Little <clittle@users.sourceforge.net> | 2002-09-23 00:42:08 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2002-09-23 00:42:08 +0000 |
commit | 30a64670c8fe1c6856bc17ea814f620cf46d3928 (patch) | |
tree | 61d20067fe1977114181ef166561c72b8376895b | |
parent | 71c8fbc0a4ac2113677225c0d08564f847a74890 (diff) | |
download | phpicalendar-30a64670c8fe1c6856bc17ea814f620cf46d3928.tar.gz phpicalendar-30a64670c8fe1c6856bc17ea814f620cf46d3928.tar.bz2 phpicalendar-30a64670c8fe1c6856bc17ea814f620cf46d3928.zip |
Basic Javascript for events.
-rw-r--r-- | event.php | 9 | ||||
-rw-r--r-- | functions/event.js | 21 | ||||
-rw-r--r-- | month.php | 33 |
3 files changed, 32 insertions, 31 deletions
@@ -1,3 +1,4 @@ +<? include "init.inc.php"; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> @@ -8,24 +9,24 @@ </head> <body bgcolor="#eeeeee"> <br> - <table border="0" cellspacing="0" cellpadding="0"> + <table border="0" cellspacing="0" cellpadding="0" class="V12"> <tr height="18"> <td nowrap width="7" height="18"></td> <td align="right" valign="top" height="18"><b>Event:</b></td> <td nowrap width="7" height="18"></td> - <td align="left" valign="top" height="18">Recurring Daily</td> + <td align="left" valign="top" height="18"><? echo "$event"; ?></td> </tr> <tr height="18"> <td nowrap width="7" height="18"></td> <td align="right" valign="top" height="18"><b>Start Date:</b></td> <td width="7" height="18"></td> - <td align="left" valign="top" height="18">Tuesday, September 24 10:00AM</td> + <td align="left" valign="top" height="18"><? echo "$start"; ?></td> </tr> <tr height="18"> <td nowrap width="7" height="18"></td> <td align="right" valign="top" height="18"><b>End Date:</b></td> <td width="7" height="18"></td> - <td align="left" valign="top" height="18">Tuesday, September 24 11:30AM</td> + <td align="left" valign="top" height="18"><? echo "$end"; ?></td> </tr> </table> </body> diff --git a/functions/event.js b/functions/event.js new file mode 100644 index 0000000..19f5b97 --- /dev/null +++ b/functions/event.js @@ -0,0 +1,21 @@ +<script language="JavaScript"> +<!-- + function openEventInfo(event, calendarname, start, end) + { + var windowW = 450; + var windowH = 250; + + var url = "event.php?event="+escape(event)+ + "&calendar_name="+escape(calendarname)+ + "&start="+escape(start)+ + "&end="+escape(end); + + options = "scrollbars=no"+",width="+windowW+",height="+windowH; + + info = window.open(url, "Popup", options); + + info.focus(); + } + +//--> +</script>
\ No newline at end of file @@ -28,28 +28,7 @@ <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <title><? echo "$calendar_name"; ?></title> <link rel="stylesheet" type="text/css" href="styles/<? echo "$style_sheet"; ?>"> - <script language="JavaScript"> - <!-- - function openEventInfo(event, start, end) - { - var windowW = 500; - var windowH = 450; - - var url = "event.php?event="+escape(event)+ - "&start="+escape(start)+ - "&end="+escape(end); - - alert(url); - - options = "scrollbars=no"+",width="+windowW+",height="+windowH; - - info = window.open(url, "Popup", options); - - info.focus(); - } - - //--> - </script> + <? include "functions/event.js"; ?> </head> <body bgcolor="#FFFFFF"> <center> @@ -151,7 +130,7 @@ echo "<tr height=\"15\">\n"; echo "<td height=\"15\" valign=\"middle\" align=\"center\" bgcolor=\"#ffffff\">\n"; //echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$daylink\"><i>$event_text</i></a>\n"; - echo "<a class=\"psf\" href=\"javascript:openEventInfo('event', 'start', 'end')\"><i>$event_text</i></a>\n"; + echo "<a class=\"psf\" href=\"javascript:openEventInfo('$event_text', '$calendar_name', '$event_start', '$event_end')\"><i>$event_text</i></a>\n"; echo "</td>\n"; echo "</tr>\n"; } @@ -164,10 +143,10 @@ $event_text = $event_text . "..."; } echo "<tr>\n"; - echo "<td class=\"label\">\n"; + echo "<td>\n"; echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"; echo "<tr>\n"; - echo "<td class=\"label\">\n"; + echo "<td>\n"; echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$daylink\"><font class=\"G10B\">• $event_text</font></a>\n"; echo "</td>\n"; echo "</tr>\n"; @@ -296,7 +275,7 @@ echo "<td width=\"1\" height=\"20\">\n"; echo "</td>\n"; echo "<td valign=\"middle\" bgcolor=\"white\" width=\"540\" height=\"20\">\n"; - echo "<font class=\"G10B\"> <a class=\"psf\" href=\"day.php?getdate=$key\">$event_text</font></a> <font class=\"V9\">(All day event)</font>\n"; + echo "<font class=\"G10B\"> <a class=\"psf\" href=\"javascript:openEventInfo('$event_text', '$calendar_name', '$event_start', '$event_end')\">$event_text</font></a> <font class=\"V9\">(All day event)</font>\n"; echo "</td>\n"; echo "</tr>\n"; } @@ -325,7 +304,7 @@ echo "<td width=\"1\" height=\"20\">\n"; echo "</td>\n"; echo "<td valign=\"middle\" bgcolor=\"white\" width=\"540\" height=\"20\">\n"; - echo "<font class=\"G10B\"> <a class=\"psf\" href=\"day.php?getdate=$key\">$event_text</a></font> <font class=\"V9\">($event_start - $event_end)</font>\n"; + echo "<font class=\"G10B\"> <a class=\"psf\" href=\"javascript:openEventInfo('$event_text', '$calendar_name', '$event_start', '$event_end')\">$event_text</a></font> <font class=\"V9\">($event_start - $event_end)</font>\n"; echo "</td>\n"; echo "</tr>\n"; } |