From 1fba43e9545daa18c71d0a1a3c94a0ad545db230 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 16 Jun 2009 16:28:37 +0200 Subject: [PATCH] Document all possible json event properties. --- kronolith/js/src/kronolith.js | 5 ++--- kronolith/lib/Event.php | 24 ++++++++++++++++++++++++ kronolith/lib/Event/Horde.php | 4 ++-- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/kronolith/js/src/kronolith.js b/kronolith/js/src/kronolith.js index ee554ae63..b2dbc6342 100644 --- a/kronolith/js/src/kronolith.js +++ b/kronolith/js/src/kronolith.js @@ -1188,10 +1188,9 @@ KronolithCore = { _setEventText: function(div, event) { - if (event.icn) { - div.insert(new Element('IMG', { 'src': event.icn })); + if (event.ic) { + div.insert(new Element('IMG', { 'src': event.ic })); } - div.insert(event.t); if (event.a) { div.insert(' ') diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index 5544d269b..4a91f0020 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -1001,6 +1001,30 @@ abstract class Kronolith_Event * Returns a simple object suitable for json transport representing this * event. * + * Possible properties are: + * - t: title + * - c: calendar id + * - s: start date + * - e: end date + * - x: status (Kronolith::STATUS_* constant) + * - al: all-day? + * - bg: background color + * - fg: foreground color + * - pe: edit permissions? + * - pd: delete permissions? + * - a: alarm text + * - r: recurrence type (Horde_Date_Recurrence::RECUR_* constant) + * - ic: icon + * - ln: link + * - id: event id + * - ty: calendar type (driver) + * - l: location + * - sd: formatted start date + * - st: formatted start time + * - ed: formatted end date + * - et: formatted end time + * - tg: tag list + * * @param boolean $allDay If not null, overrides whether the event is * an all-day event. * @param boolean $full Whether to return all event details. diff --git a/kronolith/lib/Event/Horde.php b/kronolith/lib/Event/Horde.php index a1ba6be3d..f9fc87d94 100644 --- a/kronolith/lib/Event/Horde.php +++ b/kronolith/lib/Event/Horde.php @@ -84,10 +84,10 @@ class Kronolith_Event_Horde extends Kronolith_Event public function toJson($allDay = null, $full = false, $time_format = 'H:i') { $json = parent::toJson($allDay, $full, $time_format); - $json->icn = $this->external_icon; + $json->ic = $this->external_icon; // @TODO: What is expected for external calendar links? This is currently // broken in the UI. - //$json->link = $this->getLink(); + //$json->ln = $this->getLink(); return $json; } -- 2.11.0