aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2011-11-08 12:47:41 +0100
committerKevin Jardine <kevinjardine@yahoo.com>2011-11-08 12:47:41 +0100
commit1520b0b67e7ec0129f40e8795eb7ffde4e7c2aac (patch)
treea30530d279220af11b8c47f0d1f8e1654f2dee97 /views
parentdb951f94b6ae60f899f719f17dce4aa6c47edf54 (diff)
downloadelgg-1520b0b67e7ec0129f40e8795eb7ffde4e7c2aac.tar.gz
elgg-1520b0b67e7ec0129f40e8795eb7ffde4e7c2aac.tar.bz2
iCalendar fixes.
Diffstat (limited to 'views')
-rw-r--r--views/default/js/event_calendar/event_calendar.php7
-rw-r--r--views/ical/object/event_calendar.php4
-rw-r--r--views/ical/page/default.php2
3 files changed, 10 insertions, 3 deletions
diff --git a/views/default/js/event_calendar/event_calendar.php b/views/default/js/event_calendar/event_calendar.php
index f3f5b68c8..8c4e735a6 100644
--- a/views/default/js/event_calendar/event_calendar.php
+++ b/views/default/js/event_calendar/event_calendar.php
@@ -5,6 +5,7 @@ elgg.event_calendar.init = function () {
$('.event_calendar_paged_checkbox').click(elgg.event_calendar.handlePagedPersonalCalendarToggle);
$('.event-calendar-personal-calendar-toggle').click(elgg.event_calendar.handleDisplayPagePersonalCalendarToggle);
$('#event-calendar-region').change(elgg.event_calendar.handleRegionChange);
+ $('#event-calendar-ical-link').click(elgg.event_calendar.handleIcalPopup);
}
elgg.event_calendar.handleRegionChange = function(e) {
@@ -12,6 +13,12 @@ elgg.event_calendar.handleRegionChange = function(e) {
elgg.forward(url);
}
+elgg.event_calendar.handleIcalPopup = function(e) {
+ var message = elgg.echo('event_calendar:ical_popup_message')+"\n"+this.href;
+ alert(message);
+ return false;
+}
+
elgg.event_calendar.handlePagedPersonalCalendarToggle = function() {
guid = parseInt($(this).attr('id').substring('event_calendar_paged_checkbox_'.length));
elgg.event_calendar.togglePagedPersonalCalendar(guid);
diff --git a/views/ical/object/event_calendar.php b/views/ical/object/event_calendar.php
index a6ed889e5..36d71a66c 100644
--- a/views/ical/object/event_calendar.php
+++ b/views/ical/object/event_calendar.php
@@ -29,9 +29,9 @@ CREATED:<?php echo date("Ymd\THis\Z", $event->getTimeCreated())?>
LAST-MODIFIED:<?php echo date("Ymd\THis\Z", $event->getTimeUpdated()) ?>
-DTSTART:<?php echo date("Ymd\THis\Z", $event->start_date); ?>
+DTSTART;VALUE=DATE:<?php echo date("Ymd\THis\Z", $event->start_date); ?>
-DTEND:<?php echo date("Ymd\THis\Z", $event->real_end_time); ?>
+DTEND;VALUE=DATE:<?php echo date("Ymd\THis\Z", $event->real_end_time); ?>
SUMMARY:<?php echo $event->title; ?>
diff --git a/views/ical/page/default.php b/views/ical/page/default.php
index c269b5849..b4cd7eefb 100644
--- a/views/ical/page/default.php
+++ b/views/ical/page/default.php
@@ -8,7 +8,7 @@
*/
header("Content-Type: text/calendar");
-//header("Content-Disposition: attachment; filename=\"calendar.ics\"");
+header("Content-Disposition: inline; filename=\"calendar.ics\"");
?>
BEGIN:VCALENDAR
VERSION:2.0