diff options
author | Georg Ehrke <georg.stefan.germany@googlemail.com> | 2011-10-21 18:19:44 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-10-21 22:08:30 +0200 |
commit | a1eda425ed8db211a8432ed3a375e641246e067c (patch) | |
tree | 87ae027c15ab17ac40c48df99693b143e9b237a6 /apps/calendar/index.php | |
parent | 085001fa2466b50d3ef5f0d7d171deac43ee6afb (diff) | |
download | nextcloud-server-a1eda425ed8db211a8432ed3a375e641246e067c.tar.gz nextcloud-server-a1eda425ed8db211a8432ed3a375e641246e067c.zip |
added transition function from 'old' calendar to fullcalendar (fixed currentview bug)
Diffstat (limited to 'apps/calendar/index.php')
-rw-r--r-- | apps/calendar/index.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/calendar/index.php b/apps/calendar/index.php index 7150fb8490e..2442d27db49 100644 --- a/apps/calendar/index.php +++ b/apps/calendar/index.php @@ -19,6 +19,17 @@ $eventSources = array(); foreach($calendars as $calendar){ $eventSources[] = OC_Calendar_Calendar::getEventSourceInfo($calendar); } +//Fix currentview for fullcalendar +if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "oneweekview"){ + OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "agendaWeek"); +} +if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "onemonthview"){ + OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "month"); +} +if(OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') == "listview"){ + OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", "list"); +} + OC_Util::addScript('3rdparty/fullcalendar', 'fullcalendar'); OC_Util::addStyle('3rdparty/fullcalendar', 'fullcalendar'); OC_Util::addScript('calendar', 'calendar'); |