diff --git a/.zfproject.xml b/.zfproject.xml index 358200d6b..3fd80e818 100644 --- a/.zfproject.xml +++ b/.zfproject.xml @@ -56,7 +56,6 @@ - @@ -215,9 +214,6 @@ - - - diff --git a/application/configs/navigation.php b/application/configs/navigation.php index 795f97dea..2fcb3c707 100644 --- a/application/configs/navigation.php +++ b/application/configs/navigation.php @@ -17,23 +17,10 @@ $pages = array( ), array( 'label' => 'Schedule', - 'uri' => 'javascript:void(null)', - 'pages' => array( - array( - 'label' => 'View', - 'module' => 'default', - 'controller' => 'Schedule', - 'action' => 'index', - 'resource' => 'schedule' - ), - array( - 'label' => 'Add Show', - 'module' => 'default', - 'controller' => 'Schedule', - 'action' => 'add-show-dialog', - 'resource' => 'schedule' - ) - ) + 'module' => 'default', + 'controller' => 'Schedule', + 'action' => 'index', + 'resource' => 'schedule' ), array( 'label' => 'Playlist Builder', diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index a6792d84a..939dcc189 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -30,39 +30,14 @@ class ScheduleController extends Zend_Controller_Action 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/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/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/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/schedule.js','text/javascript'); $this->view->headLink()->appendStylesheet('/css/jquery-ui-timepicker.css'); $this->view->headLink()->appendStylesheet('/css/fullcalendar.css'); @@ -121,6 +96,21 @@ class ScheduleController extends Zend_Controller_Action $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() { $deltaDay = $this->_getParam('day'); diff --git a/application/views/scripts/schedule/add-show-dialog.phtml b/application/views/scripts/schedule/add-show-dialog.phtml deleted file mode 100644 index b1c44eb1b..000000000 --- a/application/views/scripts/schedule/add-show-dialog.phtml +++ /dev/null @@ -1,28 +0,0 @@ -
-
-
- - -
-
-
- what ?> -
-

When

-
- when ?> - repeats ?> -
-

Who

-
- who ?> -
-

Style

-
- style ?> -
-
-
- -
- diff --git a/application/views/scripts/schedule/index.phtml b/application/views/scripts/schedule/index.phtml index 9f43c06f8..be67d9afc 100644 --- a/application/views/scripts/schedule/index.phtml +++ b/application/views/scripts/schedule/index.phtml @@ -1 +1,27 @@ -
+ + +
diff --git a/public/css/styles.css b/public/css/styles.css index b60b309ad..9d980b381 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -778,7 +778,7 @@ dt.block-display, dd.block-display { font-weight:normal; } #schedule_calendar { - width:98.5% + width:98.5%; } div.ui-datepicker { /*font-size: 75%;*/ diff --git a/public/js/airtime/schedule/add-show.js b/public/js/airtime/schedule/add-show.js index 0dc2df882..d0fb0e2b2 100644 --- a/public/js/airtime/schedule/add-show.js +++ b/public/js/airtime/schedule/add-show.js @@ -117,6 +117,11 @@ function setAddShowEvents() { .click(function(event){ event.stopPropagation(); 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(); }); @@ -130,33 +135,4 @@ function setAddShowEvents() { $(document).ready(function() { 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'); }); diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index 369577ed7..9c1d1f4ac 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -28,11 +28,11 @@ function viewDisplay( view ) { var calendarEl = this; var select = $('