From 8c7a25f9d415b2727b632323980fd303535d5dc5 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 25 Oct 2011 10:27:21 +0200 Subject: errorTimeDialog added --- application/controllers/EventController.php | 2 ++ application/views/scripts/event/index.phtml | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php index cf1eec4..746f6ba 100755 --- a/application/controllers/EventController.php +++ b/application/controllers/EventController.php @@ -1072,6 +1072,7 @@ class EventController extends Zend_Controller_Action try { foreach($events as $event) { + if($event->getRunning() == 0) { //1min = 60sec, 1d = 86400sec $oldStartTime = date('H:i', strtotime($event->getStart())); $oldStartDate = date('d.m.Y', strtotime($event->getStart())); @@ -1114,6 +1115,7 @@ class EventController extends Zend_Controller_Action } } $this->eventMapper->save($event); //save the event with the new data + } } } catch (Zend_Exception $e) { echo "Caught exception: " . get_class($e) . "
"; diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml index 58441ea..f312c98 100755 --- a/application/views/scripts/event/index.phtml +++ b/application/views/scripts/event/index.phtml @@ -361,6 +361,7 @@ var dayClick = false; } else { $(this).dialog("close"); $('#calendar').fullCalendar( 'unselect' ); + $( "#errorTimeDialog" ).dialog('open'); } } else { $(this).dialog("close"); @@ -571,6 +572,7 @@ var dayClick = false; $.post("/event/eventmove/evid/" + event.id + "/evstart/" + event.start + "/evend/" + event.end); } else { $(this).dialog("close"); + $( "#errorTimeDialog" ).dialog('open'); revertFunc(); } } else { @@ -607,6 +609,7 @@ var dayClick = false; $.post("/event/eventmove/evid/" + event.id + "/evstart/" + event.start + "/evend/" + event.end); } else { $(this).dialog("close"); + $( "#errorTimeDialog" ).dialog('open'); revertFunc(); } //event.repeat = 0; @@ -624,6 +627,7 @@ var dayClick = false; self.location="/event/eventmoveall/eventTitle/" + event.title + "/evmindelta/" + minuteDelta + "/evdaydelta/" + dayDelta + "/poolID/" + $("#poolselectbox option:selected").val(); } else { $(this).dialog("close"); + $( "#errorTimeDialog" ).dialog('open'); revertFunc(); } } else { @@ -920,6 +924,25 @@ var dayClick = false; }); }); +//initialize errorTime Dialog + $(function() { + $( "#errorTimeDialog" ).dialog({ + autoOpen: false, + width: 600, + modal: true, + title: "ERROR", + 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"); + } + }); + }); + @@ -1007,6 +1030,11 @@ selected one?

Permission denied!

+ + +