diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php
index a283ac959..575349c14 100644
--- a/application/controllers/ScheduleController.php
+++ b/application/controllers/ScheduleController.php
@@ -255,11 +255,12 @@ class ScheduleController extends Zend_Controller_Action
{
$show_id = $this->sched_sess->showId;
$start_timestamp = $this->sched_sess->showStart;
+ $end_timestamp = $this->sched_sess->showEnd;
$post = $this->getRequest()->getPost();
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
$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
die(json_encode($playlists));
diff --git a/application/models/Shows.php b/application/models/Shows.php
index 9e93f1d0a..736ea2339 100644
--- a/application/models/Shows.php
+++ b/application/models/Shows.php
@@ -313,10 +313,7 @@ class Show {
return $time;
}
- public function getTimeUnScheduled($start_date, $end_date, $start_time, $end_time) {
-
- $start_timestamp = $start_date ." ".$start_time;
- $end_timestamp = $end_date ." ".$end_time;
+ public function getTimeUnScheduled($start_timestamp, $end_timestamp) {
$time = Schedule::getTimeUnScheduledInRange($start_timestamp, $end_timestamp);
@@ -653,22 +650,9 @@ class Show {
return $length;
}
- public function searchPlaylistsForShow($start_timestamp, $datatables){
- global $CC_DBC;
+ public function searchPlaylistsForShow($start_timestamp, $end_timestamp, $datatables){
- $sql = "SELECT EXTRACT(DOW FROM TIMESTAMP '{$start_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);
+ $length = $this->getTimeUnScheduled($start_timestamp, $end_timestamp);
return StoredFile::searchPlaylistsForSchedule($length, $datatables);
}
diff --git a/application/views/scripts/schedule/schedule-show-dialog.phtml b/application/views/scripts/schedule/schedule-show-dialog.phtml
index 5c3067016..5781eaf74 100644
--- a/application/views/scripts/schedule/schedule-show-dialog.phtml
+++ b/application/views/scripts/schedule/schedule-show-dialog.phtml
@@ -1,27 +1,30 @@
showName; ?>, showLength; ?>
-
-
-
-
- Id |
- Description |
- Title |
- Creator |
- Length |
- Editing |
-
-
-
-
-
-
-
Items In This Show:
-
-
-
timeFilled; ?>
-
-
showLength; ?>
-
-
+
+
+
+
+
+ Id |
+ Description |
+ Title |
+ Creator |
+ Length |
+ Editing |
+
+
+
+
+
+
+
+
Items In This Show:
+
+
+
timeFilled; ?>
+
+
showLength; ?>
+
+
+
diff --git a/public/css/styles.css b/public/css/styles.css
index 49996271d..76520abc7 100644
--- a/public/css/styles.css
+++ b/public/css/styles.css
@@ -709,15 +709,16 @@ dt.block-display, dd.block-display {
/*---//////////////////// Schedule Show ////////////////////---*/
-#schedule_playlist_dialog > div {
+#schedule_playlist_dialog .wrapp-two {
float: left;
width: 50%;
padding: 0;
}
-#schedule_playlist_dialog > div:first-child {
+#schedule_playlist_dialog .wrapp-one {
margin-right:2%;
width: 48%;
+ float: left;
}
#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 {
+ padding:0;
+}
+
+
+#schedule_playlist_dialog > div {
background: none repeat scroll 0 0 transparent;
border: 1px solid #8f8f8f;
- overflow: auto;
padding: 8px;
- margin:8px;
-
+ margin:8px 8px 0 8px;
}
+
+
#schedule_playlist_dialog > div h4 {
padding: 13px 0 12px 0;
margin: 0;
@@ -897,7 +903,7 @@ h2#scheduled_playlist_name {
font-size:21px;
font-weight:normal;
margin:0;
- padding:16px 0 0px 12px;
+ padding:8px 0 0px 12px;
color:#1c1c1c;
}