From 8fd1a7b1e2279f1cb45e538cb8e6f361ffe0cdaa Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Wed, 7 Sep 2011 12:07:51 +0200 Subject: some bugfixes --- application/views/scripts/event/index.phtml | 33 +++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'application/views/scripts/event') 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 + '
' + @@ -192,7 +190,24 @@ var lastview; $('.fc-header-center').append('Boot'); $('.fc-header-center').append('Shutdown'); // $('.fc-header-right').append('Add Event'); - $("#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'} ); + }) + */ }
-- cgit v1.2.3-55-g7522