summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorSebastian Wagner2011-09-08 14:28:20 +0200
committerSebastian Wagner2011-09-08 14:28:20 +0200
commitb9abd94c63abc9eeb4806eaa03ba377a519252de (patch)
treece7dc85cd51c8911f904caa0eca5ab90614d8d3f /application
parentMerge branch 'master' of git.openslx.org:lsfks/projekte/poolctrl (diff)
downloadpoolctrl-b9abd94c63abc9eeb4806eaa03ba377a519252de.tar.gz
poolctrl-b9abd94c63abc9eeb4806eaa03ba377a519252de.tar.xz
poolctrl-b9abd94c63abc9eeb4806eaa03ba377a519252de.zip
some changes
Diffstat (limited to 'application')
-rw-r--r--application/controllers/EventController.php20
-rw-r--r--application/views/scripts/event/index.phtml6
2 files changed, 13 insertions, 13 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 5a5e92e..813be9b 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -225,16 +225,12 @@ class EventController extends Zend_Controller_Action
}
}
$add = $this->getRequest()->getParam("add");
- if($this->getRequest()->getParam('evstart')) {
- $evstart = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('evstart'), 0, 24)));
- } else if($this->getRequest()->getParam('start')) {
- $evstart = $this->getRequest()->getParam('start');
- }
- if($this->getRequest()->getParam('evend')) {
- $evend = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('evend'), 0, 24)));
- } else if($this->getRequest()->getParam('end')) {
- $evend = $this->getRequest()->getParam('end');
- }
+ if($this->getRequest()->getParam('start')) {
+ $start = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('start'), 0, 24)));
+ } else {$start = 'mm/dd/yyyy H:min';}
+ if($this->getRequest()->getParam('end')) {
+ $end = date ('m/d/Y H:i', strtotime(substr($this->getRequest()->getParam('end'), 0, 24)));
+ } else {$end = 'mm/dd/yyyy H:min';}
if (!isset($add)){
$defaultEventCategory = $this->config['event']['category']['default'];
foreach($eventcategorylist as $eventcategory) {
@@ -243,9 +239,9 @@ class EventController extends Zend_Controller_Action
break;
}
}
- $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $evstart, 'end' => $evend, 'defaultEventCategoryID' => $defaultEventCategoryID));
+ $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $start, 'end' => $end, 'defaultEventCategoryID' => $defaultEventCategoryID));
} else {
- $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $evstart, 'end' => $evend, $this->getRequest()->getParams()));
+ $addForm = new Application_Form_EventAdd(array('eventcategorylist' => $eventcategorylist, 'bootoslist' => $bootoslist, 'poollist' => $poollist, 'start' => $start, 'end' => $end, $this->getRequest()->getParams()));
if ($addForm->isValid($this->getRequest()->getParams())) {
$startTimestamp = strtotime($this->getRequest()->getParam('start'));
$this->getRequest()->setParam('start', date ('Y-m-d H:i', $startTimestamp));
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index 473bbc5..b71011e 100644
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -112,7 +112,11 @@ var lastview;
}
});
return false;
+
/*
+ *
+ * TO DO: Selection eines Events per Klick sichtbar machen
+ *
if(event.color == 'red') {
event.color = 'rgb(112,0,0)';
}else if(event.color == 'green') {
@@ -129,7 +133,7 @@ var lastview;
if (!confirm("Are you sure to add an Event from " + startDate + " to " + endDate + " ?")) {
$('#calendar').fullCalendar( 'unselect' );
}else {
- self.location="/event/add/evstart/" + startDate + "/evend/" + endDate;
+ self.location="/event/add/start/" + startDate + "/end/" + endDate;
}
},