add show/schedule now on one page.
This commit is contained in:
parent
b61f2af59b
commit
675f1ae86a
8 changed files with 64 additions and 113 deletions
|
@ -56,7 +56,6 @@
|
||||||
<controllerFile controllerName="Schedule">
|
<controllerFile controllerName="Schedule">
|
||||||
<actionMethod actionName="index"/>
|
<actionMethod actionName="index"/>
|
||||||
<actionMethod actionName="eventFeed"/>
|
<actionMethod actionName="eventFeed"/>
|
||||||
<actionMethod actionName="addShowDialog"/>
|
|
||||||
<actionMethod actionName="moveShow"/>
|
<actionMethod actionName="moveShow"/>
|
||||||
<actionMethod actionName="resizeShow"/>
|
<actionMethod actionName="resizeShow"/>
|
||||||
<actionMethod actionName="deleteShow"/>
|
<actionMethod actionName="deleteShow"/>
|
||||||
|
@ -215,9 +214,6 @@
|
||||||
<viewControllerScriptsDirectory forControllerName="Error">
|
<viewControllerScriptsDirectory forControllerName="Error">
|
||||||
<viewScriptFile forActionName="denied"/>
|
<viewScriptFile forActionName="denied"/>
|
||||||
</viewControllerScriptsDirectory>
|
</viewControllerScriptsDirectory>
|
||||||
<viewControllerScriptsDirectory forControllerName="Schedule">
|
|
||||||
<viewScriptFile forActionName="addShowDialog"/>
|
|
||||||
</viewControllerScriptsDirectory>
|
|
||||||
<viewControllerScriptsDirectory forControllerName="Schedule">
|
<viewControllerScriptsDirectory forControllerName="Schedule">
|
||||||
<viewScriptFile forActionName="moveShow"/>
|
<viewScriptFile forActionName="moveShow"/>
|
||||||
</viewControllerScriptsDirectory>
|
</viewControllerScriptsDirectory>
|
||||||
|
|
|
@ -17,24 +17,11 @@ $pages = array(
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'label' => 'Schedule',
|
'label' => 'Schedule',
|
||||||
'uri' => 'javascript:void(null)',
|
|
||||||
'pages' => array(
|
|
||||||
array(
|
|
||||||
'label' => 'View',
|
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
'controller' => 'Schedule',
|
'controller' => 'Schedule',
|
||||||
'action' => 'index',
|
'action' => 'index',
|
||||||
'resource' => 'schedule'
|
'resource' => 'schedule'
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'label' => 'Add Show',
|
|
||||||
'module' => 'default',
|
|
||||||
'controller' => 'Schedule',
|
|
||||||
'action' => 'add-show-dialog',
|
|
||||||
'resource' => 'schedule'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'label' => 'Playlist Builder',
|
'label' => 'Playlist Builder',
|
||||||
'module' => 'default',
|
'module' => 'default',
|
||||||
|
|
|
@ -30,39 +30,14 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
public function indexAction()
|
public function indexAction()
|
||||||
{
|
{
|
||||||
$this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.js','text/javascript');
|
|
||||||
//$this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
|
|
||||||
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile('/js/airtime/schedule/full-calendar-functions.js','text/javascript');
|
|
||||||
$this->view->headScript()->appendFile('/js/airtime/schedule/schedule.js','text/javascript');
|
|
||||||
|
|
||||||
$this->view->headLink()->appendStylesheet('/css/contextmenu.css');
|
|
||||||
$this->view->headLink()->appendStylesheet('/css/fullcalendar.css');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function eventFeedAction()
|
|
||||||
{
|
|
||||||
$start = $this->_getParam('start', null);
|
|
||||||
$end = $this->_getParam('end', null);
|
|
||||||
|
|
||||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
|
||||||
$user = new User($userInfo->id);
|
|
||||||
if($user->isAdmin())
|
|
||||||
$editable = true;
|
|
||||||
else
|
|
||||||
$editable = false;
|
|
||||||
|
|
||||||
$this->view->events = Show::getFullCalendarEvents($start, $end, $editable);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addShowDialogAction()
|
|
||||||
{
|
|
||||||
$this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile('/js/timepicker/jquery.ui.timepicker-0.0.6.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/timepicker/jquery.ui.timepicker-0.0.6.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile('/js/colorpicker/js/colorpicker.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/colorpicker/js/colorpicker.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile('/js/airtime/schedule/full-calendar-functions.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/airtime/schedule/full-calendar-functions.js','text/javascript');
|
||||||
$this->view->headScript()->appendFile('/js/airtime/schedule/add-show.js','text/javascript');
|
$this->view->headScript()->appendFile('/js/airtime/schedule/add-show.js','text/javascript');
|
||||||
|
$this->view->headScript()->appendFile('/js/airtime/schedule/schedule.js','text/javascript');
|
||||||
|
|
||||||
$this->view->headLink()->appendStylesheet('/css/jquery-ui-timepicker.css');
|
$this->view->headLink()->appendStylesheet('/css/jquery-ui-timepicker.css');
|
||||||
$this->view->headLink()->appendStylesheet('/css/fullcalendar.css');
|
$this->view->headLink()->appendStylesheet('/css/fullcalendar.css');
|
||||||
|
@ -121,6 +96,21 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$this->view->style = $formStyle;
|
$this->view->style = $formStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function eventFeedAction()
|
||||||
|
{
|
||||||
|
$start = $this->_getParam('start', null);
|
||||||
|
$end = $this->_getParam('end', null);
|
||||||
|
|
||||||
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
|
$user = new User($userInfo->id);
|
||||||
|
if($user->isAdmin())
|
||||||
|
$editable = true;
|
||||||
|
else
|
||||||
|
$editable = false;
|
||||||
|
|
||||||
|
$this->view->events = Show::getFullCalendarEvents($start, $end, $editable);
|
||||||
|
}
|
||||||
|
|
||||||
public function moveShowAction()
|
public function moveShowAction()
|
||||||
{
|
{
|
||||||
$deltaDay = $this->_getParam('day');
|
$deltaDay = $this->_getParam('day');
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
<form id="add-show-form" method="post" action="">
|
|
||||||
<div id="schedule-add-show" class="tabs ui-widget ui-widget-content block-shadow alpha-block padded">
|
|
||||||
<div class="button-bar">
|
|
||||||
<button id="add-show-submit" class="right-floated">Add this show</button>
|
|
||||||
<button id="add-show-close" class="right-floated">Close</button>
|
|
||||||
</div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
<div id="schedule-show-what">
|
|
||||||
<?php echo $this->what ?>
|
|
||||||
</div>
|
|
||||||
<h3 class="collapsible-header"><span class="arrow-icon"></span>When</h3>
|
|
||||||
<div id="schedule-show-when" class="collapsible-content">
|
|
||||||
<?php echo $this->when ?>
|
|
||||||
<?php echo $this->repeats ?>
|
|
||||||
</div>
|
|
||||||
<h3 class="collapsible-header"><span class="arrow-icon"></span>Who</h3>
|
|
||||||
<div id="schedule-show-who" class="collapsible-content">
|
|
||||||
<?php echo $this->who ?>
|
|
||||||
</div>
|
|
||||||
<h3 class="collapsible-header"><span class="arrow-icon"></span>Style</h3>
|
|
||||||
<div id="schedule-show-style" class="collapsible-content">
|
|
||||||
<?php echo $this->style ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="fullcalendar_show_display" class="ui-widget-content block-shadow omega-block padded"></div>
|
|
||||||
|
|
|
@ -1 +1,27 @@
|
||||||
<div id='schedule_calendar' class="ui-widget-content block-shadow padded"></div>
|
<form id="add-show-form" method="post" action="" style="display:none;">
|
||||||
|
<div id="schedule-add-show" class="tabs ui-widget ui-widget-content block-shadow alpha-block padded">
|
||||||
|
<div class="button-bar">
|
||||||
|
<button id="add-show-submit" class="right-floated">Add this show</button>
|
||||||
|
<button id="add-show-close" class="right-floated">Close</button>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<div id="schedule-show-what">
|
||||||
|
<?php echo $this->what ?>
|
||||||
|
</div>
|
||||||
|
<h3 class="collapsible-header"><span class="arrow-icon"></span>When</h3>
|
||||||
|
<div id="schedule-show-when" class="collapsible-content">
|
||||||
|
<?php echo $this->when ?>
|
||||||
|
<?php echo $this->repeats ?>
|
||||||
|
</div>
|
||||||
|
<h3 class="collapsible-header"><span class="arrow-icon"></span>Who</h3>
|
||||||
|
<div id="schedule-show-who" class="collapsible-content">
|
||||||
|
<?php echo $this->who ?>
|
||||||
|
</div>
|
||||||
|
<h3 class="collapsible-header"><span class="arrow-icon"></span>Style</h3>
|
||||||
|
<div id="schedule-show-style" class="collapsible-content">
|
||||||
|
<?php echo $this->style ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id='schedule_calendar' class="ui-widget-content block-shadow padded omega-block"></div>
|
||||||
|
|
|
@ -778,7 +778,7 @@ dt.block-display, dd.block-display {
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
}
|
}
|
||||||
#schedule_calendar {
|
#schedule_calendar {
|
||||||
width:98.5%
|
width:98.5%;
|
||||||
}
|
}
|
||||||
div.ui-datepicker {
|
div.ui-datepicker {
|
||||||
/*font-size: 75%;*/
|
/*font-size: 75%;*/
|
||||||
|
|
|
@ -117,6 +117,11 @@ function setAddShowEvents() {
|
||||||
.click(function(event){
|
.click(function(event){
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
var y = $("#schedule_calendar").width();
|
||||||
|
var z = $("#schedule-add-show").width();
|
||||||
|
$("#schedule_calendar").width(y+z+50);
|
||||||
|
$("#schedule_calendar").fullCalendar('render');
|
||||||
$("#add-show-form").hide();
|
$("#add-show-form").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -130,33 +135,4 @@ function setAddShowEvents() {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
setAddShowEvents();
|
setAddShowEvents();
|
||||||
|
|
||||||
$("#fullcalendar_show_display").fullCalendar({
|
|
||||||
header: {
|
|
||||||
left: 'prev, next, today',
|
|
||||||
center: 'title',
|
|
||||||
right: 'agendaDay, agendaWeek, month'
|
|
||||||
},
|
|
||||||
defaultView: 'month',
|
|
||||||
editable: false,
|
|
||||||
allDaySlot: false,
|
|
||||||
axisFormat: 'H:mm',
|
|
||||||
timeFormat: {
|
|
||||||
agenda: 'H:mm{ - H:mm}',
|
|
||||||
month: 'H:mm{ - H:mm}'
|
|
||||||
},
|
|
||||||
|
|
||||||
events: getFullCalendarEvents,
|
|
||||||
|
|
||||||
//callbacks
|
|
||||||
eventRender: eventRender
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$(window).load(function() {
|
|
||||||
var mainHeight = document.documentElement.clientHeight - 200 - 50;
|
|
||||||
|
|
||||||
$('#fullcalendar_show_display').fullCalendar('option', 'contentHeight', mainHeight);
|
|
||||||
$('#fullcalendar_show_display').fullCalendar('render');
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,11 +28,11 @@ function viewDisplay( view ) {
|
||||||
var calendarEl = this;
|
var calendarEl = this;
|
||||||
|
|
||||||
var select = $('<select class="schedule_change_slots input_select"/>')
|
var select = $('<select class="schedule_change_slots input_select"/>')
|
||||||
.append('<option value="5">5 min</option>')
|
.append('<option value="5">5m</option>')
|
||||||
.append('<option value="10">10 min</option>')
|
.append('<option value="10">10m</option>')
|
||||||
.append('<option value="15">15 min</option>')
|
.append('<option value="15">15m</option>')
|
||||||
.append('<option value="30">30 min</option>')
|
.append('<option value="30">30m</option>')
|
||||||
.append('<option value="60">60 min</option>')
|
.append('<option value="60">60m</option>')
|
||||||
.change(function(){
|
.change(function(){
|
||||||
var x = $(this).val();
|
var x = $(this).val();
|
||||||
var opt = view.calendar.options;
|
var opt = view.calendar.options;
|
||||||
|
@ -56,10 +56,14 @@ function viewDisplay( view ) {
|
||||||
if($('.fc-header-left tbody td').length === 5) {
|
if($('.fc-header-left tbody td').length === 5) {
|
||||||
$('.fc-header-left tbody tr:first')
|
$('.fc-header-left tbody tr:first')
|
||||||
.append('<td><span class="fc-header-space"></span></td>')
|
.append('<td><span class="fc-header-space"></span></td>')
|
||||||
.append('<td><a href="#" class="add-button"><span class="add-icon"></span>Add Show</a></td>')
|
.append('<td><a href="#" class="add-button"><span class="add-icon"></span>Show</a></td>')
|
||||||
.find('td:last > a')
|
.find('td:last > a')
|
||||||
.click(function(){
|
.click(function(){
|
||||||
|
$("#add-show-form").show();
|
||||||
|
var y = $("#schedule_calendar").width();
|
||||||
|
var z = $("#schedule-add-show").width();
|
||||||
|
$("#schedule_calendar").width(y-z-50);
|
||||||
|
$("#schedule_calendar").fullCalendar('render');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue