add show ability is now presented as a screen rather than in a dialog.

This commit is contained in:
Naomi 2011-01-24 17:26:43 -05:00
parent 5173674714
commit 3cd5444f49
10 changed files with 363 additions and 344 deletions

View file

@ -56,7 +56,16 @@ $pages = array(
'module' => 'default',
'controller' => 'Schedule',
'action' => 'index',
'resource' => 'schedule'
'resource' => 'schedule',
'pages' => array(
array(
'label' => 'Add Show',
'module' => 'default',
'controller' => 'Schedule',
'action' => 'add-show-dialog',
'resource' => 'schedule'
)
)
),
array(
'label' => 'Logout',

View file

@ -33,15 +33,12 @@ class ScheduleController extends Zend_Controller_Action
{
$this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.js','text/javascript');
$this->view->headScript()->appendFile('/js/contextmenu/jquery.contextMenu.js','text/javascript');
$this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
$this->view->headScript()->appendFile('/js/colorpicker/js/colorpicker.js','text/javascript');
//$this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.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/jquery.contextMenu.css');
$this->view->headLink()->appendStylesheet('/css/fullcalendar.css');
$this->view->headLink()->appendStylesheet('/css/colorpicker/css/colorpicker.css');
$this->view->headLink()->appendStylesheet('/css/schedule.css');
@ -76,6 +73,15 @@ class ScheduleController extends Zend_Controller_Action
public function addShowDialogAction()
{
$this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.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->headLink()->appendStylesheet('/css/fullcalendar.css');
$this->view->headLink()->appendStylesheet('/css/colorpicker/css/colorpicker.css');
$this->view->headLink()->appendStylesheet('/css/add-show.css');
$request = $this->getRequest();
$formWhat = new Application_Form_AddShowWhat();
$formWhat->removeDecorator('DtDdWrapper');
@ -87,18 +93,18 @@ class ScheduleController extends Zend_Controller_Action
$formRepeats->removeDecorator('DtDdWrapper');
$formStyle = new Application_Form_AddShowStyle();
$formStyle->removeDecorator('DtDdWrapper');
$this->view->what = $formWhat;
$this->view->when = $formWhen;
$this->view->repeats = $formRepeats;
$this->view->who = $formWho;
$this->view->style = $formStyle;
if ($request->isPost()) {
$data = $request->getPost();
if ($formStyle->isValid($data) && $formWhen->isValid($data) && $formWho->isValid($data) && $formStyle->isValid($data)) {
$what = $formWhat->isValid($data);
$when = $formWhen->isValid($data);
$repeats = $formRepeats->isValid($data);
$who = $formWho->isValid($data);
$style = $formStyle->isValid($data);
if ($what && $when && $repeats && $who && $style) {
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
@ -107,15 +113,18 @@ class ScheduleController extends Zend_Controller_Action
if(isset($overlap)) {
$this->view->overlap = $overlap;
$this->view->form = $this->view->render('schedule/add-show-dialog.phtml');
}
return;
}
else {
$this->_redirect('Schedule');
}
}
}
$this->view->content = $this->view->render('schedule/add-show-dialog.phtml');
$this->view->hosts = User::getHosts();
$this->view->what = $formWhat;
$this->view->when = $formWhen;
$this->view->repeats = $formRepeats;
$this->view->who = $formWho;
$this->view->style = $formStyle;
}
public function moveShowAction()

View file

@ -1,24 +1,34 @@
<form>
<div id="tabs">
<ul>
<li><a href="#schedule-show-what"><span>What</span></a></li>
<li><a href="#schedule-show-when"><span>When</span></a></li>
<li><a href="#schedule-show-who"><span>Who</span></a></li>
<li><a href="#schedule-show-style"><span>Style</span></a></li>
</ul>
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<div id="schedule-show-when">
<div id="show_overlap_error"/>
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<div id="schedule-show-who">
<?php echo $this->who ?>
</div>
<div id="schedule-show-style">
<?php echo $this->style ?>
</div>
<div id="schedule-add-show">
<form method="post" action="">
<div id="schedule-add-show-tabs">
<ul>
<li><a href="#schedule-show-what"><span>What</span></a></li>
<li><a href="#schedule-show-when"><span>When</span></a></li>
<li><a href="#schedule-show-who"><span>Who</span></a></li>
<li><a href="#schedule-show-style"><span>Style</span></a></li>
</ul>
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<div id="schedule-show-when">
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<div id="schedule-show-who">
<?php echo $this->who ?>
</div>
<div id="schedule-show-style">
<?php echo $this->style ?>
</div>
</div>
</form>
<button id="add-show-submit">Add</button>
</div>
<div id="fullcalendar_show_display"></div>
<div id="schedule-add-show-overlap">
<?php if(isset($this->overlap)) : ?>
<div>Overlap</div>
<?php echo $this->partialLoop('schedule/show-overlap.phtml', $this->overlap); ?>
<?php endif;?>
</div>
</form>

View file

@ -1,4 +1,3 @@
<div><span id='schedule_add_show'>Add Show</span></div>
<div id='schedule_calendar'></div>
<ul id="schedule_event_default_menu" class="contextMenu">

View file

@ -0,0 +1,4 @@
<div>
<span><?php echo $this->name ?></span>
<span><?php echo $this->start_time ?></span>-<span><?php echo $this->end_time ?></span>
</div>