summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wagner2011-10-31 11:59:22 +0100
committerSebastian Wagner2011-10-31 11:59:22 +0100
commit280d865e82bd581058264cf1bb69fc5dec19a49b (patch)
tree0380372f74ddfaf94f3932d202c54814bff4dfdc
parenttest (diff)
downloadpoolctrl-280d865e82bd581058264cf1bb69fc5dec19a49b.tar.gz
poolctrl-280d865e82bd581058264cf1bb69fc5dec19a49b.tar.xz
poolctrl-280d865e82bd581058264cf1bb69fc5dec19a49b.zip
test
-rwxr-xr-xapplication/views/scripts/event/index.phtml11
1 files 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