From d760deb0117b3a1b1adec1b38c73ebe412d02e1e Mon Sep 17 00:00:00 2001 From: Kevin Jardine Date: Thu, 21 Jun 2012 15:55:59 +0200 Subject: small tweaks for UF --- views/default/event_calendar/full_calendar_view.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'views') diff --git a/views/default/event_calendar/full_calendar_view.php b/views/default/event_calendar/full_calendar_view.php index d86a3ac27..bba3a66db 100644 --- a/views/default/event_calendar/full_calendar_view.php +++ b/views/default/event_calendar/full_calendar_view.php @@ -9,8 +9,12 @@ elgg_load_css('lightbox'); handleEventClick = function(event) { if (event.url) { - //window.location.href = event.url; - $.fancybox({'href':event.url}); + if (event.is_event_poll) { + window.location.href = event.url; + } else { + //window.location.href = event.url; + $.fancybox({'href':event.url}); + } return false; } }; @@ -38,8 +42,10 @@ handleDayClick = function(date,allDay,jsEvent,view) { } handleEventDrop = function(event,dayDelta,minuteDelta,allDay,revertFunc) { - - if (!confirm("")) { + if (event.is_event_poll) { + alert(""); + revertFunc(); + } else if (!confirm("")) { revertFunc(); } else { elgg.action('event_calendar/modify_full_calendar', @@ -67,6 +73,12 @@ getISODate = function(d) { return year +"-"+month+"-"+day; } +handleEventRender = function(event, element, view) { + if (event.is_event_poll) { + element.draggable = false; + } +} + handleGetEvents = function(start, end, callback) { var start_date = getISODate(start); var end_date = getISODate(end); @@ -105,6 +117,7 @@ $(document).ready(function() { ignoreTimezone: true, editable: true, slotMinutes: 15, + eventRender: handleEventRender, eventDrop: handleEventDrop, eventClick: handleEventClick, dayClick: handleDayClick, -- cgit v1.2.3