From 20f3c49dcb28d87c0fb5945960519f6ba07108ef Mon Sep 17 00:00:00 2001 From: naomiaro Date: Wed, 16 Mar 2011 11:33:08 -0400 Subject: [PATCH] CC-1985 : Automatic rebroadcast of recorded content rebroadcast shows are automatically resized if parent recorded shows are altered. progress bar is removed from recorded/rebroadcast shows, waiting on special icons. --- application/models/Shows.php | 7 +++++++ public/js/airtime/schedule/full-calendar-functions.js | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/application/models/Shows.php b/application/models/Shows.php index 154707745..a1faadc07 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -618,6 +618,13 @@ class ShowInstance { } } //with overbooking no longer need to check already scheduled content still fits. + + //must update length of all rebroadcast instances. + if($this->isRecorded()) { + $sql = "UPDATE cc_show_instances SET ends = (ends + interval '{$deltaDay} days' + interval '{$hours}:{$mins}') + WHERE rebroadcast = 1 AND instance_id = {$this->_instanceId}"; + $CC_DBC->query($sql); + } $this->setShowEnd($new_ends); } diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index 87388f0fd..33df795b7 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -148,7 +148,8 @@ function viewDisplay( view ) { function eventRender(event, element, view) { - if(view.name === 'agendaDay' || view.name === 'agendaWeek') { + //only put progress bar on shows that aren't being recorded and are not a rebroadcast. + if((view.name === 'agendaDay' || view.name === 'agendaWeek') && event.record === 0 && event.rebroadcast === 0) { var div = $('
'); div .height('5px')