From 6a9c17fd244e42c3bcbbb03a059bd377ef80e2e8 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Tue, 17 May 2011 01:17:08 +0000 Subject: [PATCH] Bug# 0004891: Some little bugs in WebCal; issue #4 fixed... svn: r17512 --- src/plugins/webreport/WebCal.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index 47f768792..b7f359bfc 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -652,7 +652,7 @@ class WebCalReport(Report): th_txt = month_name if cal == 'wc': # webcalendar() if not self.multiyear: - th_txt = '%s %d' % (month_name, year) + th_txt = '%s %04d' % (month_name, year) # begin calendar table and table head with Html("table", class_ = "calendar", id = month_name) as table: @@ -673,8 +673,7 @@ class WebCalReport(Report): dayclass = get_class_for_daycol(day_col) dayname = get_name_for_daycol(day_col) trow += Html("th", class_ =dayclass, inline = True) + ( - Html('abbr', dayname[0], title = dayname) - ) + Html('abbr', dayname[0], title = dayname) ) # begin table body tbody = Html("tbody") @@ -705,22 +704,19 @@ class WebCalReport(Report): # add calendar date division datediv = Html("div", day, class_ = "date", inline = True) - # a day in the previous or next month + ### a day in the previous or next month ### if day == 0: - # day in previous month + # day in previous/ next month specday = __get_previous_month_day(year, month, day_col) if week_row == 0 \ else __get_next_month_day(year, month, day_col) - specclass = "previous " if week_row == 0 else "Next " + specclass = "previous " if week_row == 0 else "next " specclass += dayclass # continue table cell, , without id tag tcell = Html("td", class_ = specclass, inline = True) + ( - - # adds date for previous and next month days - Html("div", specday, class_ = "date", inline = True) - ) + Html("div", specday, class_ = "date", inline = True) ) # normal day number in current month else: