From fd742045d1b7af72cd9b29ccdbcd156cf3f4d44d Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 9 Dec 2008 05:22:20 +0000 Subject: [PATCH] Enable simple customization of server XUL: * create a *_custom.css file per CSS file in server/skin that is protected on upgrades * use the !important attribute to override properties in the parent CSS file Update the Makefile to generate *_custom.css stubs if they do not already exist Remove * {font-size: large;} property from patron_summary.css git-svn-id: svn://svn.open-ils.org/ILS/trunk@11469 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/Makefile.am | 10 +++++++--- Open-ILS/xul/staff_client/server/skin/cat.css | 3 ++- Open-ILS/xul/staff_client/server/skin/circ.css | 3 ++- Open-ILS/xul/staff_client/server/skin/global.css | 3 ++- Open-ILS/xul/staff_client/server/skin/patron_display.css | 3 ++- Open-ILS/xul/staff_client/server/skin/patron_summary.css | 5 ++--- Open-ILS/xul/staff_client/server/skin/simple_auth.css | 3 ++- 7 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Open-ILS/xul/staff_client/Makefile.am b/Open-ILS/xul/staff_client/Makefile.am index 5ff8edaf09..40c8057beb 100644 --- a/Open-ILS/xul/staff_client/Makefile.am +++ b/Open-ILS/xul/staff_client/Makefile.am @@ -5,11 +5,12 @@ export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID) OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript" -CHROME_LOCALES = $$(ls chrome/locale) +CHROME_LOCALES = $$(ls -1 chrome/locale) +SKIN_CSS = $$(ls -1 server/skin/*css | sed -e "s/.css/_custom.css/") install-exec-local: build -build: build_dir chrome2remote generated open-ils stamp +build: build_dir chrome2remote generated custom_skins open-ils stamp @echo To test the staff client: @echo " cd build/" @echo " xulrunner application.ini" @@ -62,4 +63,7 @@ open-ils: cp $(OPENSRF_JSLIBS)/*.js build/chrome/content/OpenILS/util/ external/prune_dirs.sh build/ - +custom_skins: + @for skin in $(SKIN_CSS); do \ + if [ ! -f "$$skin" ]; then touch build/"$$skin"; fi \ + done; diff --git a/Open-ILS/xul/staff_client/server/skin/cat.css b/Open-ILS/xul/staff_client/server/skin/cat.css index 15fa17407e..ab922f2b5b 100644 --- a/Open-ILS/xul/staff_client/server/skin/cat.css +++ b/Open-ILS/xul/staff_client/server/skin/cat.css @@ -1,5 +1,6 @@ +@import url("cat_custom.css"); + @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/TR/REC-html40"); .has_copies { color: black; background-color: lightgreen; font-weight: bold; } - diff --git a/Open-ILS/xul/staff_client/server/skin/circ.css b/Open-ILS/xul/staff_client/server/skin/circ.css index 19db78ef40..4c201685c7 100644 --- a/Open-ILS/xul/staff_client/server/skin/circ.css +++ b/Open-ILS/xul/staff_client/server/skin/circ.css @@ -1,3 +1,4 @@ +@import url("circ_custom.css"); + @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/TR/REC-html40"); - diff --git a/Open-ILS/xul/staff_client/server/skin/global.css b/Open-ILS/xul/staff_client/server/skin/global.css index 8a2f43efb4..f0d0f9ec52 100644 --- a/Open-ILS/xul/staff_client/server/skin/global.css +++ b/Open-ILS/xul/staff_client/server/skin/global.css @@ -1,3 +1,5 @@ +@import url("global_custom.css"); + @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/TR/REC-html40"); @@ -97,4 +99,3 @@ listitem { border-bottom: solid thin black; } */ .edit_hold_range { display: none; } .edit_hold_focus { display: none; } - diff --git a/Open-ILS/xul/staff_client/server/skin/patron_display.css b/Open-ILS/xul/staff_client/server/skin/patron_display.css index ce4dbc9aee..4bd1a4cf4f 100755 --- a/Open-ILS/xul/staff_client/server/skin/patron_display.css +++ b/Open-ILS/xul/staff_client/server/skin/patron_display.css @@ -1,3 +1,5 @@ +@import url("patron_display_custom.css"); + @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/TR/REC-html40"); @@ -76,4 +78,3 @@ deck#patron_deck { border-left: solid thin black; } .PATRON_JUVENILE .dob { color: purple; } .PATRON_JUVENILE label.juvenile_indicator { display: inline; color: purple; } - diff --git a/Open-ILS/xul/staff_client/server/skin/patron_summary.css b/Open-ILS/xul/staff_client/server/skin/patron_summary.css index 411b83ca1d..c98e600a10 100755 --- a/Open-ILS/xul/staff_client/server/skin/patron_summary.css +++ b/Open-ILS/xul/staff_client/server/skin/patron_summary.css @@ -1,9 +1,8 @@ +@import url("patron_summary_custom.css"); + @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/TR/REC-html40"); -* { font-size: large; } - .PENALTY_RENEW { background-color: yellow; } .PENALTY_HOLD { background-color: orange; } .PENALTY_CIRC { background-color: red; } - diff --git a/Open-ILS/xul/staff_client/server/skin/simple_auth.css b/Open-ILS/xul/staff_client/server/skin/simple_auth.css index c6dc57ed44..92777c8902 100755 --- a/Open-ILS/xul/staff_client/server/skin/simple_auth.css +++ b/Open-ILS/xul/staff_client/server/skin/simple_auth.css @@ -1,6 +1,7 @@ +@import url("simple_auth_custom.css"); + @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace html url("http://www.w3.org/TR/REC-html40"); .staff groupbox { border: #FF3333; } .temp groupbox { border: #FF9933; } - -- 2.11.0