summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
authorsebastian wagner2011-10-16 21:35:31 +0200
committersebastian wagner2011-10-16 21:35:31 +0200
commitf5b010ad6e8eecfe9f75df11c657ec78724821c1 (patch)
tree17bdf0681fd0844c50cb820e05cf5392173c4cb9 /application/views
parentcontrollerWorker.jar update (diff)
downloadpoolctrl-f5b010ad6e8eecfe9f75df11c657ec78724821c1.tar.gz
poolctrl-f5b010ad6e8eecfe9f75df11c657ec78724821c1.tar.xz
poolctrl-f5b010ad6e8eecfe9f75df11c657ec78724821c1.zip
conflict dialog
Diffstat (limited to 'application/views')
-rwxr-xr-xapplication/views/scripts/event/index.phtml66
1 files changed, 53 insertions, 13 deletions
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index b3e2146..2a6757c 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -473,7 +473,7 @@ var dayClick = false;
});
$( "#eventMoveWdhDialog" ).dialog('open');
$(this).qtip("destroy");
- } else if ($.get("/event/checkright/rightShortcut/er")){
+ } else if (isDroppable && $.get("/event/checkright/rightShortcut/er")){
$(function() {
$( "#eventImmediateButtonDialog" ).dialog({
autoOpen: false,
@@ -483,6 +483,8 @@ var dayClick = false;
buttons: {
"OK": function() {
$(this).dialog("close");
+ $(this).qtip("destroy");
+ revertFunc();
}
},
open: function () {
@@ -492,13 +494,34 @@ var dayClick = false;
});
});
$("#eventImmediateButtonDialog").dialog('open');
- $(this).qtip("destroy");
- revertFunc();
+ } else if (isDroppable == false && $.get("/event/checkright/rightShortcut/er")) {
+ //initialize eventNotDroppableDialog Dialog
+ $(function() {
+ $( "#eventNotDroppableDialog" ).dialog({
+ autoOpen: false,
+ width: 600,
+ modal: true,
+ title: 'Dropping of' + event.title + 'is not possible!',
+ buttons: {
+ "OK": function() {
+ $(this).dialog("close");
+ $(this).qtip("destroy");
+ revertFunc();
+ }
+ },
+ open: function () {
+ $("#accordion").accordion({collapsible: true, active: 1, autoHeight: true });
+ $(".ui-dialog-titlebar-close").hide();
+ $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").addClass("ui-state-error");
+ }
+ });
+ });
+ $( "#eventNotDroppableDialog" ).dialog('open');
} else {
revertFunc();
$(this).qtip("destroy");
}
- $(this).qtip("destroy");
+ $(this).qtip("destroy");
},
eventDragStart: function( event, jsEvent, ui, view ) {
@@ -508,12 +531,15 @@ var dayClick = false;
},
eventDragStop: function(event, jsEvent, ui, view, date) {
- //var date = $('#calendar').fullCalendar('getDate');
- //alert(date);
- /*
- if() {
- isDroppable = false;
- } else isDroppable = true;
+ /*
+ //alert(date);
+ overlapevents = $.get("/event/checkoverlapevents/eventID/" + event.id + "/date/" + date);
+ if(overlapevents) {
+ isDroppable = false;
+ } else {
+ isDroppable = true;
+ overlapevents = null;
+ }
*/
},
@@ -696,7 +722,7 @@ var dayClick = false;
}
-// initialize errorRightsDialog
+// initialize errorRights Dialog
$(function() {
$( "#errorRightsDialog" ).dialog({
autoOpen: false,
@@ -715,7 +741,7 @@ var dayClick = false;
});
});
-// initialize noPoolSelectedDialog
+// initialize noPoolSelected Dialog
$(function() {
$( "#noPoolSelectedDialog" ).dialog({
autoOpen: false,
@@ -733,7 +759,8 @@ var dayClick = false;
}
});
});
-
+
+// initialize errorEditImmediate Dialog
$(function() {
$( "#errorEditImmediate" ).dialog({
autoOpen: false,
@@ -815,6 +842,19 @@ selected one?</p>
<p>You can´t change the EndTime of a Shutdown Event!</p>
</div>
+<!-- eventNotDroppableDialog -->
+<div id="eventNotDroppableDialog" style="display: none">
+<p>You can´t drop this Event here! There exists at least one collision between two events.</p>
+<p>Please choose another position</p>
+<div id="accordion">
+ <h3><a href="#">Show conflicts</a></h3>
+ <div>
+ <p id="conflicts">
+ </p>
+ </div>
+</div>
+</div>
+
<!-- errorEditImmediate -->
<div id="errorEditImmediate" style="display: none">
<p>You can´t edit an Immediate-Event!</p>