From: Jan Schneider Date: Fri, 19 Feb 2010 22:25:20 +0000 (+0100) Subject: Add calendar and tasklist export. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cf213bbdb6347a982580604e9044e95c93ab50fa;p=horde.git Add calendar and tasklist export. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 02a084202..4efc3f09f 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -2077,6 +2077,7 @@ KronolithCore = { switch (type) { case 'internal': case 'tasklists': + $('kronolithCalendar' + type + 'LinkImportExport').up().hide(); fields.push('Description'); break; case 'remote': @@ -2102,8 +2103,14 @@ KronolithCore = { switch (type) { case 'internal': - case 'tasklists': $('kronolithCalendarinternalDescription').setValue(info.desc); + $('kronolithCalendarinternalLinkImportExport').up().show(); + $('kronolithCalendarinternalExport').href = Kronolith.conf.URI_CALENDAR_EXPORT + '=' + calendar; + break; + case 'tasklists': + $('kronolithCalendartasklistsDescription').setValue(info.desc); + $('kronolithCalendartasklistsLinkImportExport').up().show(); + $('kronolithCalendartasklistsExport').href = Kronolith.conf.tasks.URI_TASKLIST_EXPORT + '=' + calendar.substring(6); break; case 'remote': $('kronolithCalendarremoteUrl').setValue(calendar); diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 6c8ef0170..6b78aed25 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -187,6 +187,7 @@ class Kronolith 'URI_AJAX' => (string)Horde::getServiceLink('ajax', 'kronolith'), 'URI_IMG' => $registry->getImageDir() . '/', 'URI_SNOOZE' => (string)Horde::url($registry->get('webroot', 'horde') . '/services/snooze.php', true, -1), + 'URI_CALENDAR_EXPORT' => (string)Horde::url('data.php', true)->add(array('actionID' => 'export', 'all_events' => 1, 'exportID' => Horde_Data::EXPORT_ICALENDAR, 'exportCal' => '')), 'SESSION_ID' => defined('SID') ? SID : '', 'user' => Horde_Auth::getAuth(), 'prefs_url' => str_replace('&', '&', Horde::getServiceLink('options', 'kronolith')), diff --git a/kronolith/templates/chunks/calendar.php b/kronolith/templates/chunks/calendar.php index 13fd83964..aa983e3d4 100644 --- a/kronolith/templates/chunks/calendar.php +++ b/kronolith/templates/chunks/calendar.php @@ -23,6 +23,7 @@
  • +

  • @@ -41,6 +42,18 @@ tbd + +
    " class="kronolithCalendarSave button ok" /> " class="kronolithCalendarDelete button ko" /> @@ -72,6 +85,7 @@ tbd

    @@ -84,6 +98,18 @@ tbd tbd + +
    " class="kronolithCalendarSave button ok" /> " class="kronolithCalendarDelete button ko" /> diff --git a/nag/lib/Api.php b/nag/lib/Api.php index d0b8cd51e..8ef354d91 100644 --- a/nag/lib/Api.php +++ b/nag/lib/Api.php @@ -26,6 +26,7 @@ class Nag_Api extends Horde_Registry_Api public function ajaxDefaults() { return array( + 'URI_TASKLIST_EXPORT' => (string)Horde::url('data.php', true)->add(array('actionID' => 'export', 'exportTasks' => 1, 'exportID' => Horde_Data::EXPORT_ICALENDAR, 'exportList' => '')), 'default_tasklist' => Nag::getDefaultTasklist(Horde_Perms::EDIT), 'default_due' => (bool)$GLOBALS['prefs']->getValue('default_due'), 'default_due_days' => (int)$GLOBALS['prefs']->getValue('default_due_days'),