diff --git a/css/style.css b/css/style.css index 28a9eb2c..af856576 100644 --- a/css/style.css +++ b/css/style.css @@ -173,6 +173,14 @@ button.category{margin:0 3px;} position:relative; top:0.5em; } +header + .settings.timezonesettings { + float:right; + margin-top:-1.2em; +} +header + .settings.timezonesettings > .chzn-container { + position:relative; + top:0.5em; +} /* input fields take whole width */ #event-title, diff --git a/js/settings.js b/js/settings.js index 45b20578..08b38657 100644 --- a/js/settings.js +++ b/js/settings.js @@ -2,7 +2,12 @@ $(document).ready(function(){ $('#timezone').change( function(){ var post = $( '#timezone' ).serialize(); $.post( OC.filePath('calendar', 'ajax/settings', 'settimezone.php'), post, function(data){ - $('#fullcalendar').fullCalendar('refetchEvents'); + // if we have #fullcalendar, reload it + if ($('#fullcalendar').length > 0) { + $('#fullcalendar').fullCalendar('refetchEvents'); + } else { + location.reload(); + } return; }); return false; @@ -50,7 +55,9 @@ $(document).ready(function(){ calendarcachecheck(); }); }); - calendarcachecheck(); + if ($('#fullcalendar').length > 0) { + calendarcachecheck(); + } }); function calendarcachecheck(){ diff --git a/share.php b/share.php index 140f40cf..ba657772 100644 --- a/share.php +++ b/share.php @@ -161,6 +161,7 @@ if (isset($rootLinkItem)) { } elseif ($linkItem['item_type'] === 'event') { OCP\Util::addStyle('calendar', 'style'); OCP\Util::addStyle('calendar', 'tooltips'); + OCP\Util::addscript('calendar','settings'); OCP\App::setActiveNavigationEntry('calendar_index'); $tmpl = new OCP\Template('calendar', 'event', 'base'); $tmpl->assign('link_shared_event', $linkItem); diff --git a/templates/event.php b/templates/event.php index dce5aeb5..667f9822 100644 --- a/templates/event.php +++ b/templates/event.php @@ -36,7 +36,7 @@ $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent); switch($dtstart->getDateType()) { case Sabre\VObject\Property\DateTime::UTC: case Sabre\VObject\Property\DateTime::LOCALTZ: - $timezone = new DateTimeZone(OC_Calendar_App::$tz); + $timezone = new DateTimeZone($_['timezone']); $newDT = $dtstart->getDateTime(); $newDT->setTimezone($timezone); $dtstart->setDateTime($newDT); @@ -227,6 +227,8 @@ $tmpl = new OCP\Template('calendar', 'part.showevent'); $tmpl->assign('link_shared_event', $_['link_shared_event']); $tmpl->assign('link_shared_event_url', $_['link_shared_event_url']); +$tmpl->assign('timezone', $_['timezone']); +$tmpl->assign('timezones', $_['timezones']); $tmpl->assign('eventid', $id); $tmpl->assign('permissions', $permissions); diff --git a/templates/part.showevent.php b/templates/part.showevent.php index 676c3d92..17fd1441 100644 --- a/templates/part.showevent.php +++ b/templates/part.showevent.php @@ -9,6 +9,27 @@
t('Event')) ?> ""; t('download or use in your calendar application:'))?> t('Download'))?>
+
+ + +