global font settings
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 27 Aug 2006 02:43:06 +0000 (02:43 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 27 Aug 2006 02:43:06 +0000 (02:43 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5716 dcc99617-32d9-48b4-a31d-7c20da2025e4

24 files changed:
Open-ILS/xul/staff_client/server/OpenILS/global_util.js
Open-ILS/xul/staff_client/server/admin/font_settings.xul [new file with mode: 0644]
Open-ILS/xul/staff_client/server/admin/index.xhtml
Open-ILS/xul/staff_client/server/patron/adv_barcode_entry.xul
Open-ILS/xul/staff_client/server/patron/barcode_entry.xul
Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul
Open-ILS/xul/staff_client/server/patron/bill_check_info.xul
Open-ILS/xul/staff_client/server/patron/bill_details.xul
Open-ILS/xul/staff_client/server/patron/bill_history.xul
Open-ILS/xul/staff_client/server/patron/bill_wizard.xul
Open-ILS/xul/staff_client/server/patron/bills.xul
Open-ILS/xul/staff_client/server/patron/display.xul
Open-ILS/xul/staff_client/server/patron/hold_notices.xul
Open-ILS/xul/staff_client/server/patron/holds.xul
Open-ILS/xul/staff_client/server/patron/info.xul
Open-ILS/xul/staff_client/server/patron/info_group.xul
Open-ILS/xul/staff_client/server/patron/info_notes.xul
Open-ILS/xul/staff_client/server/patron/info_stat_cats.xul
Open-ILS/xul/staff_client/server/patron/info_surveys.xul
Open-ILS/xul/staff_client/server/patron/items.xul
Open-ILS/xul/staff_client/server/patron/search_form.xul
Open-ILS/xul/staff_client/server/patron/search_result.xul
Open-ILS/xul/staff_client/server/patron/summary.xul
Open-ILS/xul/staff_client/server/skin/global.css

index b0f82bc..79bdc6a 100644 (file)
                }
        }
 
