summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
authorSebastian Wagner2011-10-26 14:53:53 +0200
committerSebastian Wagner2011-10-26 14:53:53 +0200
commit91318534af71553b80b022f39e3657e22e37dfb9 (patch)
treeb2fdd7ad644f63237b69c4f8c73ee52d3d942565 /application/views
parentsome bugfixes (diff)
downloadpoolctrl-91318534af71553b80b022f39e3657e22e37dfb9.tar.gz
poolctrl-91318534af71553b80b022f39e3657e22e37dfb9.tar.xz
poolctrl-91318534af71553b80b022f39e3657e22e37dfb9.zip
verschiedenes
Diffstat (limited to 'application/views')
-rw-r--r--application/views/scripts/event/checkoverlapdrop.phtml77
-rw-r--r--application/views/scripts/event/checkoverlapresize.phtml8
-rwxr-xr-xapplication/views/scripts/event/index.phtml7
3 files changed, 40 insertions, 52 deletions
diff --git a/application/views/scripts/event/checkoverlapdrop.phtml b/application/views/scripts/event/checkoverlapdrop.phtml
index b53c482..e1150d1 100644
--- a/application/views/scripts/event/checkoverlapdrop.phtml
+++ b/application/views/scripts/event/checkoverlapdrop.phtml
@@ -1,58 +1,43 @@
<?php
-$output['cfevents'] = $this->cfeventswithrepeat;
+if($this->past) {
+ $output['past'] = 1;
+ $output['withoutrepeat'] = -1;
+ $output['withrepeat'] = -1;
+} else {
+ $output['past'] = 0;
+ $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 free plot without repeat
-$output['cfplotwithoutrepeat'] = '<ul id="cfplot">';
-foreach($this->cfeventswithoutrepeat as $c){
- if(isset($c['end'])) {
- $output['cfplotwithoutrepeat'] .= '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . ', End: ' . $c['end'] . '</li>';
- } else {
- $output['cfplotwithoutrepeat'] .= '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . '</li>';
+ // conflict plot with repeat
+ if(count($this->overlapswithrepeat) == 0) {
+ $output['withrepeat'] = -1;
}
-}
-$output['cfplotwithoutrepeat'] .= '</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>';
+ 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;
-}
-else {
- $output['withoutrepeat'] = '<ul id="conflictEvents">';
- foreach($this->overlapswithoutrepeat as $o) {
- if(isset($o['end'])) {
- $output['withoutrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
- } else {
- $output['withoutrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . '</li>';
- }
+ // conflict plot without repeat
+ if(count($this->overlapswithoutrepeat) == 0) {
+ $output['withoutrepeat'] = -1;
}
- $output['withoutrepeat'] .= '</ul>';
}
echo json_encode($output);
?> \ No newline at end of file
diff --git a/application/views/scripts/event/checkoverlapresize.phtml b/application/views/scripts/event/checkoverlapresize.phtml
index 89b8499..21961ca 100644
--- a/application/views/scripts/event/checkoverlapresize.phtml
+++ b/application/views/scripts/event/checkoverlapresize.phtml
@@ -8,12 +8,12 @@ foreach($this->cfeventswithrepeat as $c){
}
$output['cfplotwithrepeat'] .= '</ul>';
-// conflict free plot without repeat
+/*// conflict free plot without repeat
$output['cfplotwithoutrepeat'] = '<ul id="cfplot">';
foreach($this->cfeventswithoutrepeat as $c){
$output['cfplotwithoutrepeat'] .= '<li>' . 'EventID: ' . $c['eventID'] . ', Title: ' . $c['title'] . ', Start: ' . $c['start'] . ', End: ' . $c['end'] . '</li>';
}
-$output['cfplotwithoutrepeat'] .= '</ul>';
+$output['cfplotwithoutrepeat'] .= '</ul>';*/
// conflict plot with repeat
if(count($this->overlapswithrepeat) == 0) {
@@ -35,7 +35,7 @@ else {
if(count($this->overlapswithoutrepeat) == 0) {
$output['withoutrepeat'] = -1;
}
-else {
+/*else {
$output['withoutrepeat'] = '<ul id="conflictEvents">';
foreach($this->overlapswithoutrepeat as $o){
if(isset($o['end'])) {
@@ -45,6 +45,6 @@ else {
}
}
$output['withoutrepeat'] .= '</ul>';
-}
+}*/
echo json_encode($output);
?> \ No newline at end of file
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index 9b23a55..7b8cfe7 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -547,6 +547,9 @@ var dayClick = false;
var cfcell = document.getElementById("cfevents");
// get conflicts
var returndata = jQuery.parseJSON(data);
+
+ // get past
+ var past = returndata.past;
// get conflict free events with repeat
var cfevents = returndata.cfevents;
@@ -562,7 +565,7 @@ var dayClick = false;
buttons: {
"Drop Conflict-Free Events": function() {
$(this).dialog("close");
- $.post("/event/eventmovecf/evmindelta/" + minuteDelta + "/evdaydelta/" + dayDelta + "/poolID/" + $("#poolselectbox option:selected").val() + "/cfevents/" + cfeventsString);
+ self.location="/event/eventmovecf/evmindelta/" + minuteDelta + "/evdaydelta/" + dayDelta + "/poolID/" + $("#poolselectbox option:selected").val() + "/cfevents/" + cfeventsString;
},
"OK": function() {
$(this).dialog("close");
@@ -666,7 +669,7 @@ var dayClick = false;
},
"Move all Events": function() {
if(returndata.withrepeat == -1) {
- if(event.start > currentDate) {
+ if(event.start > currentDate && !past) {
$(this).dialog("close");
self.location="/event/eventmoveall/eventTitle/" + event.title + "/evmindelta/" + minuteDelta + "/evdaydelta/" + dayDelta + "/poolID/" + $("#poolselectbox option:selected").val();
} else {