From 82da4dcfe843214b82733845e277b4757987face Mon Sep 17 00:00:00 2001 From: denise Date: Mon, 7 Jan 2013 12:41:28 -0500 Subject: [PATCH] CC-4599: Calendar: Add an icon to indicate show is not fully booked -done but a new icon is needed --- airtime_mvc/application/models/Show.php | 2 ++ airtime_mvc/application/models/ShowInstance.php | 16 ++++++++++++++++ airtime_mvc/public/css/styles.css | 3 +++ .../airtime/schedule/full-calendar-functions.js | 8 ++++++++ 4 files changed, 29 insertions(+) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 7f55e8c2a..827ccf7a7 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1801,6 +1801,8 @@ SQL; $options["show_empty"] = (array_key_exists($show['instance_id'], $content_count)) ? 0 : 1; + + $options["show_partial_filled"] = $showInstance->showPartialFilled(); $events[] = &self::makeFullCalendarEvent($show, $options, $startsDT, $endsDT, $startsEpochStr, $endsEpochStr); diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index d986d463c..14def6321 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -687,6 +687,22 @@ SQL; } + public function showPartialFilled() + { + $sql = << '00:00:00' +AND time_filled < ends - starts +AND file_id IS null AS partial_filled +FROM cc_show_instances +WHERE id = :instance_id +SQL; + + $res = Application_Common_Database::prepareAndExecute($sql, + array(':instance_id' => $this->_instanceId), 'all'); + + return $res[0]["partial_filled"]; + } + public function showEmpty() { $sql = <<'); + } else if (event.show_partial_filled === true) { + $(element) + .find(".fc-event-time") + .before(''); } } else if (view.name === 'month') { if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) { $(element) .find(".fc-event-title") .after(''); + } else if (event.show_partial_filled === true) { + $(element) + .find(".fc-event-title") + .after(''); } }