fix the default setting for yearly repeating events

This commit is contained in:
Georg Ehrke 2011-12-26 19:59:15 +01:00
parent d582f7576c
commit ffa835c56f
3 changed files with 13 additions and 13 deletions

View File

@ -69,6 +69,6 @@ $tmpl->assign('repeat_end', 'never');
$tmpl->assign('repeat_count', '10');
$tmpl->assign('repeat_weekofmonth', 'auto');
$tmpl->assign('repeat_date', '');
$tmpl->assign('repeat_year', 'byyearday');
$tmpl->assign('repeat_year', 'bydate');
$tmpl->printpage();
?>

View File

@ -292,7 +292,6 @@ Calendar={
}
if($('#repeat option:selected').val() == 'yearly'){
$('#advanced_year').css('display', 'block');
$('#advanced_byyearday').css('display', 'block');
}
if($('#repeat option:selected').val() == 'doesnotrepeat'){
$('#advanced_options_repeating').slideUp('slow');
@ -312,14 +311,13 @@ Calendar={
$('#advanced_bymonth').css('display', 'none');
$('#advanced_byweekno').css('display', 'none');
$('#advanced_bymonthday').css('display', 'none');
if($('#advanced_year option:selected').val() == 'byyearday'){
$('#advanced_byyearday').css('display', 'block');
if($('#advanced_year_select option:selected').val() == 'byyearday'){
//$('#advanced_byyearday').css('display', 'block');
}
if($('#advanced_year option:selected').val() == 'byweekno'){
if($('#advanced_year_select option:selected').val() == 'byweekno'){
$('#advanced_byweekno').css('display', 'block');
}
if($('#advanced_year option:selected').val() == 'bydaymonth'){
if($('#advanced_year_select option:selected').val() == 'bydaymonth'){
$('#advanced_bymonth').css('display', 'block');
$('#advanced_bymonthday').css('display', 'block');
$('#advanced_weekday').css('display', 'block');

View File

@ -438,6 +438,7 @@ class OC_Calendar_Object{
public static function getYearOptions($l10n){
return array(
'bydate' => $l10n->t('by events date'),
'byyearday' => $l10n->t('by yearday(s)'),
'byweekno' => $l10n->t('by weeknumber(s)'),
'bydaymonth' => $l10n->t('by day and month')
@ -700,12 +701,13 @@ class OC_Calendar_Object{
break;
case 'yearly':
$rrule .= 'FREQ=YEARLY';
if($request['advanced_year_select'] == 'byyearday'){
$byyearday = '';
foreach($request['byyearday'] as $yearday){
if($byyearday == ''){
$byyearday = $yearday;
}else{
if($request['advanced_year_select'] == 'bydate'){
}elseif($request['advanced_year_select'] == 'byyearday'){
list($_day, $_month, $_year) = explode('-', $from);
$byyearday = date('z', mktime(0,0,0, $_month, $_day, $_year)) + 1;
if(array_key_exists('byyearday', $request)){
foreach($request['byyearday'] as $yearday){
$byyearday .= ',' . $yearday;
}
}