diff --git a/index.php b/index.php index 4b871195..cbfe0027 100644 --- a/index.php +++ b/index.php @@ -24,8 +24,17 @@ foreach($calendars as $calendar){ } } -$eventSources[] = array('url' => '?app=calendar&getfile=ajax/events.php?calendar_id=shared_rw', 'backgroundColor' => '#1D2D44', 'borderColor' => '#888', 'textColor' => 'white', 'editable'=>'true'); -$eventSources[] = array('url' => '?app=calendar&getfile=ajax/events.php?calendar_id=shared_r', 'backgroundColor' => '#1D2D44', 'borderColor' => '#888', 'textColor' => 'white', 'editable' => 'false'); +$events_baseURL = OCP\Util::linkTo('calendar', 'ajax/events.php'); +$eventSources[] = array('url' => $events_baseURL.'?calendar_id=shared_rw', + 'backgroundColor' => '#1D2D44', + 'borderColor' => '#888', + 'textColor' => 'white', + 'editable'=>'true'); +$eventSources[] = array('url' => $events_baseURL.'?calendar_id=shared_r', + 'backgroundColor' => '#1D2D44', + 'borderColor' => '#888', + 'textColor' => 'white', + 'editable' => 'false'); OCP\Util::emitHook('OC_Calendar', 'getSources', array('sources' => &$eventSources)); $categories = OC_Calendar_App::getCategoryOptions(); diff --git a/templates/part.choosecalendar.rowfields.php b/templates/part.choosecalendar.rowfields.php index 4492ce73..d29113c9 100644 --- a/templates/part.choosecalendar.rowfields.php +++ b/templates/part.choosecalendar.rowfields.php @@ -11,7 +11,7 @@ - + diff --git a/templates/part.editevent.php b/templates/part.editevent.php index 102366f8..ea91192c 100644 --- a/templates/part.editevent.php +++ b/templates/part.editevent.php @@ -5,9 +5,9 @@ inc("part.eventform"); ?>
- " onclick="Calendar.UI.validateEventForm('?app=calendar&getfile=ajax/event/edit.php');"> - " onclick="Calendar.UI.submitDeleteEventForm('?app=calendar&getfile=ajax/event/delete.php');"> - " onclick="window.location='?app=calendar&getfile=export.php?eventid=';"> + " onclick="Calendar.UI.validateEventForm('');"> + " onclick="Calendar.UI.submitDeleteEventForm('');"> + " onclick="window.location='?eventid=';"> diff --git a/templates/part.newevent.php b/templates/part.newevent.php index f4bb867b..a4f48aec 100644 --- a/templates/part.newevent.php +++ b/templates/part.newevent.php @@ -3,7 +3,7 @@ inc("part.eventform"); ?>
- " onclick="Calendar.UI.validateEventForm('?app=calendar&getfile=ajax/event/new.php');"> + " onclick="Calendar.UI.validateEventForm('');">