Added option to choose which layout the user wants for the Source Page Citation Referents section as either Outline or Drop Down.

svn: r18997
This commit is contained in:
Rob G. Healey
2012-03-03 08:25:12 +00:00
parent 26bbb654d0
commit f76a460b28
13 changed files with 148 additions and 185 deletions

View File

@@ -9,13 +9,14 @@ DATAFILES = \
ancestortree.css \
behaviour.css \
narrative-maps.css \
Web_Animated-Dropdown.css \
Web_Basic-Ash.css \
Web_Basic-Blue.css \
Web_Basic-Cypress.css \
Web_Basic-Lilac.css \
Web_Basic-Peach.css \
Web_Basic-Spruce.css \
Web_Citations-Animated.css \
Web_Citations-Outline.css \
Web_DropDown-Menus.css \
Web_Fade-Menus.css \
Web_Horizontal-Menus.css \

View File

@@ -367,21 +367,6 @@ table.IndividualList td.ColumnSurname {
div#SourceDetail {
margin: 0 auto;
}
div#SourceCitationReferents ul.Col1 {
list-style-type: decimal
}
div#SourceCitationReferents ul.Col2 {
list-style-type: upper-alpha
}
div#SourceCitationReferents ul.Col3 {
list-style-type: lower-alpha
}
div#SourceCitationReferents ul.Col4 {
list-style-type: lower-roman
}
div#SourceCitationReferents ul.Col5 {
list-style-type: disc
}
/* Contact
----------------------------------------------------- */

View File

@@ -405,21 +405,6 @@ table.IndividualList td.ColumnSurname {
div#SourceDetail {
margin: 0 auto;
}
div#SourceCitationReferents ul.Col1 {
list-style-type: decimal
}
div#SourceCitationReferents ul.Col2 {
list-style-type: upper-alpha
}
div#SourceCitationReferents ul.Col3 {
list-style-type: lower-alpha
}
div#SourceCitationReferents ul.Col4 {
list-style-type: upper-roman
}
div#SourceCitationReferents ul.Col5 {
list-style-type: disc
}
/* Contact
----------------------------------------------------- */

View File

@@ -406,21 +406,6 @@ table.IndividualList td.ColumnSurname {
div#SourceDetail {
margin: 0 auto;
}
div#SourceCitationReferents ul.Col1 {
list-style-type: decimal
}
div#SourceCitationReferents ul.Col2 {
list-style-type: upper-alpha
}
div#SourceCitationReferents ul.Col3 {
list-style-type: lower-alpha
}
div#SourceCitationReferents ul.Col4 {
list-style-type: upper-roman
}
div#SourceCitationReferents ul.Col5 {
list-style-type: disc
}
/* Contact
----------------------------------------------------- */

View File

@@ -406,21 +406,6 @@ table.IndividualList td.ColumnSurname {
div#SourceDetail {
margin: 0 auto;
}
div#SourceCitationReferents ul.Col1 {
list-style-type: decimal
}
div#SourceCitationReferents ul.Col2 {
list-style-type: upper-alpha
}
div#SourceCitationReferents ul.Col3 {
list-style-type: lower-alpha
}
div#SourceCitationReferents ul.Col4 {
list-style-type: upper-roman
}
div#SourceCitationReferents ul.Col5 {
list-style-type: disc
}
/* Contact
----------------------------------------------------- */

View File

@@ -406,21 +406,6 @@ table.IndividualList td.ColumnSurname {
div#SourceDetail {
margin: 0 auto;
}
div#SourceCitationReferents ul.Col1 {
list-style-type: decimal
}
div#SourceCitationReferents ul.Col2 {
list-style-type: upper-alpha
}
div#SourceCitationReferents ul.Col3 {
list-style-type: lower-alpha
}
div#SourceCitationReferents ul.Col4 {
list-style-type: upper-roman
}
div#SourceCitationReferents ul.Col5 {
list-style-type: disc
}
/* Contact
----------------------------------------------------- */

View File

