From ef073a148f2dfcefc9f1bd2bd68fcb9c33aba3cf Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 7 May 2012 15:48:41 +0200 Subject: [PATCH] make calendar compatible with public.php --- apps/calendar/appinfo/app.php | 2 +- apps/calendar/js/calendar.js | 5 ++++- apps/calendar/share.php | 1 - apps/calendar/templates/share.dropdown.php | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/calendar/appinfo/app.php b/apps/calendar/appinfo/app.php index 06fb925773..0c91bf8f13 100755 --- a/apps/calendar/appinfo/app.php +++ b/apps/calendar/appinfo/app.php @@ -24,4 +24,4 @@ OCP\App::addNavigationEntry( array( OCP\App::registerPersonal('calendar', 'settings'); OC_Search::registerProvider('OC_Search_Provider_Calendar'); OCP\CONFIG::setAppValue('core', 'remote_caldav', '/apps/calendar/appinfo/remote.php'); -OCP\CONFIG::setAppValue('core', 'public_calendar', '/apps/calendar/appinfo/share.php'); \ No newline at end of file +OCP\CONFIG::setAppValue('core', 'public_calendar', '/apps/calendar/share.php'); \ No newline at end of file diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index a16856938c..b3beb8d44c 100644 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -517,7 +517,10 @@ Calendar={ }, share:function(id, idtype, sharewith, sharetype){ $.getJSON(OC.filePath('calendar', 'ajax/share', 'share.php'),{id:id, idtype:idtype, sharewith:sharewith, sharetype:sharetype}, function(data){ - + if(sharetype == 'public'){ + $('#public_token').val(parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=calendar&t='+data.message); + $('#public_token').css('display', 'block'); + } }); }, unshare:function(id, idtype, sharewith, sharetype){ diff --git a/apps/calendar/share.php b/apps/calendar/share.php index 1cc8a2ef15..68c7d0ffae 100644 --- a/apps/calendar/share.php +++ b/apps/calendar/share.php @@ -1,5 +1,4 @@
>
- +
\ No newline at end of file