From 737684359515f393e729c3b8e799927db98b7365 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Fri, 21 May 2010 23:51:51 +0000 Subject: [PATCH] #3992: Fixed missing menus elements in stylesheet if using Web_Basic-Blue.css or Web_Visually.css. Menu elements were removed so that the user could choose between horizontal or Vertical menus. svn: r15445 --- src/plugins/webreport/WebCal.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index f02179a6f..426e1ec42 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -329,6 +329,13 @@ class WebCalReport(Report): fname = os.path.join(const.DATA_DIR, self.css) self.copy_file(fname, _CALENDARSCREEN, "styles") + # add horizontal menus if using Web_Basic-Blue or Web_Visually style sheets + # menus were removed out of them so that the user can choose between horizontal + # or vertical menus... + if self.css in ["Web_Basic-Blue.css", "Web_Visually.css"]: + fname = os.path.join(const.DATA_DIR, "Web_Navigation-Horizontal.css") + self.copy_file(fname, "Web_Navigation-Menus.css", "styles") + # copy print stylesheet fname = os.path.join(const.DATA_DIR, "Web_Print-Default.css") self.copy_file(fname, _CALENDARPRINT, "styles") @@ -422,12 +429,19 @@ class WebCalReport(Report): ) # links for GRAMPS favicon and stylesheets - links = Html("link", rel='shortcut icon', href=fname1, - type = "image/x-icon") + ( - Html("link",rel="stylesheet", href=fname2, type="text/css", media= "screen", - indent = False) + links = Html("link", rel='shortcut icon', href=fname1, type = "image/x-icon") + ( + Html("link",rel="stylesheet", href=fname2, type="text/css", media= "screen", indent = False) ) + # add horizontal menus if using Web_Basic-Blue or Web_Visually style sheets + # menus were removed out of them so that the user can choose between horizontal + # or vertical menus... + if self.css in ["Web_Basic-Blue.css", "Web_Visually.css"]: + fname = os.path.join(subdirs, "styles", "Web_Navigation-Menus.css") + links.extend( + Html("link", rel = "stylesheet", href = fname, type = "text/css", media = "screen", indent = False) + ) + # add printer stylesheet to webcalendar() and one_day() only if add_print: fname = os.path.join(subdirs, "styles", _CALENDARPRINT)