CC-3193: context menu "Delete This Instance and All Following" doesn't make sense when appearing on a non-repeating show

Fixed by checking if the show is a repeating show.
This commit is contained in:
Yuchen Wang 2011-12-14 10:12:17 -05:00
parent 29254d49d3
commit 7542d86b94
1 changed files with 8 additions and 6 deletions

View File

@ -246,10 +246,12 @@ class ScheduleController extends Zend_Controller_Action
'callback' => 'window["beginEditShow"]'), 'title' => 'Edit Show'); 'callback' => 'window["beginEditShow"]'), 'title' => 'Edit Show');
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/delete-show'.$params, $menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/delete-show'.$params,
'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Delete This Instance'); 'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Delete This Instance');
if ($show->getShow()->isRepeating()) {
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/cancel-show'.$params, $menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/cancel-show'.$params,
'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Delete This Instance and All Following'); 'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Delete This Instance and All Following');
} }
} }
}
//returns format jjmenu is looking for. //returns format jjmenu is looking for.
die(json_encode($menu)); die(json_encode($menu));