summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorSebastian Wagner2011-09-07 12:07:51 +0200
committerSebastian Wagner2011-09-07 12:07:51 +0200
commit8fd1a7b1e2279f1cb45e538cb8e6f361ffe0cdaa (patch)
treef65a76f0c068af678951f0bf274af48a71e50b68 /application
parentboot- and shutdownEvents defaultSize = 5min (diff)
downloadpoolctrl-8fd1a7b1e2279f1cb45e538cb8e6f361ffe0cdaa.tar.gz
poolctrl-8fd1a7b1e2279f1cb45e538cb8e6f361ffe0cdaa.tar.xz
poolctrl-8fd1a7b1e2279f1cb45e538cb8e6f361ffe0cdaa.zip
some bugfixes
Diffstat (limited to 'application')
-rw-r--r--application/controllers/EventController.php9
-rw-r--r--application/views/scripts/event/index.phtml33
2 files changed, 29 insertions, 13 deletions
diff --git a/application/controllers/EventController.php b/application/controllers/EventController.php
index 295b946..c25f1cd 100644
--- a/application/controllers/EventController.php
+++ b/application/controllers/EventController.php
@@ -549,10 +549,10 @@ class EventController extends Zend_Controller_Action
foreach ($eventList as $event){
- if($event->getCategory() == 1){$color= 'green' AND $category= 'Lecture';}
- else if ($event->getCategory() == 2){$color= 'yellow' AND $category= 'Maintenance';}
- else if ($event->getCategory() == 3){$color= 'blue' AND $category= 'Boot';}
- else if ($event->getCategory() == 4){$color= 'red' AND $category= 'Shutdown';}
+ if($event->getCategory() == 1){$color= 'green' AND $textColor = 'white' AND $category= 'Lecture';}
+ else if ($event->getCategory() == 2){$color = 'yellow' AND $textColor = 'black' AND $category = 'Maintenance';}
+ else if ($event->getCategory() == 3){$color = 'blue' AND $textColor = 'white' AND $category = 'Boot';}
+ else if ($event->getCategory() == 4){$color = 'red' AND $textColor = 'white' AND $category = 'Shutdown';}
$events[] = array(
$events[] = array(
@@ -567,6 +567,7 @@ class EventController extends Zend_Controller_Action
'bootosID' => $event->getPbs_bootosID(),
'allDay' => false,
'color' => $color,
+ 'textColor' => $textColor,
)
);
}
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index ec180dd..b286e3d 100644
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -63,7 +63,7 @@ var lastview;
default: 'week',
left: 'title',
center: 'prev,next today',
- right: 'agendaWeek,agendaDay'
+ right: 'month,agendaWeek,agendaDay'
},
editable: true,
allDaySlot: false,
@@ -83,7 +83,7 @@ var lastview;
dayClick: function( date, allDay, jsEvent, view ) {
- self.location="/event/add/";
+ //self.location="/event/add/";
},
eventMouseover: function( event, jsEvent, view ) {
@@ -110,7 +110,7 @@ var lastview;
//alert(startDate + "\n" + endDate);
if (!confirm("Are you sure to add an Event from " + startDate + " to " + endDate + " ?")) {
- }else {alert('test');}
+ }else {self.location="/event/add/";}
},
@@ -125,7 +125,9 @@ var lastview;
if (!confirm( event.title + " is now " + minuteDelta + " minutes " + length + ".\n\n" + "Are you sure about this change?")) {
revertFunc();
}else{
- $.post("/event/eventresize/evid/" + event.id + "/evend/" + event.end);
+ if (event.category == 'Boot' ) {revertFunc(); alert("You can´t change the EndTime of a BootEvent!");}
+ else if (event.category == 'Shutdown' ) {revertFunc(); alert("You can´t change the EndTime of a ShutdownEvent!");}
+ else $.post("/event/eventresize/evid/" + event.id + "/evend/" + event.end);
}
},
@@ -161,10 +163,6 @@ var lastview;
});
}
if (view.name == 'agendaDay') {
- //alert(options.slotMinutes);
- //options['slotMinutes'] = 10;
- //opt.slotMinutes = 10;
- //slotMinutes: 5,
element.qtip({
content:
'Title: ' + event.title + '<br/>' +
@@ -192,7 +190,24 @@ var lastview;
$('.fc-header-center').append('<span class="fc-button fc-state-default fc-corner-right fc-state-active"><span class="fc-button-inner"><span id="boot" class="fc-button-content">Boot</span><span class="fc-button-effect"><span></span></span></span></span>');
$('.fc-header-center').append('<span class="fc-button fc-state-default fc-corner-right fc-state-active"><span class="fc-button-inner"><span id="shutdown" class="fc-button-content">Shutdown</span><span class="fc-button-effect"><span></span></span></span></span>');
// $('.fc-header-right').append('<span class="fc-button fc-state-default fc-corner-right fc-state-active"><span class="fc-button-inner"><span id="addevent" class="fc-button-content">Add Event</span><span class="fc-button-effect"><span></span></span></span></span>');
- $("#lecture").click(function() {alert('test');})
+ $('#calendar').click(function() {
+ //$('#calendar').fullCalendar('addEventSource', "/event/eventlist");
+ //$('#calendar').fullCalendar('removeEvents', function(calEvent) { return calEvent.category == 'Lecture'} );
+ $('#calendar').fullCalendar('rerenderEvents');
+ })
+/*
+ $('.fc-header-center').click(function() {
+ $('#calendar').fullCalendar('removeEvents', function(calEvent) { return calEvent.category == 'Maintenance'} );
+ })
+
+ $('.fc-header-center').click(function() {
+ $('#calendar').fullCalendar('removeEvents', function(calEvent) { return calEvent.category == 'Boot'} );
+ })
+
+ $('.fc-header-center').click(function() {
+ $('#calendar').fullCalendar('removeEvents', function(calEvent) { return calEvent.category == 'Shutdown'} );
+ })
+ */
}
</script>
<br />