@@ -0,0 +1,46 @@
/*
# encoding: utf-8
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright 2012 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
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
******************************************************
GRAMPS Cascading Style Sheet
Style Name: Web_Citations-Outline.css
******************************************************
# $Id$
Source Citations Outline styles
------------------------------------------------------ */
div#SourceCitationReferents ul.Col1 {
list-style-type: decimal
}
div#SourceCitationReferents ul.Col2 {
list-style-type: upper-alpha
}
div#SourceCitationReferents ul.Col3 {
list-style-type: lower-alpha
}
div#SourceCitationReferents ul.Col4 {
list-style-type: upper-roman
}
div#SourceCitationReferents ul.Col5 {
list-style-type: disc
}

View File

@@ -41,7 +41,7 @@ div#header {
/* Drop Down Navigation Menu
------------------------------------------------------ */
#dropmenu {
ul#dropmenu {
width: 100%;
margin: 0 auto;
padding: 10px 0 0 0;
@@ -59,12 +59,12 @@ div#header {
-webkit-box-shadow: 0 2px 1px #9c9c9c;
box-shadow: 0 2px 1px #9c9c9c;
}
#dropmenu li {
ul#dropmenu li {
float: left;
padding: 0 0 10px 0;
position: relative;
}
#dropmenu a {
ul#dropmenu a {
float: left;
height: 25px;
padding: 0 25px;
@@ -74,21 +74,21 @@ div#header {
text-decoration: none;
text-shadow: 0 1px 0 #000;
}
#dropmenu li:hover > a {
ul#dropmenu li:hover > a {
color: #fafafa
}
*html #dropmenu li a:hover /* IE6 */
*html ul#dropmenu li a:hover /* IE6 */
{
color: #fafafa
}
#dropmenu li:hover > ul {
ul#dropmenu li:hover > ul {
display: block
}
/* Sub-menu
------------------------------------------------------ */
#dropmenu ul {
ul#dropmenu ul {
list-style: none;
margin: 0;
padding: 0;
@@ -107,7 +107,7 @@ div#header {
-moz-border-radius: 5px;
border-radius: 5px;
}
#dropmenu ul li {
ul#dropmenu ul li {
float: none;
margin: 0;
padding: 0;
@@ -116,12 +116,12 @@ div#header {
-webkit-box-shadow: 0 1px 0 #111111, 0 2px 0 #777777;
box-shadow: 0 1px 0 #111111, 0 2px 0 #777777;
}
#dropmenu ul li:last-child {
ul#dropmenu ul li:last-child {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#dropmenu ul a {
ul#dropmenu ul a {
padding: 10px;
height: auto;
line-height: 1;
@@ -130,17 +130,17 @@ div#header {
float: none;
text-transform: none;
}
*html #dropmenu ul a /* IE6 */
*html ul#dropmenu ul a /* IE6 */
{
height: 10px;
width: 150px;
}
*:first-child+html #dropmenu ul a /* IE7 */
*:first-child+html ul#dropmenu ul a /* IE7 */
{
height: 10px;
width: 150px;
}
#dropmenu ul a:hover {
ul#dropmenu ul a:hover {
background: #0186ba;
background: -moz-linear-gradient(#04acec, #0186ba);
background: -webkit-gradient(linear, left top, left bottom, from(#04acec), to(#0186ba));
@@ -149,11 +149,11 @@ div#header {
background: -ms-linear-gradient(#04acec, #0186ba);
background: linear-gradient(#04acec, #0186ba);
}
#dropmenu ul li:first-child a {
ul#dropmenu ul li:first-child a {
-moz-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
#dropmenu ul li:first-child a:after {
ul#dropmenu ul li:first-child a:after {
content: '';
position: absolute;
left: 30px;
@@ -164,17 +164,17 @@ div#header {
border-right: 5px solid transparent;
border-bottom: 8px solid #444;
}
#dropmenu ul li:first-child a:hover:after {
ul#dropmenu ul li:first-child a:hover:after {
border-bottom-color: #04acec
}
#dropmenu ul li:last-child a {
ul#dropmenu ul li:last-child a {
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
/* Clear floated elements
------------------------------------------------------ */
#dropmenu:after {
ul#dropmenu:after {
visibility: hidden;
display: block;
font-size: 0;
@@ -183,8 +183,8 @@ div#header {
height: 0;
}
* html #dropmenu { zoom: 1; } /* IE6 */
*:first-child+html #dropmenu { zoom: 1; } /* IE7 */
* html ul#dropmenu { zoom: 1; } /* IE6 */
*:first-child+html ul#dropmenu { zoom: 1; } /* IE7 */
/* Alphabet Navigation and Year Menu
------------------------------------------------------ */

View File

@@ -358,21 +358,6 @@ table#SortByCount thead th.ColumnQuantity a:after {
div#SourceDetail {
margin: 0 auto;
}
div#SourceCitationReferents ul.Col1 {
list-style-type: decimal
}
div#SourceCitationReferents ul.Col2 {
list-style-type: upper-alpha
}
div#SourceCitationReferents ul.Col3 {
list-style-type: lower-alpha
}
div#SourceCitationReferents ul.Col4 {
list-style-type: upper-roman
}
div#SourceCitationReferents ul.Col5 {
list-style-type: disc
}
/* Contact
-----------------------------------------------------------------*/

