diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/default/event_calendar/datetime_edit.php | 4 | ||||
-rw-r--r-- | views/default/js/event_calendar/event_calendar.php | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/views/default/event_calendar/datetime_edit.php b/views/default/event_calendar/datetime_edit.php index ceceeb20e..64af30f53 100644 --- a/views/default/event_calendar/datetime_edit.php +++ b/views/default/event_calendar/datetime_edit.php @@ -14,7 +14,9 @@ if ($event_calendar_times != 'no') { 'class'=>'event-calendar-compressed-date', 'name' => 'start_date', 'value'=>$vars['start_date'])); + $body .= '<span id="event-calendar-start-time-wrapper">'; $body .= elgg_view("input/timepicker",array('name' => 'start_time','value'=>$vars['start_time'])); + $body .= '</span>'; if ($event_calendar_hide_end != 'yes') { $body .= '</p><p id="event-calendar-to-time-wrapper"><label>'.elgg_echo('event_calendar:to_label').'</label>'; $body .= elgg_view("event_calendar/input/date_local",array( @@ -24,7 +26,9 @@ if ($event_calendar_times != 'no') { 'name' => 'end_date', 'value'=>$vars['end_date'], )); + $body .= '<span id="event-calendar-end-time-wrapper">'; $body .= elgg_view("input/timepicker",array('name' => 'end_time','value'=>$vars['end_time'])); + $body .= '</span>'; } $body .= '</p></span>'; } else { diff --git a/views/default/js/event_calendar/event_calendar.php b/views/default/js/event_calendar/event_calendar.php index 244846f96..65c4d2952 100644 --- a/views/default/js/event_calendar/event_calendar.php +++ b/views/default/js/event_calendar/event_calendar.php @@ -15,10 +15,10 @@ elgg.event_calendar.init = function () { var all_day_field = $('[name="all_day"][type="checkbox"]'); if (all_day_field.is(':checked')) { - $('[name="start_time"]').val(0); - $('[name="start_time"]').attr('disabled','disabled'); - $('[name="end_time"]').val(0); - $('[name="end_time"]').attr('disabled','disabled'); + //$('[name="start_time"]').val(0); + $('#event-calendar-start-time-wrapper').attr('disabled','disabled'); + //$('[name="end_time"]').val(0); + $('#event-calendar-end-time-wrapper').attr('disabled','disabled'); } all_day_field.change(elgg.event_calendar.handleAllDayField); } @@ -36,11 +36,11 @@ elgg.event_calendar.handleScheduleType = function(e) { $(".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(); + $("#event-calendar-start-time-wrapper").hide(); + $("#event-calendar-end-time-wrapper").hide(); } else { - $("[name='start_time']").show(); - $("#event-calendar-to-time-wrapper").show(); + $("#event-calendar-start-time-wrapper").show(); + $("#event-calendar-end-time-wrapper").show(); } } } |