From 280d865e82bd581058264cf1bb69fc5dec19a49b Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Mon, 31 Oct 2011 11:59:22 +0100 Subject: test --- application/views/scripts/event/index.phtml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml index f47e94b..6ae8072 100755 --- a/application/views/scripts/event/index.phtml +++ b/application/views/scripts/event/index.phtml @@ -284,18 +284,23 @@ function eventSelected(event) { } }); }); - $.get("/event/checkright/rightShortcut/ec", function(right){ + $.get("/event/checkright/rightShortcut/ec", function(rightData){ $.get("/event/checkoverlapselect/poolID/" + $("#poolselectbox option:selected").val() + "/startDate/" + startDate + "/endDate/" + endDate, function(data){ // get conflicts-HTML Element var cell = document.getElementById("conflicts"); // get conflicts var returndata = jQuery.parseJSON(data); + var right; + if(rightData = 'true'){ + right = true; + } else right = false; + if($("#poolselectbox option:selected").val() == 'defaultPool' || $("#poolselectbox option:selected").val() == 'noPool') { $( "#noPoolSelectedDialog" ).dialog('open'); - } else if (right) { + } else if (!right && evClick == false) { $(function() { $( "#eventAddDialog" ).dialog({ autoOpen: false, @@ -332,7 +337,7 @@ function eventSelected(event) { }); }); $( "#eventAddDialog" ).dialog('open'); - } else if (!right && evClick == false) { + } else if (right && evClick == false) { $('#calendar').fullCalendar( 'unselect' ); $( "#errorRightsDialog" ).dialog('open'); } else -- cgit v1.2.3-55-g7522