From f5b010ad6e8eecfe9f75df11c657ec78724821c1 Mon Sep 17 00:00:00 2001 From: sebastian wagner Date: Sun, 16 Oct 2011 21:35:31 +0200 Subject: conflict dialog --- application/views/scripts/event/index.phtml | 66 +++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 13 deletions(-) (limited to 'application/views') 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?

You can´t change the EndTime of a Shutdown Event!

+ + +