summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wagner2011-10-27 10:46:55 +0200
committerSebastian Wagner2011-10-27 10:46:55 +0200
commit78090f3a461c819a1d24b2494a7e30d241833b01 (patch)
tree54d20e66e4eb9685955c6c2a2cddcbd55e154276
parentbugfix (diff)
downloadpoolctrl-78090f3a461c819a1d24b2494a7e30d241833b01.tar.gz
poolctrl-78090f3a461c819a1d24b2494a7e30d241833b01.tar.xz
poolctrl-78090f3a461c819a1d24b2494a7e30d241833b01.zip
bugfix
-rwxr-xr-xapplication/controllers/EventController.php4
-rwxr-xr-xapplication/views/scripts/event/index.phtml31
-rwxr-xr-xpublic/media/js/script.js11
3 files changed, 44 insertions, 2 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 0cb4954..a236817 100755
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -324,10 +324,10 @@ class EventController extends Zend_Controller_Action
$this->_redirect('/');
}
}
- if($event->getPbs_bootmenuID()) {
+ if($event->getPbs_bootmenuID() && $event->getRepeat() == 0) {
$bootmenuApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletebootmenu'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "bootmenuid=" . $event->getPbs_bootmenuID());
}
- if($event->getPbs_filterID()) {
+ if($event->getPbs_filterID() && $event->getRepeat() != 1) {
$filterApiResult = PostToHost($this->pbs2host, $this->config['pbs2']['deletefilter'] . $this->userIDsNamespace['apikey'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'poolctrl', "filterid=" . $event->getPbs_filterID());
}
try {
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index 2741421..7056e80 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -96,6 +96,12 @@ var dayClick = false;
$('#calendar').fullCalendar("addEventSource", "/event/eventlist/poolID/" + poolID);
}
+ $(window).load(function() {
+ var formularOverlappVar = getOverlappingVar();
+ if(formularOverlappVar == 1) {
+ $( "#formularOverlappingDialog" ).dialog('open');}
+ });
+
/*
* KEYDOWN FUNCTION
* delete selected event by key del(8) OR entf(46)
@@ -998,6 +1004,25 @@ var dayClick = false;
});
});
+//initialize formularOverlappingDialog Dialog
+ $(function() {
+ $( "#formularOverlappingDialog" ).dialog({
+ autoOpen: false,
+ width: 600,
+ modal: true,
+ title: "ERROR",
+ buttons: {
+ "OK": function() {
+ $(this).dialog("close");
+ }
+ },
+ open: function () {
+ $(".ui-dialog-titlebar-close").hide();
+ $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").addClass("ui-state-error");
+ }
+ });
+ });
+
</script>
<!-- DIALOG WINDOWS -->
@@ -1081,6 +1106,12 @@ between two events.</p>
<p>Please choose another position</p>
</div>
+<!-- formularOverlapping Dialog -->
+<div id="formularOverlappingDialog" style="display: none">
+<p>There exists at least one collision between your Events!</p>
+<p>Please choose another position and try again.</p>
+</div>
+
<!-- errorEditImmediate -->
<div id="errorEditImmediate" style="display: none">
<p>You canĀ“t edit an Immediate-Event!</p>
diff --git a/public/media/js/script.js b/public/media/js/script.js
index a002dd2..1829d34 100755
--- a/public/media/js/script.js
+++ b/public/media/js/script.js
@@ -283,4 +283,15 @@ function bootosfieldChanged(name, bootosIDs) {
disableElement("pbs_configID_" + id);
}
}
+}
+
+function getOverlappingVar() {
+ if (window.location.href.search(/overlapping/) >= 0) {
+ index = window.location.href.indexOf('/overlapping/') + 13;
+ end = index + 1;
+ substring = window.location.href.substring(index, end);
+ return substring;
+ } else {
+ return 0;
+ }
} \ No newline at end of file