summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorSebastian Wagner2011-09-08 16:12:42 +0200
committerSebastian Wagner2011-09-08 16:12:42 +0200
commit08a7028bb43c7def9fb6574b39c1a2af87fa8639 (patch)
tree3968b129f9d57e2e67a6bdf9b0fcde08bc32aca7 /application
parentclean up (diff)
parentverschiedenes (diff)
downloadpoolctrl-08a7028bb43c7def9fb6574b39c1a2af87fa8639.tar.gz
poolctrl-08a7028bb43c7def9fb6574b39c1a2af87fa8639.tar.xz
poolctrl-08a7028bb43c7def9fb6574b39c1a2af87fa8639.zip
Merge branch 'master' of git.openslx.org:lsfks/projekte/poolctrl
Diffstat (limited to 'application')
-rw-r--r--application/Bootstrap.php5
-rw-r--r--application/controllers/EventController.php11
-rw-r--r--application/forms/EventAdd.php5
-rw-r--r--application/forms/EventEdit.php23
4 files changed, 19 insertions, 25 deletions
diff --git a/application/Bootstrap.php b/application/Bootstrap.php
index 0f62350..6a13af5 100644
--- a/application/Bootstrap.php
+++ b/application/Bootstrap.php
@@ -51,15 +51,16 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
$this->bootstrap('layout');
-
+
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->doctype('XHTML1_STRICT');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8');
$view->headLink()->appendStylesheet('/media/css/jquery-ui-1.8.16.custom.css');
$view->headLink()->appendStylesheet('/media/css/jquery-ui-timepicker.css');
+ $view->headLink()->appendStylesheet('/media/css/fullcalendar.css');
$view->headLink()->appendStylesheet('/media/css/style.css');
-
+
$view->headTitle('poolctrl')
->setSeparator(' :: ');
Zend_Registry::set('dateformat' , 'Y-m-d H:i:s');
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 5f8ea47..6f014fe 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -420,6 +420,9 @@ class EventController extends Zend_Controller_Action
if($this->getRequest()->getParam('end')) {
$this->getRequest()->setParam('end', date ('Y-m-d H:i', strtotime($this->getRequest()->getParam('end'))));
}
+ if($this->getRequest()->getParam('repeatEnd')) {
+ $this->getRequest()->setParam('repeatEnd', date ('Y-m-d H:i', strtotime($this->getRequest()->getParam('repeatEnd'))));
+ }
if($event->getPbs_bootmenuID()) {
$bootmenuApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletebootmenu'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_bootmenuID());
unset($bootmenuApiResult);
@@ -493,9 +496,13 @@ class EventController extends Zend_Controller_Action
$this->getRequest()->setParam('title', $event->getTitle());
$this->getRequest()->setParam('immediate', $event->getImmediate());
$this->getRequest()->setParam('start', $event->getStart());
- $this->getRequest()->setParam('end', $event->getEnd());
+ if($event->getEnd()) {
+ $this->getRequest()->setParam('end', $event->getEnd());
+ }
$this->getRequest()->setParam('repeat', $event->getRepeat());
- $this->getRequest()->setParam('repeatEnd', $event->getRepeatEnd());
+ if($event->getRepeatEnd()) {
+ $this->getRequest()->setParam('repeatEnd', $event->getRepeatEnd());
+ }
$this->getRequest()->setParam('participants', $event->getParticipants());
$this->getRequest()->setParam('category', $event->getCategory());
$this->getRequest()->setParam('note', $event->getNote());
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index 9f0a78d..8d10686 100644
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -96,7 +96,7 @@ class Application_Form_EventAdd extends Zend_Form
}
$eventcategoryfield->setRegisterInArrayValidator(false);
- $eventcategoryfield->setAttrib('onchange', "eventcategoryfieldChanged('category');");
+ $eventcategoryfield->setAttrib('onchange', "addeventcategoryfieldChanged('category');");
if(isset($this->defaultEventCategoryID)) {
$eventcategoryfield->setValue($this->defaultEventCategoryID);
}
@@ -214,8 +214,7 @@ class Application_Form_EventAdd extends Zend_Form
));
echo '<script type="text/javascript">
- repeatChanged("repeat");
- eventcategoryfieldChanged("category");
+ addeventcategoryfieldChanged("category");
$(function() {
$("#start").datetimepicker();
$("#end").datetimepicker();
diff --git a/application/forms/EventEdit.php b/application/forms/EventEdit.php
index b49b8f9..fb3faa3 100644
--- a/application/forms/EventEdit.php
+++ b/application/forms/EventEdit.php
@@ -71,7 +71,7 @@ class Application_Form_EventEdit extends Zend_Form
$eventcategoryfield->setRegisterInArrayValidator(false);
$eventcategoryfield->setValue($this->params['category']);
- $eventcategoryfield->setAttrib('onchange', "eventcategoryfieldChanged('category');");
+ $eventcategoryfield->setAttrib('onchange', "editeventcategoryfieldChanged('category');");
$this->addElement($eventcategoryfield);
$this->addElement('text', 'title', array(
@@ -131,8 +131,9 @@ class Application_Form_EventEdit extends Zend_Form
array('Date', false, array('format' => 'mm/dd/yyyy H:i')),
array('DateGreaterThan', false, array('element' => 'End', 'compare' => 'Start', 'min' => $this->getElement('start')->getValue())),
),
- 'required' => false,
- 'label' => 'End:',
+ 'required' => false,
+ 'label' => 'End:',
+ 'value' => 'mm/dd/yyyy H:min',
));
$this->getElement('end')->addPrefixPath('Poolctrl_Validate', 'Poolctrl/Validator/', 'validate');
}
@@ -186,19 +187,6 @@ class Application_Form_EventEdit extends Zend_Form
'value' => $this->params['participants'],
));
- $eventcategoryfield = new Zend_Form_Element_Select('category');
- $eventcategoryfield ->setLabel('Category:');
-
- if(count($this->eventcategorylist)>0){
- foreach($this->eventcategorylist as $category => $c){
- $eventcategoryfield->addMultiOption($c->getID(), $c->getTitle());
- }
- }
-
- $eventcategoryfield->setRegisterInArrayValidator(false);
- $eventcategoryfield->setValue( $this->params['category']);
- $this->addElement($eventcategoryfield);
-
$this->addElement('text', 'note', array(
'filters' => array('StringTrim'),
'validators' => array(
@@ -249,8 +237,7 @@ class Application_Form_EventEdit extends Zend_Form
));
echo '<script type="text/javascript">
- repeatChanged("repeat");
- eventcategoryfieldChanged("category");
+ editeventcategoryfieldChanged("category");
$(function() {
$("#start").datetimepicker();
$("#end").datetimepicker();