aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-06-04 14:22:57 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2012-06-04 14:22:57 +0200
commit425f301ef3ed02796442c4cff0d33eff25f98edf (patch)
tree340aa6cdfe265a316d625100c724c60a58ced4a5
parent321fbfdb059e39b921e13ba034855b019981fa44 (diff)
downloadelgg-425f301ef3ed02796442c4cff0d33eff25f98edf.tar.gz
elgg-425f301ef3ed02796442c4cff0d33eff25f98edf.tar.bz2
fixed schedule link and all day form behaviour
-rw-r--r--start.php2
-rw-r--r--views/default/event_calendar/datetime_edit.php4
-rw-r--r--views/default/js/event_calendar/event_calendar.php16
3 files changed, 13 insertions, 9 deletions
diff --git a/start.php b/start.php
index 8c8bba19b..6d346b743 100644
--- a/start.php
+++ b/start.php
@@ -298,7 +298,7 @@ function event_calendar_entity_menu_setup($hook, $type, $return, $params) {
'name' => 'schedule',
'text' => elgg_echo('event_poll:schedule_button'),
'title' => elgg_echo('event_poll:schedule_button'),
- 'href' => 'event_poll/schedule/'.$entity->guid,
+ 'href' => 'event_poll/vote/'.$entity->guid,
'priority' => 150,
);
$return[] = ElggMenuItem::factory($options);
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();
}
}
}