Patch from Nick Hall - 0005193: Web Calendar report gives an error for the default style sheet.

svn: r18098
This commit is contained in:
Brian Matherly 2011-09-02 01:43:36 +00:00
parent f6c7f8af6f
commit 5f629d221e
2 changed files with 7 additions and 6 deletions

View File

@ -1399,11 +1399,12 @@ class WebCalOptions(MenuReportOptions):
cright.set_help( _("The copyright to be used for the web files")) cright.set_help( _("The copyright to be used for the web files"))
menu.add_option(category_name, "cright", cright) menu.add_option(category_name, "cright", cright)
css = EnumeratedListOption(_('StyleSheet'), CSS["default"]["id"]) css_list = sorted([(CSS[key]["translation"], CSS[key]["id"])
for (fname, id) in sorted([(CSS[key]["translation"], CSS[key]["id"]) for key in CSS.keys()
for key in CSS.keys()]): if CSS[key]["user"]])
if CSS[id]["user"]: css = EnumeratedListOption(_('StyleSheet'), css_list[0][1])
css.add_item(CSS[id]["id"], CSS[id]["translation"]) 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')) css.set_help( _('The stylesheet to be used for the web pages'))
menu.add_option(category_name, "css", css) menu.add_option(category_name, "css", css)

View File

@ -64,4 +64,4 @@ plg.authors_email = ["thsturgill@yahoo.com", "robhealey1@gmail.com"]
plg.category = CATEGORY_WEB plg.category = CATEGORY_WEB
plg.reportclass = 'WebCalReport' plg.reportclass = 'WebCalReport'
plg.optionclass = 'WebCalOptions' plg.optionclass = 'WebCalOptions'
plg.report_modes = [REPORT_MODE_GUI] plg.report_modes = [REPORT_MODE_GUI, REPORT_MODE_CLI]