aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-06-21 15:55:59 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2012-06-21 15:55:59 +0200
commitd760deb0117b3a1b1adec1b38c73ebe412d02e1e (patch)
tree89c4cdedd0f601f2564720793d8680de75564b46 /views/default
parente75bc90b93afb36d75dd67695eb0f3b9599d7052 (diff)
downloadelgg-d760deb0117b3a1b1adec1b38c73ebe412d02e1e.tar.gz
elgg-d760deb0117b3a1b1adec1b38c73ebe412d02e1e.tar.bz2
small tweaks for UF
Diffstat (limited to 'views/default')
-rw-r--r--views/default/event_calendar/full_calendar_view.php21
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,