View File

@@ -508,21 +508,6 @@ table.attrlist tbody tr td.ColumnSources {
div#SourceDetail {
margin: 0 auto;
}
div#SourceCitationReferents ul.Col1 {
list-style-type: decimal
}
div#SourceCitationReferents ul.Col2 {
list-style-type: upper-alpha
}
div#SourceCitationReferents ul.Col3 {
list-style-type: lower-alpha
}
div#SourceCitationReferents ul.Col4 {
list-style-type: upper-roman
}
div#SourceCitationReferents ul.Col5 {
list-style-type: disc
}
/* Relationships
================================================= */

View File

@@ -34,12 +34,12 @@ def make_css_dict(tup):
"""
return {
"id": tup[0],
"user": tup[1],
"translation": tup[2],
"filename": tup[3],
"navigation": tup[4],
"images": tup[5],
"javascript": tup[6],
"user" : tup[1],
"translation" : tup[2],
"filename" : tup[3],
"navigation" : tup[4],
"images" : tup[5],
"javascript" : tup[6],
}
def load_on_reg(dbstate, uistate, plugin):
@@ -53,35 +53,36 @@ def load_on_reg(dbstate, uistate, plugin):
path_js = partial(os.path.join, dir, "js")
CSS_FILES = [
# id, user selectable?, translated_name, fullpath, navigation target name, images, javascript
# id, user selectable?, translated_name, option name, fullpath,
# navigation target name, images, javascript
# "default" is used as default
# Basic Ash style sheet
["Basic-Ash", 1, _("Basic-Ash"),
["Basic-Ash", 1, _("Basic-Ash"),
path_css('Web_Basic-Ash.css'), None, [], [] ],
# Basic Blue style sheet with navigation menus
["Basic-Blue", 1, _("Basic-Blue"),
["Basic-Blue", 1, _("Basic-Blue"),
path_css('Web_Basic-Blue.css'), "narrative-menus.css", [], [] ],
# Basic Cypress style sheet
["Basic-Cypress", 1, _("Basic-Cypress"),
["Basic-Cypress", 1, _("Basic-Cypress"),
path_css('Web_Basic-Cypress.css'), None, [], [] ],
# basic Lilac style sheet
["Basic-Lilac", 1, _("Basic-Lilac"),
["Basic-Lilac", 1, _("Basic-Lilac"),
path_css('Web_Basic-Lilac.css'), None, [], [] ],
# basic Peach style sheet
["Basic-Peach", 1, _("Basic-Peach"),
["Basic-Peach", 1, _("Basic-Peach"),
path_css('Web_Basic-Peach.css'), None, [], [] ],
# basic Spruce style sheet
["Basic-Spruce", 1, _("Basic-Spruce"),
["Basic-Spruce", 1, _("Basic-Spruce"),
path_css('Web_Basic-Spruce.css'), None, [], [] ],
# Mainz style sheet with its images
["Mainz", 1, _("Mainz"),
["Mainz", 1, _("Mainz"),
path_css('Web_Mainz.css'), None,
[path_img("Web_Mainz_Bkgd.png"),
path_img("Web_Mainz_Header.png"),
@@ -89,11 +90,11 @@ def load_on_reg(dbstate, uistate, plugin):
path_img("Web_Mainz_MidLight.png")], [] ],
# Nebraska style sheet
["Nebraska", 1, _("Nebraska"),
["Nebraska", 1, _("Nebraska"),
path_css('Web_Nebraska.css'), None, [], [] ],
# Visually Impaired style sheet with its navigation menus
["Visually Impaired", 1, _("Visually Impaired"),
["Visually Impaired", 1, _("Visually Impaired"),
path_css('Web_Visually.css'), "narrative-menus.css", [], [] ],
# ancestor tree style sheet and its images
@@ -103,7 +104,7 @@ def load_on_reg(dbstate, uistate, plugin):
path_img("Web_Gender_Male.png")], [] ],
# media reference regions style sheet
["behaviour", 0, "Behaviour",
["behaviour", 0, "Behaviour",
path_css('behaviour.css'), None, [], [] ],
# NarrativeMap stylesheet/ image for NarrativeWeb place maps
@@ -111,36 +112,40 @@ def load_on_reg(dbstate, uistate, plugin):
path_css("narrative-maps.css"), None, [], [] ],
# default style sheet in the options
["default", 0, _("Basic-Ash"),
["default", 0, _("Basic-Ash"),
path_css('Web_Basic-Ash.css'), None, [], [] ],
# default printer style sheet
["Print-Default", 0, "Print-Default",
["Print-Default", 0, "Print-Default",
path_css('Web_Print-Default.css'), None, [], [] ],
# Horizontal Navigation Menus Style Sheet
["Horizontal-Menus", 0, "Horizontal Menus",
["Horizontal-Menus", 0, "Horizontal Menus",
path_css('Web_Horizontal-Menus.css'), None, [], [] ],
# Vertical Navigation Menus Style Sheet
["Vertical-Menus", 0, "Vertical Menus",
["Vertical-Menus", 0, "Vertical Menus",
path_css('Web_Vertical-Menus.css'), None, [], [] ],
# WebKit/ Html5/ CSS3 Fade Navigation Menus Style Sheet
["Fade-Menus", 0, "Fade In/ Out Menus",
["Fade-Menus", 0, "Fade In/ Out Menus",
path_css('Web_Fade-Menus.css'), None, [], [] ],
# WebKit/ Html5/ CSS3 Animated Drop Down Style Sheet
["Animated Dropdown", 0, "Animated Dropdown",
path_css("Web_Animated-Dropdown.css"), None, [],
["Animated DropDown", 0, "Animated DropDown",
path_css("Web_Citations-Animated.css"), None, [],
path_js("jquery-1.7.1.min.js") ],
# Source Page Citations Referents Outline Style sheet...
["Outline", 0, "Outline Citations",
path_css("Web_Citations-Outline.css"), None, [], [] ],
# WebKit/ Html5/ CSS3 Drop Down Navigation Menus Style Sheet
["DropDown-Menus", 0, "Drop Down Menus",
path_css("Web_DropDown-Menus.css"), None, [], [] ],
# GeoView style sheet with its image
["GeoView", 0, "GeoView",
["GeoView", 0, "GeoView",
path_css("GeoView.css"), None,
[path_img("crosshairs.png"),
path_img("gramps-geo-altmap.png"),
@@ -153,12 +158,12 @@ def load_on_reg(dbstate, uistate, plugin):
["No style sheet",1, _("No style sheet"), [], None, [], [] ],
# all other images for use in NarrativeWeb
['All Images', 0, 'All Images', None, None,
['All Images', 0, 'All Images', None, None,
[path_img("blank.gif"),
path_img("document.png")], [] ],
# Gramps Fav icon #2
["favicon2", 0, "FavIcon2",
["favicon2", 0, "FavIcon2",
path_img("favicon2.ico"), None, [], [] ],
# copyright image
@@ -178,7 +183,7 @@ def process_list(data):
if file:
path, filename = os.path.split(file)
# is there a override file in the VERSION_DIR/webstuff?
# eg, ~/.gramps/gramps33/webstuff/Web_Nebraska.css
# eg, ~/.gramps/gramps34/webstuff/Web_Nebraska.css
# if so, replace this one:
override = os.path.join(const.VERSION_DIR, "webstuff", filename)
if os.path.exists(override):