From 133abb38427456f0ef2c8b9868e37e80936c416b Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 16 Sep 2009 20:32:21 -0400 Subject: [PATCH] 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? --- kronolith/lib/Resource/Single.php | 2 -- 1 file changed, 2 deletions(-) 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; } } -- 2.11.0