summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
Diffstat (limited to 'application/views')
-rw-r--r--application/views/scripts/event/checkoverlapevents.phtml19
-rwxr-xr-xapplication/views/scripts/event/index.phtml15
2 files changed, 19 insertions, 15 deletions
diff --git a/application/views/scripts/event/checkoverlapevents.phtml b/application/views/scripts/event/checkoverlapevents.phtml
index 5ce631b..6558e19 100644
--- a/application/views/scripts/event/checkoverlapevents.phtml
+++ b/application/views/scripts/event/checkoverlapevents.phtml
@@ -3,29 +3,32 @@
//print_r($this->overlaps);
//$overlaps[] = array();
+
+
if(count($this->overlapswithrepeat) == 0) {
- echo -1;
+ $output['withrepeat'] = -1;
}
else {
- echo '<ul id="conflictEvents">';
+ $output['withrepeat'] = '<ul id="conflictEvents">';
foreach($this->overlapswithrepeat as $o){
- echo '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
+ $output['withrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
}
- echo '</ul>';
+ $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) {
- echo -1;
+ $output['withoutrepeat'] = -1;
}
else {
- echo '<ul id="conflictEvents">';
+ $output['withoutrepeat'] = '<ul id="conflictEvents">';
foreach($this->overlapswithoutrepeat as $o){
- echo '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
+ $output['withoutrepeat'] .= '<li>' . 'EventID: ' . $o['eventID'] . ', Title: ' . $o['title'] . ', Start: ' . $o['start'] . ', End: ' . $o['end'] . '</li>';
}
- echo '</ul>';
+ $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/index.phtml b/application/views/scripts/event/index.phtml
index d4da032..bbf7db7 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -432,17 +432,18 @@ var dayClick = false;
});
});
- $.get("/event/checkoverlapevents/eventID/" + event.id + "/date/" + event.start, function(checkoverlapeventsresult){
- var cell = document.getElementById("conflicts");
- cell.removeChild(cell.firstChild);
- $("#conflicts").append(checkoverlapeventsresult);
- alert(checkoverlapeventsresult.withrepeat + ' ' + checkoverlapeventsresult.withoutrepeat);
- if(checkoverlapeventsresult == -1) {
+ $.get("/event/checkoverlapevents/eventID/" + event.id + "/date/" + event.start, function(data){
+ //var cell = document.getElementById("conflicts");
+ //cell.removeChild(cell.firstChild);
+ //$("#conflicts").append(data);
+ var returndata = jQuery.parseJSON(data);
+ //alert(returndata.withrepeat + ' ' + returndata.withoutrepeat);
+ /*if(checkoverlapeventsresult == -1) {
isDroppable = true;
overlapevents = null;
} else {
isDroppable = false;
- }
+ }*/
if(event.repeat == 0 && event.immediate == 0 && $.get("/event/checkright/rightShortcut/er")) {
$(function() {