Add option to display direct CalDAV urls for calendars in the UI
This commit is contained in:
parent
38f5215467
commit
1800bd6556
11 changed files with 49 additions and 2 deletions
|
@ -2009,6 +2009,14 @@ function rcube_calendar_ui(settings)
|
||||||
$dialog.dialog('close');
|
$dialog.dialog('close');
|
||||||
|
|
||||||
if (calendar.feedurl) {
|
if (calendar.feedurl) {
|
||||||
|
if (calendar.caldavurl) {
|
||||||
|
$('#caldavurl').val(calendar.caldavurl);
|
||||||
|
$('#calendarcaldavurl').show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$('#calendarcaldavurl').hide();
|
||||||
|
}
|
||||||
|
|
||||||
$dialog.dialog({
|
$dialog.dialog({
|
||||||
resizable: true,
|
resizable: true,
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
|
|
|
@ -119,5 +119,12 @@ $rcmail_config['calendar_itip_smtp_user'] = 'smtpauth';
|
||||||
// SMTP password used to send (anonymous) itip messages
|
// SMTP password used to send (anonymous) itip messages
|
||||||
$rcmail_config['calendar_itip_smtp_pass'] = '123456';
|
$rcmail_config['calendar_itip_smtp_pass'] = '123456';
|
||||||
|
|
||||||
|
// Base URL to build fully qualified URIs to access calendars via CALDAV
|
||||||
|
// The following replacement variables are supported:
|
||||||
|
// %h - Current HTTP host
|
||||||
|
// %u - Current webmail user name
|
||||||
|
// %n - Calendar name
|
||||||
|
// %i - Calendar UUID
|
||||||
|
// $rcmail_config['calendar_caldav_url'] = 'http://%h/iRony/calendars/%u/%i';
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -155,6 +155,24 @@ class kolab_calendar
|
||||||
return 'cc0000';
|
return 'cc0000';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compose an URL for CalDAV access to this calendar (if configured)
|
||||||
|
*/
|
||||||
|
public function get_caldav_url()
|
||||||
|
{
|
||||||
|
$url = null;
|
||||||
|
if ($template = $this->cal->rc->config->get('calendar_caldav_url', null)) {
|
||||||
|
return strtr($template, array(
|
||||||
|
'%h' => $_SERVER['HTTP_HOST'],
|
||||||
|
'%u' => urlencode($this->cal->rc->get_user_name()),
|
||||||
|
'%i' => urlencode($this->storage->get_uid()),
|
||||||
|
'%n' => urlencode($this->imap_folder),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the corresponding kolab_storage_folder instance
|
* Return the corresponding kolab_storage_folder instance
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -123,6 +123,7 @@ class kolab_driver extends calendar_driver
|
||||||
'active' => $cal->storage->is_active(),
|
'active' => $cal->storage->is_active(),
|
||||||
'owner' => $cal->get_owner(),
|
'owner' => $cal->get_owner(),
|
||||||
'children' => true, // TODO: determine if that folder indeed has child folders
|
'children' => true, // TODO: determine if that folder indeed has child folders
|
||||||
|
'caldavurl' => $cal->get_caldav_url(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ $labels['onemonthback'] = '1 Monat zurück';
|
||||||
$labels['nmonthsback'] = '$nr Monate zurück';
|
$labels['nmonthsback'] = '$nr Monate zurück';
|
||||||
$labels['showurl'] = 'URL anzeigen';
|
$labels['showurl'] = 'URL anzeigen';
|
||||||
$labels['showurldescription'] = 'Über die folgende Adresse können Sie mit einem beliebigen Kalenderprogramm Ihren Kalender abrufen (nur lesend), sofern dieses das iCal-Format unterstützt.';
|
$labels['showurldescription'] = 'Über die folgende Adresse können Sie mit einem beliebigen Kalenderprogramm Ihren Kalender abrufen (nur lesend), sofern dieses das iCal-Format unterstützt.';
|
||||||
|
$labels['caldavurldescription'] = 'Benutzen Sie folgende Addresse in einer <a href="http://de.wikipedia.org/wiki/CalDAV" target="_blank">CalDAV</a>-Anwendung (wie z.B. Evolution oder Mozilla Thunderbird) um diesen spezifischen Kalender mit dem Computer oder Mobiltelefon zu synchronisieren.';
|
||||||
|
|
||||||
// agenda view
|
// agenda view
|
||||||
$labels['listrange'] = 'Angezeigter Bereich:';
|
$labels['listrange'] = 'Angezeigter Bereich:';
|
||||||
|
|
|
@ -76,6 +76,7 @@ $labels['onemonthback'] = '1 Monat zurück';
|
||||||
$labels['nmonthsback'] = '$nr Monate zurück';
|
$labels['nmonthsback'] = '$nr Monate zurück';
|
||||||
$labels['showurl'] = 'URL anzeigen';
|
$labels['showurl'] = 'URL anzeigen';
|
||||||
$labels['showurldescription'] = 'Über die folgende Adresse können Sie mit einem beliebigen Kalenderprogramm Ihren Kalender abrufen (nur lesend), sofern dieses das iCal-Format unterstützt.';
|
$labels['showurldescription'] = 'Über die folgende Adresse können Sie mit einem beliebigen Kalenderprogramm Ihren Kalender abrufen (nur lesend), sofern dieses das iCal-Format unterstützt.';
|
||||||
|
$labels['caldavurldescription'] = 'Benutzen Sie folgende Addresse in einer <a href="http://de.wikipedia.org/wiki/CalDAV" target="_blank">CalDAV</a>-Anwendung (wie z.B. Evolution oder Mozilla Thunderbird) um diesen spezifischen Kalender mit dem Computer oder Mobiltelefon zu synchronisieren.';
|
||||||
|
|
||||||
// agenda view
|
// agenda view
|
||||||
$labels['listrange'] = 'Angezeigter Bereich:';
|
$labels['listrange'] = 'Angezeigter Bereich:';
|
||||||
|
|
|
@ -77,6 +77,7 @@ $labels['onemonthback'] = '1 month back';
|
||||||
$labels['nmonthsback'] = '$nr months back';
|
$labels['nmonthsback'] = '$nr months back';
|
||||||
$labels['showurl'] = 'Show calendar URL';
|
$labels['showurl'] = 'Show calendar URL';
|
||||||
$labels['showurldescription'] = 'Use the following address to access (read only) your calendar from other applications. You can copy and paste this into any calendar software that supports the iCal format.';
|
$labels['showurldescription'] = 'Use the following address to access (read only) your calendar from other applications. You can copy and paste this into any calendar software that supports the iCal format.';
|
||||||
|
$labels['caldavurldescription'] = 'Copy this address to a <a href="http://en.wikipedia.org/wiki/CalDAV" target="_blank">CalDAV</a> client application (e.g. Evolution or Mozilla Thunderbird) to fully synchronize this specific calendar with your computer or mobile device.';
|
||||||
|
|
||||||
// agenda view
|
// agenda view
|
||||||
$labels['listrange'] = 'Range to display:';
|
$labels['listrange'] = 'Range to display:';
|
||||||
|
|
|
@ -164,7 +164,8 @@ pre {
|
||||||
background-position: 0 -92px;
|
background-position: 0 -92px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#calfeedurl {
|
#calfeedurl,
|
||||||
|
#caldavurl {
|
||||||
width: 98%;
|
width: 98%;
|
||||||
background: #fbfbfb;
|
background: #fbfbfb;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
|
|
@ -150,6 +150,10 @@
|
||||||
<div id="calendarurlbox" class="uidialog">
|
<div id="calendarurlbox" class="uidialog">
|
||||||
<p><roundcube:label name="calendar.showurldescription" /></p>
|
<p><roundcube:label name="calendar.showurldescription" /></p>
|
||||||
<textarea id="calfeedurl" rows="2" readonly="readonly"></textarea>
|
<textarea id="calfeedurl" rows="2" readonly="readonly"></textarea>
|
||||||
|
<div id="calendarcaldavurl" style="display:none">
|
||||||
|
<p><roundcube:label name="calendar.caldavurldescription" html="yes" /></p>
|
||||||
|
<textarea id="caldavurl" rows="2" readonly="readonly"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="calendartoolbar">
|
<div id="calendartoolbar">
|
||||||
|
|
|
@ -225,7 +225,8 @@ pre {
|
||||||
background-position: right -92px;
|
background-position: right -92px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#calfeedurl {
|
#calfeedurl,
|
||||||
|
#caldavurl {
|
||||||
width: 98%;
|
width: 98%;
|
||||||
background: #fbfbfb;
|
background: #fbfbfb;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
|
|
@ -164,6 +164,10 @@
|
||||||
<div id="calendarurlbox" class="uidialog">
|
<div id="calendarurlbox" class="uidialog">
|
||||||
<p><roundcube:label name="calendar.showurldescription" /></p>
|
<p><roundcube:label name="calendar.showurldescription" /></p>
|
||||||
<textarea id="calfeedurl" rows="2" readonly="readonly"></textarea>
|
<textarea id="calfeedurl" rows="2" readonly="readonly"></textarea>
|
||||||
|
<div id="calendarcaldavurl" style="display:none">
|
||||||
|
<p><roundcube:label name="calendar.caldavurldescription" html="yes" /></p>
|
||||||
|
<textarea id="caldavurl" rows="2" readonly="readonly"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<roundcube:object name="plugin.calendar_css" />
|
<roundcube:object name="plugin.calendar_css" />
|
||||||
|
|
Loading…
Add table
Reference in a new issue