summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
authorSebastian Wagner2011-10-21 20:54:43 +0200
committerSebastian Wagner2011-10-21 20:54:43 +0200
commita0a342efa28584777af0d81dc5cdb71c2a078897 (patch)
treeb21047696191bbf3687c413639aca240db0b96c7 /application/views
parentoverlapping for resizing and selecting implemented (diff)
downloadpoolctrl-a0a342efa28584777af0d81dc5cdb71c2a078897.tar.gz
poolctrl-a0a342efa28584777af0d81dc5cdb71c2a078897.tar.xz
poolctrl-a0a342efa28584777af0d81dc5cdb71c2a078897.zip
some changes
Diffstat (limited to 'application/views')
-rw-r--r--application/views/scripts/event/checkoverlapdrop.phtml10
-rw-r--r--application/views/scripts/event/checkoverlapresize.phtml10
-rw-r--r--application/views/scripts/event/checkoverlapselect.phtml6
-rwxr-xr-xapplication/views/scripts/event/index.phtml74
4 files changed, 43 insertions, 57 deletions
diff --git a/application/views/scripts/event/checkoverlapdrop.phtml b/application/views/scripts/event/checkoverlapdrop.phtml
index 6558e19..1ca1b29 100644
--- a/application/views/scripts/event/checkoverlapdrop.phtml
+++ b/application/views/scripts/event/checkoverlapdrop.phtml
@@ -1,9 +1,5 @@
<?php
-// Output
-//print_r($this->overlaps);
-//$overlaps[] = array();
-
-
+$output['cfevents'] = $this->cfevents;
if(count($this->overlapswithrepeat) == 0) {
$output['withrepeat'] = -1;
@@ -14,8 +10,6 @@ else {
$output['withrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
}
$output['withrepeat'] .= '</ul>';
- // Echo contents of output, e.g. required values, such as title, date, etc.
- //echo json_encode($this->overlaps);
}
if(count($this->overlapswithoutrepeat) == 0) {
@@ -27,8 +21,6 @@ else {
$output['withoutrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
}
$output['withoutrepeat'] .= '</ul>';
- // Echo contents of output, e.g. required values, such as title, date, etc.
- //echo json_encode($this->overlaps);
}
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 05a7f42..4f0ad3d 100644
--- a/application/views/scripts/event/checkoverlapresize.phtml
+++ b/application/views/scripts/event/checkoverlapresize.phtml
@@ -1,9 +1,5 @@
<?php
-// Output
-//print_r($this->overlaps);
-//$overlaps[] = array();
-
-
+$output['cfevents'] = $this->cfevents;
if(count($this->overlapswithrepeat) == 0) {
$output['withrepeat'] = -1;
@@ -14,8 +10,6 @@ else {
$output['withrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
}
$output['withrepeat'] .= '</ul>';
- // Echo contents of output, e.g. required values, such as title, date, etc.
- //echo json_encode($this->overlaps);
}
if(count($this->overlapswithoutrepeat) == 0) {
@@ -27,8 +21,6 @@ else {
$output['withoutrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
}
$output['withoutrepeat'] .= '</ul>';
- // Echo contents of output, e.g. required values, such as title, date, etc.
- //echo json_encode($this->overlaps);
}
echo json_encode($output);
?> \ No newline at end of file
diff --git a/application/views/scripts/event/checkoverlapselect.phtml b/application/views/scripts/event/checkoverlapselect.phtml
index e6fc8c1..fa87193 100644
--- a/application/views/scripts/event/checkoverlapselect.phtml
+++ b/application/views/scripts/event/checkoverlapselect.phtml
@@ -1,8 +1,4 @@
<?php
-// Output
-//print_r($this->overlaps);
-//$overlaps[] = array();
-
if(count($this->overlaps) == 0) {
$output = -1;
}
@@ -12,8 +8,6 @@ else {
$output .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
}
$output .= '</ul>';
- // Echo contents of output, e.g. required values, such as title, date, etc.
- //echo json_encode($this->overlaps);
}
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 5b9e352..e14887c 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -378,33 +378,39 @@ var dayClick = false;
eventResize: function( event, dayDelta, minuteDelta, revertFunc ) {
- //initialize eventNotDroppableDialog Dialog
- $(function() {
- $( "#eventNotDroppableDialog" ).dialog({
- autoOpen: false,
- width: 820,
- modal: true,
- title: 'Resizing of ' + event.title + ' is not possible!',
- buttons: {
- "OK": function() {
- $(this).dialog("close");
- revertFunc();
- }
- },
- open: function () {
- $("#accordion").accordion({clearStyle: true, collapsible: true, active: 1, autoHeight: true });
- $(".ui-dialog-titlebar-close").hide();
- $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").addClass("ui-state-error");
- }
- });
- });
-
$.get("/event/checkoverlapresize/eventID/" + event.id + "/minuteDelta/" + minuteDelta + "/dayDelta/" + dayDelta, function(data){
- // get conflicts-HTML Element
- var cell = document.getElementById("conflicts");
- // get conflicts
- var returndata = jQuery.parseJSON(data);
+ // get conflicts-HTML Element
+ var cell = document.getElementById("conflicts");
+ // get conflicts
+ var returndata = jQuery.parseJSON(data);
+ // get conflict free events
+ var cfevents = data['cfevents'];
+
+ //initialize eventNotDroppableDialog Dialog
+ $(function() {
+ $( "#eventNotDroppableDialog" ).dialog({
+ autoOpen: false,
+ width: 820,
+ modal: true,
+ title: 'Resizing of ' + event.title + ' is not possible!',
+ buttons: {
+ "Resolve Conflicts": function() {
+ $(this).dialog("close");
+ self.location="/event/eventresizeall/eventTitle/" + event.title + "/evmindelta/" + minuteDelta + "/poolID/" + $("#poolselectbox option:selected").val() + "/cfevents/" + cfevents;
+ },
+ "OK": function() {
+ $(this).dialog("close");
+ revertFunc();
+ }
+ },
+ open: function () {
+ $("#accordion").accordion({clearStyle: true, collapsible: true, active: 1, autoHeight: true });
+ $(".ui-dialog-titlebar-close").hide();
+ $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").addClass("ui-state-error");
+ }
+ });
+ });
if($.get("/event/checkright/rightShortcut/er")) {
if(event.repeat == 0) {
@@ -429,7 +435,7 @@ var dayClick = false;
$("#conflicts").append(returndata.withoutrepeat);
$( "#eventNotDroppableDialog" ).dialog('open');
}
- }
+ }
},
open: function () {
$(".ui-dialog-titlebar-close").hide();
@@ -493,6 +499,15 @@ var dayClick = false;
eventDrop: function( event, dayDelta, minuteDelta, allDay, revertFunc ) {
+ $.get("/event/checkoverlapdrop/poolID/" + $("#poolselectbox option:selected").val() + "/eventID/" + event.id + "/date/" + event.start, function(data){
+
+ // get conflicts-HTML Element
+ var cell = document.getElementById("conflicts");
+ // get conflicts
+ var returndata = jQuery.parseJSON(data);
+ // get conflict free events
+ var cfevents = data['cfevents'];
+
//initialize eventNotDroppableDialog Dialog
$(function() {
$( "#eventNotDroppableDialog" ).dialog({
@@ -514,13 +529,6 @@ var dayClick = false;
});
});
- $.get("/event/checkoverlapdrop/poolID/" + $("#poolselectbox option:selected").val() + "/eventID/" + event.id + "/date/" + event.start, function(data){
-
- // get conflicts-HTML Element
- var cell = document.getElementById("conflicts");
- // get conflicts
- var returndata = jQuery.parseJSON(data);
-
if(event.repeat == 0 && event.immediate == 0 && $.get("/event/checkright/rightShortcut/er")) {
$(function() {
$( "#defaultDialog" ).dialog({