diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index 8500453f3..827351760 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -156,6 +156,9 @@ class ScheduleController extends Zend_Controller_Action $show->scheduleShow($start, array($plId)); $this->view->showContent = $show->getShowContent($start); + $this->view->chosen = $this->view->render('schedule/scheduled-content.phtml'); + + unset($this->view->showContent); } else { diff --git a/application/models/Shows.php b/application/models/Shows.php index c1fe42c1d..24a93ebff 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -305,18 +305,19 @@ class Show { $items[$pl_counter]["pl_name"] = $row["name"]; $items[$pl_counter]["pl_creator"] = $row["creator"]; - $items[$pl_counter]["pl_description"] = $row["description"]; + $items[$pl_counter]["pl_description"] = $row["description"]; + $items[$pl_counter]["pl_group"] = $row["group_id"]; - $sql = "SELECT SUM(clip_length) FROM cc_schedule WHERE group_id = '{$currGroupId}'"; + $sql = "SELECT SUM(clip_length) FROM cc_schedule WHERE group_id = '{$currGroupId}'"; $length = $CC_DBC->GetOne($sql); $items[$pl_counter]["pl_length"] = $length; } $f_counter = $f_counter + 1; - $items[$pl_counter][$f_counter]["f_name"] = $row["track_title"]; - $items[$pl_counter][$f_counter]["f_artist"] = $row["artist_name"]; - $items[$pl_counter][$f_counter]["f_length"] = $row["length"]; + $items[$pl_counter]["pl_content"][$f_counter]["f_name"] = $row["track_title"]; + $items[$pl_counter]["pl_content"][$f_counter]["f_artist"] = $row["artist_name"]; + $items[$pl_counter]["pl_content"][$f_counter]["f_length"] = $row["length"]; } return $items; diff --git a/application/views/scripts/schedule/scheduled-content-partial.phtml b/application/views/scripts/schedule/scheduled-content-partial.phtml deleted file mode 100644 index 6e2d847d7..000000000 --- a/application/views/scripts/schedule/scheduled-content-partial.phtml +++ /dev/null @@ -1,2 +0,0 @@ -

First header

-
First content
diff --git a/application/views/scripts/schedule/scheduled-content.phtml b/application/views/scripts/schedule/scheduled-content.phtml new file mode 100644 index 000000000..7e82b36ea --- /dev/null +++ b/application/views/scripts/schedule/scheduled-content.phtml @@ -0,0 +1,24 @@ +showContent) > 0) : ?> + showContent as $pl) : ?> +
  • " class="ui-widget-content"> +

    +
    + + +
    +
    +
    +

    +
    + +
    + + +
    +
    + +
    +
  • + + + diff --git a/public/js/airtime/schedule/schedule.js b/public/js/airtime/schedule/schedule.js index 5a1d327d2..eb47d9169 100644 --- a/public/js/airtime/schedule/schedule.js +++ b/public/js/airtime/schedule/schedule.js @@ -194,14 +194,14 @@ function makeScheduleDialog(dialog, show) { url = '/Schedule/schedule-show/format/json'; - //$("#schedule_playlist_chosen") - // .append(ui.helper); - - $.post(url, {plId: pl_id, start: start_date, end: end_date, showId: show.id}, function(json){ var x; + + $("#schedule_playlist_chosen") + .empty() + .append(json.chosen); }); }