diff options
author | Kevin Jardine <kevinjardine@yahoo.com> | 2012-05-24 20:00:18 +0200 |
---|---|---|
committer | Kevin Jardine <kevinjardine@yahoo.com> | 2012-05-24 20:00:18 +0200 |
commit | b8c3767f8c790febb35141919936d616d3ebe2d4 (patch) | |
tree | 7e137e8482106ffc59ee30063cc8eb2bc4442374 /views/default/js/event_calendar/event_calendar.php | |
parent | fc04fcffb8a03c166467e8633f8195ef48b29f4a (diff) | |
download | elgg-b8c3767f8c790febb35141919936d616d3ebe2d4.tar.gz elgg-b8c3767f8c790febb35141919936d616d3ebe2d4.tar.bz2 |
changed time handling and added more suppport for event polls
Diffstat (limited to 'views/default/js/event_calendar/event_calendar.php')
-rw-r--r-- | views/default/js/event_calendar/event_calendar.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/views/default/js/event_calendar/event_calendar.php b/views/default/js/event_calendar/event_calendar.php index b3ca2cc7b..244846f96 100644 --- a/views/default/js/event_calendar/event_calendar.php +++ b/views/default/js/event_calendar/event_calendar.php @@ -10,6 +10,8 @@ elgg.event_calendar.init = function () { $('.event-calendar-repeating-unselected').live('click',elgg.event_calendar.handleRepeatingSelect); $('.event-calendar-repeating-selected').live('click',elgg.event_calendar.handleRepeatingUnselect); $('#event-calendar-edit').submit(elgg.event_calendar.handleEditFormSubmit); + $('#event-calendar-edit-schedule-type').click(elgg.event_calendar.handleScheduleType); + elgg.event_calendar.handleScheduleType(); var all_day_field = $('[name="all_day"][type="checkbox"]'); if (all_day_field.is(':checked')) { @@ -21,6 +23,28 @@ elgg.event_calendar.init = function () { all_day_field.change(elgg.event_calendar.handleAllDayField); } +elgg.event_calendar.handleScheduleType = function(e) { + var st = $('#event-calendar-edit-schedule-type:checked').val(); + if (st == 'poll') { + $(".event-calendar-edit-date-wrapper").hide(); + $(".event-calendar-edit-reminder-wrapper").hide(); + $(".event-calendar-edit-form-membership-block").hide(); + $(".event-calendar-edit-form-share-block").hide(); + } else { + $(".event-calendar-edit-date-wrapper").show(); + $(".event-calendar-edit-reminder-wrapper").show(); + $(".event-calendar-edit-form-membership-block").show(); + $(".event-calendar-edit-form-share-block").show(); + if (st == 'all_day') { + $("[name='start_time']").hide(); + $("#event-calendar-to-time-wrapper").hide(); + } else { + $("[name='start_time']").show(); + $("#event-calendar-to-time-wrapper").show(); + } + } +} + elgg.event_calendar.handleAllDayField = function(e) { var field = $('[name="start_time"]'); if (field.attr('disabled') == 'disabled') { |