From: Michael J. Rubinsky Date: Thu, 17 Sep 2009 00:32:21 +0000 (-0400) Subject: Provide feedback on resource availability as soon as it's added to the attendees... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=133abb38427456f0ef2c8b9868e37e80936c416b;p=horde.git Provide feedback on resource availability as soon as it's added to the attendees form. If response type is Kronolith_Resource::RESPONSETYPE_AUTO then use the start and end datetime values that are now passed from the event form to determine if the resource is free. Still need to figure out how to (efficiently) pass the datetime values to take into account AM/PM. Probably break out the javascript from the onClick handler into it's function and provide logic to check the am/pm fields? Is there an easier/prettier way? --- diff --git a/kronolith/lib/Resource/Single.php b/kronolith/lib/Resource/Single.php index 3814a0881..0b1a25853 100644 --- a/kronolith/lib/Resource/Single.php +++ b/kronolith/lib/Resource/Single.php @@ -50,7 +50,6 @@ class Kronolith_Resource_Single extends Kronolith_Resource_Base } else { $uid = 0; } - foreach ($busy as $events) { foreach ($events as $e) { if (!($e->hasStatus(Kronolith::STATUS_CANCELLED) || @@ -61,7 +60,6 @@ class Kronolith_Resource_Single extends Kronolith_Resource_Base // the previous event ends. if (!($e->start->compareDateTime($end) >= 0) && !($e->end->compareDateTime($start) <= 0)) { - return false; } }