summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorSebastian Wagner2011-09-15 13:52:13 +0200
committerSebastian Wagner2011-09-15 13:52:13 +0200
commitdd93644bd60ebfba4ee16948c5844109ee55334f (patch)
tree2d7b45bc4d719e3a433935c125a1fffa3dbe8915 /application
parentcheckright for reportButton (diff)
downloadpoolctrl-dd93644bd60ebfba4ee16948c5844109ee55334f.tar.gz
poolctrl-dd93644bd60ebfba4ee16948c5844109ee55334f.tar.xz
poolctrl-dd93644bd60ebfba4ee16948c5844109ee55334f.zip
immediate event bug fix
Diffstat (limited to 'application')
-rwxr-xr-xapplication/views/scripts/event/index.phtml55
1 files changed, 41 insertions, 14 deletions
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index ccc4e3f..4f5c8e5 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -15,9 +15,9 @@ $(document).ready(function() {iniCalendar();});
var eventColor = {ev:null, color:null};
// keydown
-var selectedEvent = null;
-var cpEvent = null;
-var selectedDate = null;
+var selectedEvent;
+var cpEvent;
+var selectedDate;
// dblclick
var clickTmp = true;
@@ -54,7 +54,7 @@ var poolIDtmp;
if($("#poolselectbox option:selected").val() == 'default') {
$( "#noPoolSelectedDialog" ).dialog('open');
} else {
- self.location="/event/add/" }
+ self.location="/event/add/";}
}
function showCalendar() {
@@ -219,7 +219,7 @@ var poolIDtmp;
if(clickTmp) {
clickTmp = false;
- setTimeout(function() {clickTmp = true} , 300);
+ setTimeout(function() {clickTmp = true;} , 300);
$(this).qtip("destroy");
eventSelected(event);
} else {
@@ -340,7 +340,7 @@ var poolIDtmp;
eventDrop: function( event, dayDelta, minuteDelta, allDay, revertFunc ) {
- if(event.repeat == 0 && isDroppable) {
+ if(event.repeat == 0 && isDroppable && event.immediate == 0) {
$(function() {
$( "#defaultDialog" ).dialog({
autoOpen: false,
@@ -364,7 +364,7 @@ var poolIDtmp;
});
});
$( "#defaultDialog" ).dialog('open');
- } else if (isDroppable) {
+ } else if (isDroppable && event.immediate == 0) {
$(function() {
$( "#eventMoveWdhDialog" ).dialog({
autoOpen: false,
@@ -381,8 +381,7 @@ var poolIDtmp;
$.post("/event/eventmove/evid/" + event.id + "/evstart/" + event.start + "/evend/" + event.end);
},
"Move all Events": function() {
- $(this).dialog("close");
- // TO DO: handle wdhEvents
+ $(this).dialog("close");
}
},
open: function () {
@@ -391,9 +390,30 @@ var poolIDtmp;
}
});
});
- $( "#eventMoveWdhDialog" ).dialog('open');
- } else revertFunc();
- $(this).qtip("destroy");
+ $( "#eventMoveWdhDialog" ).dialog('open');
+ $(this).qtip("destroy");
+ } else {
+ $(function() {
+ $( "#eventImmediateButtonDialog" ).dialog({
+ autoOpen: false,
+ width: 600,
+ modal: true,
+ title: 'Move ' + event.title,
+ 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");
+ }
+ });
+ });
+ $("#eventImmediateButtonDialog").dialog('open');
+ $(this).qtip("destroy");
+ revertFunc();
+ }
},
eventDragStop: function(event, jsEvent, ui, view) {
@@ -415,7 +435,8 @@ var poolIDtmp;
}
if(event.immediate == 1) {
- //element.draggable = false;
+ element.draggable( "destroy" );
+ element.removeClass('fc-event-draggable');
}
element.qtip({
@@ -597,6 +618,12 @@ selected one?</p>
<p>Please choose an Event first!</p>
</div>
+<!-- eventImmediateButton -->
+<div id="eventImmediateButtonDialog" style="display: none">
+<p>You can´t change time of an Immediate-Event!</p>
+<p>Please generate a new Event</p>
+</div>
+
<!-- eventResize boot -->
<div id="eventResizeBootDialog" style="display: none">
<p>You can´t change the EndTime of a Boot Event!</p>
@@ -615,4 +642,4 @@ selected one?</p>
<!-- default -->
<div id="defaultDialog" style="display: none">
<p>Are you sure about this change?</p>
-</div> \ No newline at end of file
+</div>