summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapplication/controllers/EventController.php2
-rwxr-xr-xapplication/views/scripts/event/index.phtml18
-rwxr-xr-xpublic/media/css/fullcalendar.css22
3 files changed, 32 insertions, 10 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index dcf15dc..f7711ed 100755
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -1190,6 +1190,7 @@ class EventController extends Zend_Controller_Action
}
try {
foreach($events as $event) {
+ if($event->getRunning() == 0) {
$eventEnd = date('Y-m-d H:i:s', intval(strtotime($event->getEnd())) + intval($evmindelta*60));
$event->setEnd($eventEnd);
$event->setPbs_poolID($poolID);
@@ -1204,6 +1205,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) . "<br/>";
echo "Message: " . $e->getMessage() . "<br/>";
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index 6cfb733..c5c7c38 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -651,24 +651,24 @@ var dayClick = false;
},
eventRender: function(event, element, view) {
-
+
// add running icons and handle editing of events
if(event.running == 0) {
// event will take place soon
- $('.fc-event-time').css('background','url(/media/img/down.png) top right no-repeat');
- //event.editable = false;
+ element.addClass("fc-event-time-0");
+ //$('.fc-event-time').css('background','url(/media/img/down.png) top right no-repeat');
} else if(event.running == 1) {
// event is running
- $('.fc-event-time').css('background','url(/media/img/play.gif) top right no-repeat');
- //event.editable = false;
+ element.addClass("fc-event-time-1");
+ event.editable = false;
} else if(event.running == 2) {
// event successfully
- $('.fc-event-time').css('background','url(/media/img/default.png) top right no-repeat');
- //event.editable = false;
+ element.addClass("fc-event-time-2");
+ event.editable = false;
} else if(event.running == 3) {
// event failed
- $('.fc-event-time').css('background','url(/media/img/delete.png) top right no-repeat');
- //event.editable = false;
+ element.addClass("fc-event-time-3");
+ event.editable = false;
}
// disable resizing if the event is a boot- or shutdown-event
diff --git a/public/media/css/fullcalendar.css b/public/media/css/fullcalendar.css
index 8188bbf..ac2feee 100755
--- a/public/media/css/fullcalendar.css
+++ b/public/media/css/fullcalendar.css
@@ -294,12 +294,32 @@ a.fc-event {
border-width: 2px;
overflow: hidden;
}
-
+
.fc-event-time,
.fc-event-title {
padding: 0 1px;
}
+.fc-event-time-0 {
+ padding: 0 1px;
+ background: url(/media/img/down.png) top right no-repeat;
+ }
+
+.fc-event-time-1 {
+ padding: 0 1px;
+ background: url(/media/img/play.gif) top right no-repeat;
+ }
+
+.fc-event-time-2 {
+ padding: 0 1px;
+ background: url(/media/img/default.png) top right no-repeat;
+ }
+
+.fc-event-time-3 {
+ padding: 0 1px;
+ background: url(/media/img/delete.png) top right no-repeat;
+ }
+
.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/
display: block;
position: absolute;