From 24900750a9c1e6c123fd5278d67816c3b5a06d4a Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Fri, 2 Sep 2011 02:03:39 +0000 Subject: [PATCH] Patch from Nick Hall - 0005193: Web Calendar report gives an error for the default style sheet. svn: r18099 --- src/plugins/webreport/WebCal.py | 11 ++++++----- src/plugins/webreport/webplugins.gpr.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index 0dee45099..70b469abc 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -1332,11 +1332,12 @@ class WebCalOptions(MenuReportOptions): cright.set_help( _("The copyright to be used for the web files")) menu.add_option(category_name, "cright", cright) - css = EnumeratedListOption(_('StyleSheet'), CSS["default"]["id"]) - for (fname, id) in sorted([(CSS[key]["translation"], CSS[key]["id"]) - for key in CSS.keys()]): - if CSS[id]["user"]: - css.add_item(CSS[id]["id"], CSS[id]["translation"]) + css_list = sorted([(CSS[key]["translation"], CSS[key]["id"]) + for key in CSS.keys() + if CSS[key]["user"]]) + css = EnumeratedListOption(_('StyleSheet'), css_list[0][1]) + for css_item in css_list: + css.add_item(css_item[1], css_item[0]) css.set_help( _('The stylesheet to be used for the web pages')) menu.add_option(category_name, "css", css) diff --git a/src/plugins/webreport/webplugins.gpr.py b/src/plugins/webreport/webplugins.gpr.py index 6205c6d27..e51226df2 100644 --- a/src/plugins/webreport/webplugins.gpr.py +++ b/src/plugins/webreport/webplugins.gpr.py @@ -64,4 +64,4 @@ plg.authors_email = ["thsturgill@yahoo.com", "robhealey1@gmail.com"] plg.category = CATEGORY_WEB plg.reportclass = 'WebCalReport' plg.optionclass = 'WebCalOptions' -plg.report_modes = [REPORT_MODE_GUI] +plg.report_modes = [REPORT_MODE_GUI, REPORT_MODE_CLI]