+       function font_helper() {
+               try {
+                       JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
+                       removeCSSClass(document.documentElement,'ALL_FONTS_LARGER');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_SMALLER');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_XX_SMALL');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_X_SMALL');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_SMALL');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_MEDIUM');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_LARGE');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_X_LARGE');
+                       removeCSSClass(document.documentElement,'ALL_FONTS_XX_LARGE');
+                       addCSSClass(document.documentElement,data.global_font_adjust);
+               } catch(E) {
+                       alert("Error with adjusting the font size: " + E);
+               }
+       }
+
        function get_bool(a) {
                // Normal javascript interpretation except 'f' == false, per postgres, and 'F' == false
                // So false includes 'f', '', 0, null, and undefined
diff --git a/Open-ILS/xul/staff_client/server/admin/font_settings.xul b/Open-ILS/xul/staff_client/server/admin/font_settings.xul
new file mode 100644 (file)
index 0000000..5d0c7d0
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Example Template for remote xul -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window PUBLIC "" ""[
+       <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
+]>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
+
+<window id="font_settings_win" 
+       onload="try { my_init(); } catch(E) { alert(E); }"
+       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+       <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+       <!-- BEHAVIOR -->
+    <script type="text/javascript">
+               var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
+       </script>
+    <scripts id="openils_util_scripts"/>
+
+       <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
+       <script>
+       <![CDATA[
+               function my_init() {
+                       try {
+                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+                               if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
+                               JSAN.errorLevel = "die"; // none, warn, or die
+                               JSAN.addRepository('/xul/server/');
+                               JSAN.use('util.error'); g.error = new util.error();
+                               g.error.sdump('D_TRACE','my_init() for font_settings.xul');
+
+                               JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.stash_retrieve();
+
+                       } catch(E) {
+                               try { g.error.standard_unexpected_error_alert('admin/font_settings.xul',E); } catch(F) { alert(E); }
+                       }
+               }
+
+       ]]>
+       </script>
+
+       <groupbox>
+               <caption label="Adjust Global Font Size"/>
+               <hbox>
+                       <vbox>
+                               <button class="ALL_FONTS_LARGER" label="Larger than Default" oncommand="g.data.global_font_adjust = 'ALL_FONTS_LARGER'; g.data.stash('global_font_adjust'); alert('Global Font Adjust set to Larger than Default');"/>
+                               <button class="ALL_FONTS_DEFAULT" label="Default" oncommand="g.data.global_font_adjust = 'ALL_FONTS_DEFAULT'; g.data.stash('global_font_adjust'); alert('Global Font Adjust set to Default');"/>
+                               <button class="ALL_FONTS_SMALLER" label="Smaller than Default" oncommand="g.data.global_font_adjust = 'ALL_FONTS_SMALLER'; g.data.stash('global_font_adjust'); alert('Global Font Adjust set to Smaller than Default');"/>
+                       </vbox>
+                       <vbox>
+                               <button class="ALL_FONTS_XX_SMALL" label="XX-Small" oncommand="g.data.global_font_adjust = 'ALL_FONTS_XX_SMALL'; g.data.stash('global_font_adjust'); alert('Global Font set to XX-Small');"/>
+                               <button class="ALL_FONTS_X_SMALL" label="X-Small" oncommand="g.data.global_font_adjust = 'ALL_FONTS_X_SMALL'; g.data.stash('global_font_adjust'); alert('Global Font set to X-Small');"/>
+                               <button class="ALL_FONTS_SMALL" label="Small" oncommand="g.data.global_font_adjust = 'ALL_FONTS_SMALL'; g.data.stash('global_font_adjust'); alert('Global Font set to Small');"/>
+                               <button class="ALL_FONTS_MEDIUM" label="Medium" oncommand="g.data.global_font_adjust = 'ALL_FONTS_MEDIUM'; g.data.stash('global_font_adjust'); alert('Global Font set to Medium');"/>
+                               <button class="ALL_FONTS_LARGE" label="Large" oncommand="g.data.global_font_adjust = 'ALL_FONTS_LARGE'; g.data.stash('global_font_adjust'); alert('Global Font set to Large');"/>
+                               <button class="ALL_FONTS_X_LARGE" label="X-Large" oncommand="g.data.global_font_adjust = 'ALL_FONTS_X_LARGE'; g.data.stash('global_font_adjust'); alert('Global Font set to X-Large');"/>
+                               <button class="ALL_FONTS_XX_LARGE" label="XX-Large" oncommand="g.data.global_font_adjust = 'ALL_FONTS_XX_LARGE'; g.data.stash('global_font_adjust'); alert('Global Font set to XX-Large');"/>
+                       </vbox>
+               </hbox>
+       </groupbox>
+
+</window>
+
index e9e201f..3c37cd4 100644 (file)
@@ -34,6 +34,9 @@
                                <a href='javascript:_l("printer_settings.html");'>Printer Settings Editor</a>
                        </div>
                        <div style='padding: 8px;'>
+                               <a href='javascript:_l("font_settings.xul");'>Global Font Settings</a>
+                       </div>
+                       <div style='padding: 8px;'>
                                <a href='javascript:_l("../patron/holds.xul");'>Alternate Pull List for Hold Requests</a>
                        </div>
                        <div style='padding: 8px;'>
index 8299810..9269946 100644 (file)
@@ -19,7 +19,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="patron_barcode_entry_win" 
-       onload="my_init()"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 3ab1d10..1615298 100644 (file)
@@ -19,7 +19,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="patron_barcode_entry_win" 
-       onload="my_init()"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index f1abed3..a59e864 100644 (file)
@@ -21,7 +21,7 @@
 
 <window id="patron_bill" title="CC Info"
        orient="vertical" style="overflow: auto"
-       onload="try{info_init();}catch(E){alert(E);}"
+       onload="try{info_init(); font_helper();}catch(E){alert(E);}"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 281fd46..caadcdd 100644 (file)
@@ -21,7 +21,7 @@
 
 <window id="patron_bill" title="Check Info"
        orient="vertical" style="overflow: auto"
-       onload="try{info_init();}catch(E){alert(E);}"
+       onload="try{info_init(); font_helper();}catch(E){alert(E);}"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index ab8590a..18e5ff8 100644 (file)
@@ -22,7 +22,7 @@
 <?xul-overlay href="/xul/server/patron/bill_summary_overlay.xul"?>
 
 <window id="bill_details_win" width="700" height="550"
-       onload="try{ my_init(); } catch(E) { alert(E); }"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 86ff884..4c24b1b 100644 (file)
@@ -22,7 +22,7 @@
 <?xul-overlay href="/xul/server/patron/bill_summary_overlay.xul"?>
 
 <window id="bill_history_win" width="700" height="550"
-       onload="try{ my_init(); } catch(E) { alert(E); }"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 9793c07..bc19041 100644 (file)
@@ -22,7 +22,7 @@
 
 <window id="patron_bill" title="Bill Patron Wizard"
        orient="vertical" style="overflow: auto"
-       onload="patron_bill_init()" width="700" height="550"
+       onload="try { patron_bill_init(); font_helper(); } catch(E) { alert(E); }" width="700" height="550"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 0d74e30..500d72d 100644 (file)
@@ -21,7 +21,7 @@
 <?xul-overlay href="/xul/server/patron/bills_overlay.xul"?>
 
 <window id="bills_win" 
-       onload="my_init()"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 7819f61..baaa347 100644 (file)
@@ -21,7 +21,7 @@
 <?xul-overlay href="/xul/server/patron/display_overlay.xul"?>
 
 <window id="patron_display_win" 
-       onload="try { my_init(); } catch(E) { alert(E); }"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 3307bbd..8b1ceef 100644 (file)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="hold_notices_win" width="700" height="550"
-       onload="try{ my_init(); } catch(E) { alert(E); }" title="Hold Notices"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }" title="Hold Notices"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index c4c2b98..7603e8a 100644 (file)
@@ -21,7 +21,7 @@
 <?xul-overlay href="/xul/server/patron/holds_overlay.xul"?>
 
 <window id="holds_win" 
