2011-08-11 09:22:07 +00:00
|
|
|
<?php
|
2013-09-15 23:37:30 +00:00
|
|
|
$l = OCP\Util::getL10N('calendar');
|
2013-03-30 04:25:21 +00:00
|
|
|
OC::$CLASSPATH['OC_Calendar_App'] = 'calendar/lib/app.php';
|
|
|
|
OC::$CLASSPATH['OC_Calendar_Calendar'] = 'calendar/lib/calendar.php';
|
|
|
|
OC::$CLASSPATH['OC_Calendar_Object'] = 'calendar/lib/object.php';
|
|
|
|
OC::$CLASSPATH['OC_Calendar_Hooks'] = 'calendar/lib/hooks.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'calendar/lib/sabre/backend.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_CalendarRoot'] = 'calendar/lib/sabre/calendarroot.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_UserCalendars'] = 'calendar/lib/sabre/usercalendars.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_Calendar'] = 'calendar/lib/sabre/calendar.php';
|
|
|
|
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV_CalendarObject'] = 'calendar/lib/sabre/object.php';
|
|
|
|
OC::$CLASSPATH['OC_Calendar_Repeat'] = 'calendar/lib/repeat.php';
|
|
|
|
OC::$CLASSPATH['OC_Search_Provider_Calendar'] = 'calendar/lib/search.php';
|
|
|
|
OC::$CLASSPATH['OC_Calendar_Export'] = 'calendar/lib/export.php';
|
|
|
|
OC::$CLASSPATH['OC_Calendar_Import'] = 'calendar/lib/import.php';
|
2014-01-14 18:55:15 +00:00
|
|
|
|
|
|
|
// sharing -- classpaths
|
2013-03-30 04:25:21 +00:00
|
|
|
OC::$CLASSPATH['OC_Share_Backend_Calendar'] = 'calendar/lib/share/calendar.php';
|
|
|
|
OC::$CLASSPATH['OC_Share_Backend_Event'] = 'calendar/lib/share/event.php';
|
2014-01-14 18:55:15 +00:00
|
|
|
|
2012-06-29 15:26:29 +00:00
|
|
|
//General Hooks
|
2012-07-17 01:04:04 +00:00
|
|
|
OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Calendar_Hooks', 'createUser');
|
2012-05-05 08:18:45 +00:00
|
|
|
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
|
2012-06-29 15:26:29 +00:00
|
|
|
//Repeating Events Hooks
|
2012-06-11 13:18:46 +00:00
|
|
|
OCP\Util::connectHook('OC_Calendar', 'addEvent', 'OC_Calendar_Repeat', 'generate');
|
|
|
|
OCP\Util::connectHook('OC_Calendar', 'editEvent', 'OC_Calendar_Repeat', 'update');
|
|
|
|
OCP\Util::connectHook('OC_Calendar', 'deleteEvent', 'OC_Calendar_Repeat', 'clean');
|
|
|
|
OCP\Util::connectHook('OC_Calendar', 'moveEvent', 'OC_Calendar_Repeat', 'update');
|
2012-06-15 09:34:21 +00:00
|
|
|
OCP\Util::connectHook('OC_Calendar', 'deleteCalendar', 'OC_Calendar_Repeat', 'cleanCalendar');
|
2012-09-06 03:22:50 +00:00
|
|
|
|
2012-05-01 18:03:41 +00:00
|
|
|
OCP\Util::addscript('calendar','loader');
|
|
|
|
OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
|
2012-05-01 07:49:22 +00:00
|
|
|
OCP\Util::addStyle("3rdparty", "chosen/chosen");
|
2012-07-04 19:14:40 +00:00
|
|
|
OCP\Util::addStyle('3rdparty/miniColors', 'jquery.miniColors');
|
|
|
|
OCP\Util::addscript('3rdparty/miniColors', 'jquery.miniColors.min');
|
2012-05-01 22:50:26 +00:00
|
|
|
OCP\App::addNavigationEntry( array(
|
2012-03-03 13:30:52 +00:00
|
|
|
'id' => 'calendar_index',
|
|
|
|
'order' => 10,
|
2012-05-01 21:19:39 +00:00
|
|
|
'href' => OCP\Util::linkTo( 'calendar', 'index.php' ),
|
2012-10-27 15:46:14 +00:00
|
|
|
'icon' => OCP\Util::imagePath( 'calendar', 'calendar.svg' ),
|
2012-03-03 13:30:52 +00:00
|
|
|
'name' => $l->t('Calendar')));
|
2012-05-01 07:49:22 +00:00
|
|
|
OC_Search::registerProvider('OC_Search_Provider_Calendar');
|
2014-01-14 18:55:15 +00:00
|
|
|
|
|
|
|
// sharing -- backend registration
|
2012-08-07 18:57:52 +00:00
|
|
|
OCP\Share::registerBackend('calendar', 'OC_Share_Backend_Calendar');
|
2012-08-07 21:27:06 +00:00
|
|
|
OCP\Share::registerBackend('event', 'OC_Share_Backend_Event');
|
2013-05-30 14:35:18 +00:00
|
|
|
|
2014-01-29 14:47:01 +00:00
|
|
|
if(\OCP\App::isEnabled('contacts')) {
|
|
|
|
\OCP\Share::registerBackend('addressbook', 'OCA\Contacts\Share\Addressbook', 'contact');
|
|
|
|
}
|
|
|
|
|
2013-05-30 14:35:18 +00:00
|
|
|
Sabre\VObject\Property::$classMap['SUMMARY'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['DESCRIPTION'] = 'OC\VObject\StringProperty';
|
|
|
|
Sabre\VObject\Property::$classMap['LOCATION'] = 'OC\VObject\StringProperty';
|