diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index 14b8f61d8..e1d97fe65 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -180,7 +180,7 @@ class ScheduleController extends Zend_Controller_Action $user = new User($userInfo->id); $show = new ShowInstance($showInstanceId); - if($user->isHost($show->getShowId())) { + if($user->isHost($show->getShowId()) || $user->isAdmin()) { $show->scheduleShow(array($plId)); } @@ -199,7 +199,7 @@ class ScheduleController extends Zend_Controller_Action $user = new User($userInfo->id); $show = new ShowInstance($showInstanceId); - if($user->isHost($show->getShowId())) + if($user->isHost($show->getShowId()) || $user->isAdmin()) $show->clearShow(); } @@ -229,7 +229,7 @@ class ScheduleController extends Zend_Controller_Action $user = new User($userInfo->id); $show = new ShowInstance($showInstanceId); - if($user->isHost($show->getShowId())) { + if($user->isHost($show->getShowId()) || $user->isAdmin()) { $show->removeGroupFromShow($group_id); } diff --git a/public/js/airtime/schedule/add-show.js b/public/js/airtime/schedule/add-show.js index fb6b12b90..161e0c262 100644 --- a/public/js/airtime/schedule/add-show.js +++ b/public/js/airtime/schedule/add-show.js @@ -130,6 +130,7 @@ function setAddShowEvents() { $("#schedule_calendar").width(y+z+50); $("#schedule_calendar").fullCalendar('render'); $("#add-show-form").hide(); + makeAddShowButton(); }); form.find("#add-show-submit") diff --git a/public/js/airtime/schedule/full-calendar-functions.js b/public/js/airtime/schedule/full-calendar-functions.js index 0033469ad..60d85e927 100644 --- a/public/js/airtime/schedule/full-calendar-functions.js +++ b/public/js/airtime/schedule/full-calendar-functions.js @@ -4,17 +4,24 @@ * */ +function openAddShowForm() { + + if(($("#add-show-form").length == 1) && ($("#add-show-form").css('display')=='none')) { + $("#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'); + } +} + function makeAddShowButton(){ $('.fc-header-left tbody tr:first') .append('