make calendar compatible with public.php
This commit is contained in:
parent
936c8ba1cc
commit
ef073a148f
4 changed files with 6 additions and 4 deletions
|
@ -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');
|
||||
OCP\CONFIG::setAppValue('core', 'public_calendar', '/apps/calendar/share.php');
|
|
@ -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){
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
require_once('../../lib/base.php');
|
||||
$token = strip_tags($_GET['t']);
|
||||
$shared = OC_Calendar_Share::getElementByToken($token);
|
||||
$nl = "\n\r";
|
||||
|
|
|
@ -73,5 +73,5 @@ echo OCP\html_select_options($allgroups, array());
|
|||
</ul>
|
||||
<div id="public">
|
||||
<input type="checkbox" id="publish" <?php echo ($public['share'])?'checked="checked"':'' ?>><label for="publish"><?php echo $l->t('make public'); ?></label><br>
|
||||
<input type="text" id="public_token" value="<?php echo OCP\Util::linkToAbsolute('apps/calendar', 'share.php?t=' . $public['share'], null, true) ; ?>" onmouseover="$('#public_token').select();" style="<?php echo (!$public['share'])?'display:none':'' ?>">
|
||||
<input type="text" id="public_token" value="<?php echo OCP\Util::linkToAbsolute('', 'public.php?service=calendar&t=' . $public['share'], null, true) ; ?>" onmouseover="$('#public_token').select();" style="<?php echo (!$public['share'])?'display:none':'' ?>">
|
||||
</div>
|
Loading…
Reference in a new issue