Merge branch 'master' of dev.sourcefabric.org:airtime

This commit is contained in:
martin 2011-02-07 00:27:26 -05:00
commit 1631525f98
2 changed files with 13 additions and 1 deletions

View File

@ -295,6 +295,12 @@ class ScheduleController extends Zend_Controller_Action
$show = new ShowInstance($showInstanceId);
$start_timestamp = $show->getShowStart();
$end_timestamp = $show->getShowEnd();
//check to make sure show doesn't overlap.
if(Show::getShows($start_timestamp, $end_timestamp, array($showInstanceId))) {
$this->view->error = "cannot schedule an overlapping show.";
return;
}
$start = explode(" ", $start_timestamp);
$end = explode(" ", $end_timestamp);

View File

@ -165,8 +165,14 @@ function buildContentDialog(json){
}
function buildScheduleDialog(json){
var dialog = $(json.dialog);
var dialog;
if(json.error) {
alert(json.error);
return;
}
dialog = $(json.dialog);
makeScheduleDialog(dialog, json);
dialog.dialog({