From: Michael J. Rubinsky Date: Sat, 8 May 2010 17:50:06 +0000 (-0400) Subject: Indicate that an event is an exception in the ajax interface also X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c7877ea0a26312785042d0019f4ec55a2f4475a2;p=horde.git Indicate that an event is an exception in the ajax interface also --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 4a548ec06..935aa9d03 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -4519,6 +4519,12 @@ KronolithCore = { } } + if (ev.bid) { + div = $('kronolithEventRepeatException'); + div.down('span').update(ev.eod); + this.toggleRecurrence('Exception'); + } + /* Attendees */ this.freeBusy = $H(); if (this.attendeeStartDateHandler) { @@ -4703,9 +4709,12 @@ KronolithCore = { toggleRecurrence: function(recur) { $('kronolithEventTabRecur').select('div').invoke('hide'); - if (recur != 'None') { + if (recur == 'Exception') { + $('kronolithEventRepeatException').show(); + } else if (recur != 'None') { $('kronolithEventRepeat' + recur).show(); $('kronolithEventRepeatLength').show(); + $('kronolithEventRepeatType').show(); } }, diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index 98fc1665e..0ee26c219 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -1534,6 +1534,11 @@ abstract class Kronolith_Event } if ($this->recurs()) { $json->r = $this->recurrence->getRecurType(); + } elseif ($this->baseid) { + $json->bid = $this->baseid; + if ($this->exceptionoriginaldate) { + $json->eod = sprintf(_("%s at %s"), $this->exceptionoriginaldate->strftime($GLOBALS['prefs']->getValue('date_format')), $this->exceptionoriginaldate->strftime(($GLOBALS['prefs']->getValue('twentyFour') ? '%H:%M' : '%I:%M %p'))); + } } if ($full) { diff --git a/kronolith/templates/index/edit.inc b/kronolith/templates/index/edit.inc index bb5d8e5c3..ee19a1d32 100644 --- a/kronolith/templates/index/edit.inc +++ b/kronolith/templates/index/edit.inc @@ -111,13 +111,14 @@