-       onload="try { my_init(); } catch(E) { alert(E); }"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 6260513..f2cadbf 100644 (file)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="patron_info_win" width="700" height="550"
-       onload="try{ my_init(); } catch(E) { alert(E); }"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index ea96fe0..a54a45a 100644 (file)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="patron_info_group_win" width="700" height="550"
-       onload="try{ my_init(); } catch(E) { alert(E); }"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index cbf58f9..d446ada 100644 (file)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="patron_info_win" width="700" height="550"
-       onload="try{ my_init(); } catch(E) { alert(E); }"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 06eb552..4896300 100644 (file)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="patron_info_stat_cats_win" width="700" height="550"
-       onload="try{ my_init(); } catch(E) { alert(E); }"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index a868542..b4a4474 100644 (file)
@@ -20,7 +20,7 @@
 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
 
 <window id="patron_info_surveys_win" width="700" height="550"
-       onload="try{ my_init(); } catch(E) { alert(E); }"
+       onload="try{ my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 26cd0cf..911a418 100644 (file)
@@ -21,7 +21,7 @@
 <?xul-overlay href="/xul/server/patron/items_overlay.xul"?>
 
 <window id="items_win" 
-       onload="my_init()"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 80f2eeb..1f315c3 100644 (file)
@@ -21,7 +21,7 @@
 <?xul-overlay href="/xul/server/patron/search_form_overlay.xul"?>
 
 <window id="patron_search_form_win" 
-       onload="my_init()"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 5f70b3b..b5e4902 100644 (file)
@@ -21,7 +21,7 @@
 <?xul-overlay href="/xul/server/patron/search_result_overlay.xul"?>
 
 <window id="patron_search_result_win" 
-       onload="my_init()"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 1acddfc..700881c 100644 (file)
@@ -22,7 +22,7 @@
 <?xul-overlay href="/xul/server/patron/summary_overlay.xul"?>
 
 <window id="patron_summary_win" 
-       onload="try { my_init(); } catch(E) { alert(E); }"
+       onload="try { my_init(); font_helper(); } catch(E) { alert(E); }"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
        <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
index 8b4a1a9..4cba15e 100644 (file)
@@ -5,6 +5,16 @@
 * { font-size-adjust: .5; }
 */
 
+.ALL_FONTS_SMALLER * { font-size-adjust: .3 !important;}
+.ALL_FONTS_LARGER * { font-size-adjust: 1.1 !important; }
+.ALL_FONTS_XX_SMALL * { font-size: xx-small !important; }
+.ALL_FONTS_X_SMALL * { font-size: x-small !important; }
+.ALL_FONTS_SMALL * { font-size: small !important; }
+.ALL_FONTS_MEDIUM * { font-size: medium !important; }
+.ALL_FONTS_LARGE * { font-size: large !important; }
+.ALL_FONTS_X_LARGE * { font-size: x-large !important; }
+.ALL_FONTS_XX_LARGE * { font-size: xx-large !important; }
+
 description { -moz-user-select: text; }
 
 *|textarea:focus { background-color: #DDFFDD; }