working on schedule dialog, reqorked get remaining time function in a show to be better.
This commit is contained in:
parent
3adbbf4163
commit
0bcf69985e
4 changed files with 44 additions and 50 deletions
|
@ -255,11 +255,12 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$show_id = $this->sched_sess->showId;
|
$show_id = $this->sched_sess->showId;
|
||||||
$start_timestamp = $this->sched_sess->showStart;
|
$start_timestamp = $this->sched_sess->showStart;
|
||||||
|
$end_timestamp = $this->sched_sess->showEnd;
|
||||||
$post = $this->getRequest()->getPost();
|
$post = $this->getRequest()->getPost();
|
||||||
|
|
||||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
$show = new Show(new User($userInfo->id, $userInfo->type), $show_id);
|
$show = new Show(new User($userInfo->id, $userInfo->type), $show_id);
|
||||||
$playlists = $show->searchPlaylistsForShow($start_timestamp, $post);
|
$playlists = $show->searchPlaylistsForShow($start_timestamp, $end_timestamp, $post);
|
||||||
|
|
||||||
//for datatables
|
//for datatables
|
||||||
die(json_encode($playlists));
|
die(json_encode($playlists));
|
||||||
|
|
|
@ -313,10 +313,7 @@ class Show {
|
||||||
return $time;
|
return $time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTimeUnScheduled($start_date, $end_date, $start_time, $end_time) {
|
public function getTimeUnScheduled($start_timestamp, $end_timestamp) {
|
||||||
|
|
||||||
$start_timestamp = $start_date ." ".$start_time;
|
|
||||||
$end_timestamp = $end_date ." ".$end_time;
|
|
||||||
|
|
||||||
$time = Schedule::getTimeUnScheduledInRange($start_timestamp, $end_timestamp);
|
$time = Schedule::getTimeUnScheduledInRange($start_timestamp, $end_timestamp);
|
||||||
|
|
||||||
|
@ -653,22 +650,9 @@ class Show {
|
||||||
return $length;
|
return $length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function searchPlaylistsForShow($start_timestamp, $datatables){
|
public function searchPlaylistsForShow($start_timestamp, $end_timestamp, $datatables){
|
||||||
global $CC_DBC;
|
|
||||||
|
|
||||||
$sql = "SELECT EXTRACT(DOW FROM TIMESTAMP '{$start_timestamp}')";
|
$length = $this->getTimeUnScheduled($start_timestamp, $end_timestamp);
|
||||||
$day = $CC_DBC->GetOne($sql);
|
|
||||||
|
|
||||||
$sql = "SELECT * FROM cc_show_days WHERE show_id = '{$this->_showId}' AND day = '{$day}'";
|
|
||||||
$row = $CC_DBC->GetAll($sql);
|
|
||||||
$row = $row[0];
|
|
||||||
|
|
||||||
$start_date = $row["first_show"];
|
|
||||||
$end_date = $row["last_show"];
|
|
||||||
$start_time = $row["start_time"];
|
|
||||||
$end_time = $row["end_time"];
|
|
||||||
|
|
||||||
$length = $this->getTimeUnScheduled($start_date, $end_date, $start_time, $end_time);
|
|
||||||
|
|
||||||
return StoredFile::searchPlaylistsForSchedule($length, $datatables);
|
return StoredFile::searchPlaylistsForSchedule($length, $datatables);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,30 @@
|
||||||
<div id="schedule_playlist_dialog">
|
<div id="schedule_playlist_dialog">
|
||||||
<h2 id="scheduled_playlist_name"><?php echo $this->showName; ?>, <span><?php echo $this->showLength; ?></span></h2>
|
<h2 id="scheduled_playlist_name"><?php echo $this->showName; ?>, <span><?php echo $this->showLength; ?></span></h2>
|
||||||
<div>
|
<div class="clearfix">
|
||||||
<table id="schedule_playlists" cellpadding="0" cellspacing="0" class="datatable">
|
<div class="wrapp-one">
|
||||||
<thead>
|
<table id="schedule_playlists" cellpadding="0" cellspacing="0" class="datatable">
|
||||||
<tr>
|
<thead>
|
||||||
<th>Id</th>
|
<tr>
|
||||||
<th>Description</th>
|
<th>Id</th>
|
||||||
<th>Title</th>
|
<th>Description</th>
|
||||||
<th>Creator</th>
|
<th>Title</th>
|
||||||
<th>Length</th>
|
<th>Creator</th>
|
||||||
<th>Editing</th>
|
<th>Length</th>
|
||||||
</tr>
|
<th>Editing</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody></tbody>
|
</thead>
|
||||||
</table>
|
<tbody></tbody>
|
||||||
</div>
|
</table>
|
||||||
<div>
|
</div>
|
||||||
<div>Items In This Show:</div>
|
|
||||||
<ul id="schedule_playlist_chosen"></ul>
|
<div class="wrapp-two">
|
||||||
<div id="show_time_info">
|
<div><h4>Items In This Show:</h4></div>
|
||||||
<span id="show_time_filled" class="time"><?php echo $this->timeFilled; ?></span>
|
<ul id="schedule_playlist_chosen"></ul>
|
||||||
<div id="show_progressbar"></div>
|
<div id="show_time_info">
|
||||||
<span id="show_length" class="time"><?php echo $this->showLength; ?></span>
|
<span id="show_time_filled" class="time"><?php echo $this->timeFilled; ?></span>
|
||||||
</div>
|
<div id="show_progressbar"></div>
|
||||||
</div>
|
<span id="show_length" class="time"><?php echo $this->showLength; ?></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -709,15 +709,16 @@ dt.block-display, dd.block-display {
|
||||||
/*---//////////////////// Schedule Show ////////////////////---*/
|
/*---//////////////////// Schedule Show ////////////////////---*/
|
||||||
|
|
||||||
|
|
||||||
#schedule_playlist_dialog > div {
|
#schedule_playlist_dialog .wrapp-two {
|
||||||
float: left;
|
float: left;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#schedule_playlist_dialog > div:first-child {
|
#schedule_playlist_dialog .wrapp-one {
|
||||||
margin-right:2%;
|
margin-right:2%;
|
||||||
width: 48%;
|
width: 48%;
|
||||||
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
#schedule_playlist_dialog div:first-child .ui-widget-header:first-child {
|
#schedule_playlist_dialog div:first-child .ui-widget-header:first-child {
|
||||||
|
@ -739,13 +740,18 @@ dt.block-display, dd.block-display {
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui-dialog #schedule_playlist_dialog.ui-dialog-content {
|
.ui-dialog #schedule_playlist_dialog.ui-dialog-content {
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#schedule_playlist_dialog > div {
|
||||||
background: none repeat scroll 0 0 transparent;
|
background: none repeat scroll 0 0 transparent;
|
||||||
border: 1px solid #8f8f8f;
|
border: 1px solid #8f8f8f;
|
||||||
overflow: auto;
|
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
margin:8px;
|
margin:8px 8px 0 8px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#schedule_playlist_dialog > div h4 {
|
#schedule_playlist_dialog > div h4 {
|
||||||
padding: 13px 0 12px 0;
|
padding: 13px 0 12px 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -897,7 +903,7 @@ h2#scheduled_playlist_name {
|
||||||
font-size:21px;
|
font-size:21px;
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:16px 0 0px 12px;
|
padding:8px 0 0px 12px;
|
||||||
color:#1c1c1c;
|
color:#1c1c1c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue