From 8233a7695b333a27c001164a986150897730cd15 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 9 Sep 2011 20:03:19 +0200 Subject: some changes --- application/views/scripts/event/index.phtml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'application') diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml index a0517bc..56cae0c 100644 --- a/application/views/scripts/event/index.phtml +++ b/application/views/scripts/event/index.phtml @@ -10,6 +10,7 @@ $(document).ready(function() {iniCalendar();}); +var opacityValue = .5; var eventColor = {ev:null, color:null}; @@ -54,7 +55,24 @@ var eventColor = {ev:null, color:null}; function hideCalendar() { $("#calendar").hide(); } + + + function setOpacity(type) { + //alert(type); + + var events = $('#calendar').fullCalendar( 'clientEvents' , function(event) { + if(event.category == type) { + return true;} + return false; + }); + /*for( var i in events ) { + alert(events[i].title); + }*/ + //$('#calendar').fullCalendar( 'rerenderEvents' ); + } + + // fetch all poolevents of the selected #poolselectbox value function fetchPoolEvents(element) { var poolID = $("#poolselectbox option:selected").val(); @@ -113,10 +131,10 @@ var eventColor = {ev:null, color:null}; *event.dblclick(alert('test');); *$('#calendar').dblclick(function() { self.location = "/event/edit/eventID/" + event.id;}); */ - + eventSelected(event); - //pressKey(event); + pressKey(event); }, @@ -158,7 +176,6 @@ var eventColor = {ev:null, color:null}; eventRender: function(event, element, view) { - /* * TO DO: Eventhandler löschen bei eventClick, da sich sonst das qtip bindet @@ -207,21 +224,25 @@ var eventColor = {ev:null, color:null}; $("#lecture").click(function(){ if($(this).hasClass("fc-state-active")) { $(this).removeClass("fc-state-active"); + setOpacity('Lecture'); } else {$(this).addClass("fc-state-active");} }); $("#maintenance").click(function(){ if($(this).hasClass("fc-state-active")) { $(this).removeClass("fc-state-active"); + setOpacity('Maintenance'); } else {$(this).addClass("fc-state-active");} }); $("#boot").click(function(){ if($(this).hasClass("fc-state-active")) { $(this).removeClass("fc-state-active"); + setOpacity('Boot'); } else {$(this).addClass("fc-state-active");} }); $("#shutdown").click(function(){ if($(this).hasClass("fc-state-active")) { $(this).removeClass("fc-state-active"); + setOpacity('Shutdown'); } else {$(this).addClass("fc-state-active");} }); -- cgit v1.2.3-55-g7522