summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wagner2011-10-28 10:09:18 +0200
committerSebastian Wagner2011-10-28 10:09:18 +0200
commitecb2dbef0226c344adc9ce8622a5f26a818a337e (patch)
treed25e97a24c7bd20fcdb56819b7f41c4b9788aa87
parentjar (diff)
downloadpoolctrl-ecb2dbef0226c344adc9ce8622a5f26a818a337e.tar.gz
poolctrl-ecb2dbef0226c344adc9ce8622a5f26a818a337e.tar.xz
poolctrl-ecb2dbef0226c344adc9ce8622a5f26a818a337e.zip
some fixes
-rwxr-xr-xapplication/controllers/EventController.php14
-rwxr-xr-xapplication/views/scripts/event/checkoverlapdrop.phtml56
-rwxr-xr-xapplication/views/scripts/statistics/success.phtml4
3 files changed, 37 insertions, 37 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 57d8e65..f7754c8 100755
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -765,12 +765,14 @@ class EventController extends Zend_Controller_Action
$overlapswithrepeat = array();
$cfeventswithrepeat = array();
+
foreach($events['withrepeat'] as $e) {
- $evstartTime = intval(strtotime($e['start'])) + $diff;
- if($e['running'] == 0 && $e['repeat'] == 1 && $evstartTime < time()) {
- $this->view->past = true;
- return;
- }
+
+ $evstartTime = intval(strtotime($e['start'])) + $diff;
+ if($e['running'] == 0 && $e['repeat'] == 1 && $evstartTime < time()) {
+ $this->view->past = true;
+ }
+
$enewstart = date('Y-m-d H:i:s', strtotime($e['start']) + $diff);
$summertimeStart = intval(date('I', strtotime($e['start'])));
@@ -971,7 +973,7 @@ class EventController extends Zend_Controller_Action
$summertimeEnd = 1;
}
}
-
+
$cfv = true;
// overlap events
diff --git a/application/views/scripts/event/checkoverlapdrop.phtml b/application/views/scripts/event/checkoverlapdrop.phtml
index e1150d1..7e9ff28 100755
--- a/application/views/scripts/event/checkoverlapdrop.phtml
+++ b/application/views/scripts/event/checkoverlapdrop.phtml
@@ -1,43 +1,41 @@
<?php
if($this->past) {
$output['past'] = 1;
- $output['withoutrepeat'] = -1;
- $output['withrepeat'] = -1;
} else {
$output['past'] = 0;
- $output['cfevents'] = $this->cfeventswithrepeat;
+}
+$output['cfevents'] = $this->cfeventswithrepeat;
- // conflict free plot with repeat
- $output['cfplotwithrepeat'] = '<ul id="cfplot">';
- foreach($this->cfeventswithrepeat as $c){
- if(isset($c['end'])) {
- $output['cfplotwithrepeat'] .= '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . ', End: ' . $c['end'] . '</li>';
- } else {
- $output['cfplotwithrepeat'] .= '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . '</li>';
- }
+// conflict free plot with repeat
+$output['cfplotwithrepeat'] = '<ul id="cfplot">';
+foreach($this->cfeventswithrepeat as $c){
+ if(isset($c['end'])) {
+ $output['cfplotwithrepeat'] .= '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . ', End: ' . $c['end'] . '</li>';
+ } else {
+ $output['cfplotwithrepeat'] .= '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . '</li>';
}
- $output['cfplotwithrepeat'] .= '</ul>';
+}
+$output['cfplotwithrepeat'] .= '</ul>';
- // conflict plot with repeat
- if(count($this->overlapswithrepeat) == 0) {
- $output['withrepeat'] = -1;
- }
- else {
- $output['withrepeat'] = '<ul id="conflictEvents">';
- foreach($this->overlapswithrepeat as $o){
- if(isset($o['end'])) {
- $output['withrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
- } else {
- $output['withrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . '</li>';
- }
+// conflict plot with repeat
+if(count($this->overlapswithrepeat) == 0) {
+ $output['withrepeat'] = -1;
+}
+else {
+ $output['withrepeat'] = '<ul id="conflictEvents">';
+ foreach($this->overlapswithrepeat as $o){
+ if(isset($o['end'])) {
+ $output['withrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
+ } else {
+ $output['withrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . '</li>';
}
- $output['withrepeat'] .= '</ul>';
}
+ $output['withrepeat'] .= '</ul>';
+}
- // conflict plot without repeat
- if(count($this->overlapswithoutrepeat) == 0) {
- $output['withoutrepeat'] = -1;
- }
+// conflict plot without repeat
+if(count($this->overlapswithoutrepeat) == 0) {
+ $output['withoutrepeat'] = -1;
}
echo json_encode($output);
?> \ No newline at end of file
diff --git a/application/views/scripts/statistics/success.phtml b/application/views/scripts/statistics/success.phtml
index c12c636..8911033 100755
--- a/application/views/scripts/statistics/success.phtml
+++ b/application/views/scripts/statistics/success.phtml
@@ -76,7 +76,7 @@ function refreshPlot(dataBar, dataPieS, dataPieT, color) {
seriesColors: color
//legend: { show:true, location: 'e' }
});
- $('#plotPieT').empty();
+ /*$('#plotPieT').empty();
$.jqplot('plotPieT', dataPieT,
{
title: 'Chart with ErrorType Labels',
@@ -93,7 +93,7 @@ function refreshPlot(dataBar, dataPieS, dataPieT, color) {
},
seriesColors: color
//legend: { show:true, location: 'ne' }
- });
+ });*/
}
$(document).ready(function(){