Fixed a navigation menu errors in WebCal and Basic-Blue and Visually.
svn: r14936
This commit is contained in:
parent
edaec66f47
commit
dd5ba77a0a
@ -29,12 +29,10 @@ Style Name: Web_Alphabet-Horizontal Stylesheet
|
||||
Header
|
||||
----------------------------------------------------- */
|
||||
div#header {
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Body Element
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright 2008-2009 Rob G. Healey <robhealey1@gmail.com>
|
||||
# Copyright 2008-2010 Rob G. Healey <robhealey1@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -46,9 +46,9 @@ Females Web_Gender_Female.png
|
||||
# $Id: Web_Basic-Blue.css 14483 2010-02-25 15:52:32Z robhealey1 $
|
||||
|
||||
NarrativeWeb Styles
|
||||
-------------------------------------------------------------------------------------------- */
|
||||
--------------------------------------------------------------------------------------------
|
||||
|
||||
/* Navigation
|
||||
Navigation
|
||||
----------------------------------------------------- */
|
||||
div#navigation ul li.CurrentSection a {
|
||||
color: #FFF;
|
||||
@ -818,8 +818,10 @@ div#Download table.download td.Modified {
|
||||
|
||||
/* Sources
|
||||
----------------------------------------------------- */
|
||||
#Sources { }
|
||||
|
||||
#Sources {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
div#Sources table.infolist tbody tr td {
|
||||
background-color: #70B1ED;
|
||||
}
|
||||
@ -869,7 +871,7 @@ div#RepositoryList table.repolist tbody tr td.ColumnName {
|
||||
div#AddressBookList, AddressBookDetail {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 855px;
|
||||
width: 100%;
|
||||
}
|
||||
div#AddressBookList table.addressbook {
|
||||
margin: .3em 0 .3em 0;
|
||||
@ -921,7 +923,7 @@ div#AddressBookList table.addressbook tbody tr td.ColumnWebLinks {
|
||||
margin:0;
|
||||
padding:0 20px 3em 2em;
|
||||
}
|
||||
div.subsection{
|
||||
div.subsection {
|
||||
padding-bottom:.5em;
|
||||
}
|
||||
div.subsection h4 {
|
||||
@ -1390,9 +1392,6 @@ div#pedigree {
|
||||
/* Calendar Styles
|
||||
-------------------------------------------------------------------------------------------- */
|
||||
/* Calendar : General */
|
||||
body#WebCal {
|
||||
background-color: #FFF;
|
||||
}
|
||||
.calendar {
|
||||
empty-cells:show;
|
||||
width:100%;
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
@ -318,6 +320,11 @@ class WebCalReport(Report):
|
||||
fname = os.path.join(const.DATA_DIR, self.css)
|
||||
self.copy_file(fname, _CALENDARSCREEN, "styles")
|
||||
|
||||
# copy Navigation Menu Layout if Blue or Visually is being used
|
||||
if self.css == "Web_Basic-Blue.css" or "Web_Visually.css":
|
||||
fname = os.path.join(const.DATA_DIR, "Web_Alphabet-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")
|
||||
@ -378,7 +385,7 @@ class WebCalReport(Report):
|
||||
# ---------------------------------------------------------------------------------------
|
||||
# Beginning of Calendar Creation
|
||||
# ---------------------------------------------------------------------------------------
|
||||
def write_header(self, nr_up, body_id, title, add_print=True):
|
||||
def write_header(self, nr_up, title, body_id = None, add_print = True):
|
||||
"""
|
||||
This creates the header for the Calendars
|
||||
'nr_up' - number of directory levels up, started from current page, to the
|
||||
@ -399,6 +406,10 @@ class WebCalReport(Report):
|
||||
|
||||
page, head, body = Html.page(title, self.encoding, xmllang)
|
||||
|
||||
# add body id tag if not None
|
||||
if body_id is not None:
|
||||
body.attr = "id = '%(idtag)s'" % { 'idtag' : body_id }
|
||||
|
||||
# GRAMPS favicon
|
||||
fname1 = os.path.join(subdirs, "images", "favicon.ico")
|
||||
|
||||
@ -411,24 +422,25 @@ 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 printer stylesheet to webcalendar() and one_day() only
|
||||
if add_print:
|
||||
fname = os.path.join(subdirs, "styles", _CALENDARPRINT)
|
||||
links += Html("link",rel="stylesheet", href=fname,type="text/css", media="print",
|
||||
indent = False)
|
||||
links += Html("link",rel="stylesheet", href=fname,type="text/css", media="print", indent = False)
|
||||
|
||||
# add horizontal menu if css == Blue or Visually because there is no menus
|
||||
if self.css in ["Web_Basic-Blue.css", "Web_Visually.css"]:
|
||||
|
||||
# Link to Navigation Menus stylesheet
|
||||
fname = os.path.join(subdirs, "styles", "Web_Navigation-Menus.css")
|
||||
links.extend( Html("link", href = fname, type = "text/css", media = "screen", rel = "stylesheet") )
|
||||
|
||||
# add meta tags and links to head section
|
||||
head += (meta, links)
|
||||
|
||||
# replace standard body element with custom one
|
||||
body.attr = 'id="%s"' % body_id
|
||||
|
||||
# start header division section
|
||||
header = Html("div", id="header") + (
|
||||
|
||||
@ -517,7 +529,9 @@ class WebCalReport(Report):
|
||||
|
||||
# An optional link to a home page
|
||||
navs.append((self.home_link, _('html|Home'), add_home))
|
||||
navs.extend((month, month, True) for month in range(1,13))
|
||||
navs.extend(
|
||||
(month, month, True) for month in range(1,13)
|
||||
)
|
||||
|
||||
# Add a link for year_glance() if requested
|
||||
navs.append(('fullyearlinked', _('Year Glance'), self.fullyear))
|
||||
@ -833,7 +847,7 @@ class WebCalReport(Report):
|
||||
|
||||
# Add xml, doctype, meta and stylesheets
|
||||
# body has already been added to webcal already once
|
||||
webcal, body = self.write_header(nr_up, 'WebCal', self.title_text)
|
||||
webcal, body = self.write_header(nr_up, self.title_text)
|
||||
|
||||
# create Year Navigation menu
|
||||
if (self.multiyear and ((self.end_year - self.start_year) > 0)):
|
||||
@ -896,7 +910,7 @@ class WebCalReport(Report):
|
||||
|
||||
# Create page header
|
||||
# body has already been added to yearglance already once
|
||||
yearglance, body = self.write_header(nr_up, 'fullyearlinked', title, False)
|
||||
yearglance, body = self.write_header(nr_up, title, "fullyearlinked", False)
|
||||
|
||||
# create Year Navigation menu
|
||||
if (self.multiyear and ((self.end_year - self.start_year) > 0)):
|
||||
@ -964,7 +978,7 @@ class WebCalReport(Report):
|
||||
title = _('One Day Within A Year')
|
||||
|
||||
# create page header
|
||||
oneday, body = self.write_header(nr_up, 'OneDay', title)
|
||||
oneday, body = self.write_header(nr_up, title, "OneDay")
|
||||
|
||||
# create Year Navigation menu
|
||||
if (self.multiyear and ((self.end_year - self.start_year) > 0)):
|
||||
@ -1371,7 +1385,7 @@ class WebCalOptions(MenuReportOptions):
|
||||
css = EnumeratedListOption(_('StyleSheet'), CSS_FILES[0][1])
|
||||
for style in CSS_FILES:
|
||||
css.add_item(style[1], style[0])
|
||||
css.set_help( _('The Style Sheet to be used for the web page'))
|
||||
css.set_help( _('The stylesheet to be used for the web pages'))
|
||||
menu.add_option(category_name, "css", css)
|
||||
|
||||
def __add_content_options(self, menu):
|
||||
|
Loading…
Reference in New Issue
Block a user