diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2012-06-21 15:55:59 +0200 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2012-06-21 15:55:59 +0200 |
commit | d760deb0117b3a1b1adec1b38c73ebe412d02e1e (patch) | |
tree | 89c4cdedd0f601f2564720793d8680de75564b46 /views/default/event_calendar | |
parent | e75bc90b93afb36d75dd67695eb0f3b9599d7052 (diff) | |
download | elgg-d760deb0117b3a1b1adec1b38c73ebe412d02e1e.tar.gz elgg-d760deb0117b3a1b1adec1b38c73ebe412d02e1e.tar.bz2 |
small tweaks for UF
Diffstat (limited to 'views/default/event_calendar')
-rw-r--r-- | views/default/event_calendar/full_calendar_view.php | 21 |
1 files changed, 17 insertions, 4 deletions
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("<?php echo elgg_echo('event_calendar:are_you_sure'); ?>")) { + if (event.is_event_poll) { + alert("<?php echo elgg_echo('event_calendar:cannot_drag_polls'); ?>"); + revertFunc(); + } else if (!confirm("<?php echo elgg_echo('event_calendar:are_you_sure'); ?>")) { 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, |