From b941c90ce2d8f9a1248425087063257aacd615bc Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 20 Nov 2003 05:18:38 +0000 Subject: Added URL support to popup, re-wrote event.php for less code. --- functions/date_functions.php | 8 ++++++-- functions/event.js | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'functions') diff --git a/functions/date_functions.php b/functions/date_functions.php index 8745c1a..374752f 100644 --- a/functions/date_functions.php +++ b/functions/date_functions.php @@ -160,7 +160,7 @@ function chooseOffset($time) { return $offset; } -function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text, $post_text, $link_class) { +function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text, $post_text, $link_class, $url) { $event_text = stripslashes(urldecode($arr["event_text"])); # for iCal pseudo tag comptability if (ereg("<([[:alpha:]]+://)([^<>[:space:]]+)>",$event_text,$matches)) { @@ -190,6 +190,10 @@ function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text, if (isset($arr["description"])) { $description = addslashes(stripslashes(urldecode($arr["description"]))); } + + if (isset($arr["url"])) { + $url = addslashes(stripslashes(urldecode($arr["url"]))); + } if (!empty($event_text)) { if ($lines > 0) { @@ -206,7 +210,7 @@ function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text, echo << diff --git a/functions/event.js b/functions/event.js index d04938c..adee336 100644 --- a/functions/event.js +++ b/functions/event.js @@ -13,6 +13,7 @@ function openEventWindow(num) { form.elements.location.value = data.location; form.elements.organizer.value = data.organizer; form.elements.attendee.value = data.attendee; + form.elements.url.value = data.url; // open a new window var w = window.open('', 'Popup', 'scrollbars=yes,width=460,height=275'); @@ -20,7 +21,7 @@ function openEventWindow(num) { form.submit(); } -function EventData(event, cal, start, end, description, status, location, organizer, attendee) { +function EventData(event, cal, start, end, description, status, location, organizer, attendee, url) { this.event = event; this.cal = cal; this.start = start; @@ -30,6 +31,7 @@ function EventData(event, cal, start, end, description, status, location, organi this.location = location; this.organizer = organizer; this.attendee = attendee; + this.url = url; } document.popup_data = new Array(); -- cgit v1.2.3