CC-1887 shows are now resized properly with delta day. schedule dialog includes end day since shows can be longer than 1 day now, playlist search must look for an interval given the time increase.
This commit is contained in:
parent
0de162aa26
commit
424c6f0193
|
@ -306,7 +306,8 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$end = explode(" ", $end_timestamp);
|
$end = explode(" ", $end_timestamp);
|
||||||
$startTime = explode(":", $start[1]);
|
$startTime = explode(":", $start[1]);
|
||||||
$endTime = explode(":", $end[1]);
|
$endTime = explode(":", $end[1]);
|
||||||
$dateInfo = getDate(strtotime($start_timestamp));
|
$dateInfo_s = getDate(strtotime($start_timestamp));
|
||||||
|
$dateInfo_e = getDate(strtotime($end_timestamp));
|
||||||
|
|
||||||
$this->view->showContent = $show->getShowContent();
|
$this->view->showContent = $show->getShowContent();
|
||||||
$this->view->timeFilled = $show->getTimeScheduled();
|
$this->view->timeFilled = $show->getTimeScheduled();
|
||||||
|
@ -314,9 +315,12 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$this->view->showLength = $show->getShowLength();
|
$this->view->showLength = $show->getShowLength();
|
||||||
$this->view->percentFilled = $show->getPercentScheduledInRange();
|
$this->view->percentFilled = $show->getPercentScheduledInRange();
|
||||||
|
|
||||||
$this->view->wday = $dateInfo['weekday'];
|
$this->view->s_wday = $dateInfo_s['weekday'];
|
||||||
$this->view->month = $dateInfo['month'];
|
$this->view->s_month = $dateInfo_s['month'];
|
||||||
$this->view->day = $dateInfo['mday'];
|
$this->view->s_day = $dateInfo_s['mday'];
|
||||||
|
$this->view->e_wday = $dateInfo_e['weekday'];
|
||||||
|
$this->view->e_month = $dateInfo_e['month'];
|
||||||
|
$this->view->e_day = $dateInfo_e['mday'];
|
||||||
$this->view->startTime = sprintf("%d:%02d", $startTime[0], $startTime[1]);
|
$this->view->startTime = sprintf("%d:%02d", $startTime[0], $startTime[1]);
|
||||||
$this->view->endTime = sprintf("%d:%02d", $endTime[0], $endTime[1]);
|
$this->view->endTime = sprintf("%d:%02d", $endTime[0], $endTime[1]);
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ class ShowInstance {
|
||||||
$starts = $this->getShowStart();
|
$starts = $this->getShowStart();
|
||||||
$ends = $this->getShowEnd();
|
$ends = $this->getShowEnd();
|
||||||
|
|
||||||
$sql = "SELECT timestamp '{$ends}' + interval '{$hours}:{$mins}'";
|
$sql = "SELECT timestamp '{$ends}' + interval '{$deltaDay} days' + interval '{$hours}:{$mins}'";
|
||||||
$new_ends = $CC_DBC->GetOne($sql);
|
$new_ends = $CC_DBC->GetOne($sql);
|
||||||
|
|
||||||
//only need to check overlap if show increased in size.
|
//only need to check overlap if show increased in size.
|
||||||
|
|
|
@ -1791,7 +1791,7 @@ class StoredFile {
|
||||||
|
|
||||||
$fromTable = "cc_playlist AS pl LEFT JOIN cc_playlisttimes AS plt USING(id) LEFT JOIN cc_subjs AS sub ON pl.editedby = sub.id";
|
$fromTable = "cc_playlist AS pl LEFT JOIN cc_playlisttimes AS plt USING(id) LEFT JOIN cc_subjs AS sub ON pl.editedby = sub.id";
|
||||||
|
|
||||||
$datatables["optWhere"][] = "plt.length <= '{$p_length}'";
|
$datatables["optWhere"][] = "plt.length <= INTERVAL '{$p_length}'";
|
||||||
|
|
||||||
|
|
||||||
return StoredFile::searchFiles($fromTable, $datatables);
|
return StoredFile::searchFiles($fromTable, $datatables);
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<div id="schedule_playlist_dialog">
|
<div id="schedule_playlist_dialog">
|
||||||
<h2 id="scheduled_playlist_name"><?php echo $this->showName; ?>: <span><?php echo $this->wday." ".$this->month." ".$this->day.", ".$this->startTime." - ".$this->endTime; ?></span></h2>
|
<h2 id="scheduled_playlist_name">
|
||||||
|
<?php echo $this->showName; ?>: <span><?php echo $this->s_wday." ".$this->s_month." ".$this->s_day." ".$this->startTime.
|
||||||
|
" - ".$this->e_wday." ".$this->e_month." ".$this->e_day." ".$this->endTime; ?></span>
|
||||||
|
</h2>
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<div class="wrapp-one">
|
<div class="wrapp-one">
|
||||||
<table id="schedule_playlists" cellpadding="0" cellspacing="0" class="datatable">
|
<table id="schedule_playlists" cellpadding="0" cellspacing="0" class="datatable">
|
||||||
|
|
|
@ -848,6 +848,7 @@ div.ui-datepicker {
|
||||||
margin-right:22px;
|
margin-right:22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#schedule_playlist_chosen li > div > div > span {
|
#schedule_playlist_chosen li > div > div > span {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right:46px;
|
margin-right:46px;
|
||||||
|
@ -912,7 +913,7 @@ h2#scheduled_playlist_name span {
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
width: 80px;
|
width: 100px;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -1119,4 +1120,4 @@ button, input {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ui-datepicker-div { z-index: 10 !important }
|
#ui-datepicker-div { z-index: 10 !important }
|
||||||
|
|
Loading…
Reference in New Issue