CC-3174 : showbuilder
adding add/remove to the context menu. airtimeline now has default set start/end times in the inputs.
This commit is contained in:
parent
fdd962f5ce
commit
941da1fe44
6 changed files with 73 additions and 30 deletions
|
@ -198,20 +198,24 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$showStartLocalDT = Application_Model_DateHelper::ConvertToLocalDateTime($instance->getShowInstanceStart());
|
||||
$showEndLocalDT = Application_Model_DateHelper::ConvertToLocalDateTime($instance->getShowInstanceEnd());
|
||||
|
||||
/*
|
||||
if ($epochNow < $showStartDateHelper->getTimestamp()) {
|
||||
if ($epochNow < $showStartLocalDT->getTimestamp()) {
|
||||
|
||||
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER, UTYPE_HOST),$show->getShowId()) && !$show->isRecorded() && !$show->isRebroadcast()) {
|
||||
if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER, UTYPE_HOST), $instance->getShowId())
|
||||
&& !$instance->isRecorded()
|
||||
&& !$instance->isRebroadcast()) {
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/schedule-show-dialog'.$params,
|
||||
'callback' => 'window["buildScheduleDialog"]'), 'title' => 'Add / Remove Content');
|
||||
$menu["schedule"] = array("name"=> "Add / Remove Content", "url" => "/showbuilder/index/");
|
||||
|
||||
$menu["clear"] = array("name"=> "Remove All Content", "icon" => "delete", "url" => "/schedule/clear-show");
|
||||
|
||||
/*
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/clear-show'.$params,
|
||||
'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Remove All Content');
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
if (!$instance->isRecorded()) {
|
||||
|
||||
|
|
|
@ -28,6 +28,20 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
||||
$now = time();
|
||||
$from = $request->getParam("from", $now);
|
||||
$to = $request->getParam("to", $now+(24*60*60));
|
||||
|
||||
$start = DateTime::createFromFormat("U", $from, new DateTimeZone("UTC"));
|
||||
$start->setTimezone(new DateTimeZone(date_default_timezone_get()));
|
||||
$end = DateTime::createFromFormat("U", $to, new DateTimeZone("UTC"));
|
||||
$end->setTimezone(new DateTimeZone(date_default_timezone_get()));
|
||||
|
||||
$this->view->start_date = $start->format("Y-m-d");
|
||||
$this->view->start_time = $start->format("H:i");
|
||||
$this->view->end_date = $end->format("Y-m-d");
|
||||
$this->view->end_time = $end->format("H:i");
|
||||
|
||||
$this->view->headScript()->appendScript("var serverTimezoneOffset = ".date("Z")."; //in seconds");
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/showbuilder/builder.js','text/javascript');
|
||||
|
|
|
@ -1527,13 +1527,15 @@ class Application_Model_Show {
|
|||
$endDateTime = new DateTime($show["ends"], new DateTimeZone("UTC"));
|
||||
$endDateTime->setTimezone(new DateTimeZone(date_default_timezone_get()));
|
||||
|
||||
$event["id"] = $show["instance_id"];
|
||||
$event["id"] = intval($show["instance_id"]);
|
||||
$event["title"] = $show["name"];
|
||||
$event["start"] = $startDateTime->format("Y-m-d H:i:s");
|
||||
$event["startUnix"] = $startDateTime->format("U");
|
||||
$event["end"] = $endDateTime->format("Y-m-d H:i:s");
|
||||
$event["endUnix"] = $endDateTime->format("U");
|
||||
$event["allDay"] = false;
|
||||
$event["description"] = $show["description"];
|
||||
$event["showId"] = $show["show_id"];
|
||||
$event["showId"] = intval($show["show_id"]);
|
||||
$event["record"] = intval($show["record"]);
|
||||
$event["rebroadcast"] = intval($show["rebroadcast"]);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<input type="text" id="show_builder_datepicker_start" class="input_text"></input>
|
||||
<input type="text" id="show_builder_timepicker_start" class="input_text"></input>
|
||||
<input type="text" id="show_builder_datepicker_end" class="input_text"></input>
|
||||
<input type="text" id="show_builder_timepicker_end" class="input_text"></input>
|
||||
<input type="text" id="show_builder_datepicker_start" class="input_text" value="<?php echo $this->start_date?>"></input>
|
||||
<input type="text" id="show_builder_timepicker_start" class="input_text" value="<?php echo $this->start_time?>"></input>
|
||||
<input type="text" id="show_builder_datepicker_end" class="input_text" value="<?php echo $this->end_date?>"></input>
|
||||
<input type="text" id="show_builder_timepicker_end" class="input_text" value="<?php echo $this->end_time?>"></input>
|
||||
<input type="button" id="show_builder_timerange_button" class="ui-button ui-state-default" value="GO"></input>
|
||||
<table id="show_builder_table" cellpadding="0" cellspacing="0" class="datatable"></table>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue