From 25d14409cf525e909bf36c9e8a95d9f11f2fab6f Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 14 Jul 2011 09:28:08 -0400 Subject: [PATCH] Fix for Bug 6586 - calendar showing the wrong event type when editing Content-Type: text/plain; charset="utf-8" This bug must have been present for a while. There wasn't proper handling of repeating yearly holidays when it came to the label. To be clear, I believe this bug only affected holidays which repeat yearly on the same date. Instead of correcting the label to match the existing scheme I added a new color code and label so that there are now two styles for yearly and weekly repeating holdiays. This makes it more clear what kind of repeating holiday you're looking at (rather than having one color code for both). After applying this patch, new and existing holidays which repeat yearly on the same day should be color-coded orange and have a 'Holiday repeating yearly' label. Weekly holidays are now labeled 'Holiday repeating weekly.' --- .../prog/en/modules/tools/holidays.tt | 31 ++++++++++++------- 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt index a8bf8b6..ac867fe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt @@ -38,7 +38,10 @@ $("#holtype").attr("class","key exception").html(_("Holiday exception")); } else if(holidayType == 'weekday') { $("#showOperationDelLabel").html(_('Delete this holiday.')); - $("#holtype").attr("class","key repeatableday").html(_("Repeatable holiday")); + $("#holtype").attr("class","key repeatableweekly").html(_("Holiday repeating weekly")); + } else if(holidayType == 'daymonth') { + $("#showOperationDelLabel").html(_('Delete this holiday.')); + $("#holtype").attr("class","key repeatableyearly").html(_("Holiday repeating yearly")); } else { $("#showOperationDelLabel").html(_('Delete this holiday.')); $("#holtype").attr("class","key holiday").html(_("Unique holiday")); @@ -107,7 +110,8 @@ .normalday { background-color : #EDEDED; color : Black; border : 1px solid #BCBCBC; } .exception { background-color : #b3d4ff; color : Black; border : 1px solid #BCBCBC; } .holiday { background-color : #ffaeae; color : Black; border : 1px solid #BCBCBC; } -.repeatableday { background-color : #FFFF99; color : Black; border : 1px solid #BCBCBC; } +.repeatableweekly { background-color : #FFFF99; color : Black; border : 1px solid #BCBCBC; } +.repeatableyearly { background-color : #FFCC66; color : Black; border : 1px solid #BCBCBC; } .information { z-index : 1; background-color : #DCD2F1; width : 300px; display : none; border : 1px solid #000000; color : #000000; font-size : 8pt; font-weight : bold; background-color : #FFD700; cursor : pointer; padding : 2px; } .panel { z-index : 1; display : none; border : 3px solid #CCC; padding : 3px; margin-top: .3em; background-color: #FEFEFE; } fieldset.brief { border : 0; margin-top: 0; } #showHoliday { margin : .5em 0; } h1 select { width: 20em; } div.yui-b fieldset.brief ol { font-size:100%; } div.yui-b fieldset.brief li, div.yui-b fieldset.brief li.radio { padding:0.2em 0; } .help { margin:.3em 0;border:1px solid #EEE;padding:.3em .7em; font-size : 90%; } #holidayweeklyrepeatable, #holidaysyearlyrepeatable, #holidaysunique, #holidayexceptions { font-size : 90%; margin-bottom : 1em;} .calendar td, .calendar th, .calendar .button, .calendar tbody .day { padding : .7em; font-size: 110%; } .calendar { width: auto; border : 0; } @@ -288,8 +292,10 @@ var dateString = year + '/' + month + '/' + day; if (exception_holidays[dateString] != null) { return 'exception'; - } else if ((week_days[weekDay] != null) || (day_month_holidays[dayMonth] != null)) { - return 'repeatableday'; + } else if ( week_days[weekDay] != null ){ + return 'repeatableweekly'; + } else if ( day_month_holidays[dayMonth] != null ) { + return 'repeatableyearly'; } else if (holidays[dateString] != null) { return 'holiday'; } else { @@ -347,7 +353,8 @@

Working day Unique holiday - Repeatable holiday + Holiday repeating weekly + Holiday repeating yearly Holiday exception

@@ -380,9 +387,9 @@ - - - + + + @@ -407,12 +414,12 @@ [% IF ( dateformat == 'metric' ) %] - + [% ELSE %] - + [% END %] - - + + -- 1.7.3
Day of WeekTitleDescriptionDay of WeekTitleDescription
Day/MonthDay/MonthMonth/DayMonth/DayTitleDescriptionTitleDescription