[open-ils-commits] r14338 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/server/circ xul/staff_client/server/skin (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Oct 9 15:15:05 EDT 2009


Author: phasefx
Date: 2009-10-09 15:15:00 -0400 (Fri, 09 Oct 2009)
New Revision: 14338

Modified:
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/server/circ/checkin.js
   trunk/Open-ILS/xul/staff_client/server/circ/checkin.xul
   trunk/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
   trunk/Open-ILS/xul/staff_client/server/skin/circ.css
Log:
More CSS configurability for Checkin/Hold Capture interfaces, mostly so we can style those states from the Checkin Modifiers menu-button, like Amnesty Mode and Auto-Print Hold and Transit Slips.  Problem is, I don't know a
good way to style them.  End-users could create a circ_custom.css file mimicking circ.css and give any rules the ! important flag to override the stock CSS.

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-10-09 19:14:46 UTC (rev 14337)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2009-10-09 19:15:00 UTC (rev 14338)
@@ -1781,7 +1781,6 @@
 <!ENTITY staff.circ.checkin_overlay.sel_spine.accesskey "P">
 <!ENTITY staff.circ.checkin_overlay.save_columns.label "Save Columns">
 <!ENTITY staff.circ.checkin_overlay.background_text "Check In or Process Item">
-<!ENTITY staff.circ.checkin_overlay.background_text.hold_capture "Auto-Print Hold and Transit Slips">
 <!ENTITY staff.circ.checkin_overlay.effective_date.label "Effective Date:">
 <!ENTITY staff.circ.checkin_overlay.effective_date.accesskey "D">
 <!ENTITY staff.circ.checkin_overlay.actions.label "Actions for Selected Items">
@@ -1795,8 +1794,8 @@
 <!ENTITY staff.circ.checkin_overlay.suppress_holds_and_transits.accesskey "S">
 <!ENTITY staff.circ.checkin_overlay.amnesty_mode.label "Amnesty Mode / Forgive Fines">
 <!ENTITY staff.circ.checkin_overlay.amnesty_mode.accesskey "A">
-<!ENTITY staff.circ.checkin_overlay.checkin_auto.label "Auto-Print Hold and Transit Slips">
-<!ENTITY staff.circ.checkin_overlay.checkin_auto.accesskey "P">
+<!ENTITY staff.circ.checkin_overlay.checkin_auto_print_slips.label "Auto-Print Hold and Transit Slips">
+<!ENTITY staff.circ.checkin_overlay.checkin_auto_print_slips.accesskey "P">
 <!ENTITY staff.circ.checkin_overlay.checkin_modifiers_btn.label "Checkin Modifiers">
 <!ENTITY staff.circ.checkin_overlay.checkin_modifiers_btn.accesskey "M">
 <!ENTITY staff.circ.renew_overlay.background_text "Renew Item">

Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkin.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkin.js	2009-10-09 19:14:46 UTC (rev 14337)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkin.js	2009-10-09 19:15:00 UTC (rev 14338)
@@ -222,18 +222,28 @@
 									var x = document.getElementById('background');
 									if (x) {
 										if ( ev.target.value == util.date.formatted_date(new Date(),'%F') ) {
-											x.setAttribute('style','background-color: green');
+                                            //addCSSClass(x,'checkin_screen_normal');
+                                            removeCSSClass(x,'checkin_screen_backdating');
+                                            removeCSSClass(document.getElementById('background'),'checkin_screen_do_not_alert_on_precat');
+                                            removeCSSClass(document.getElementById('background'),'checkin_screen_suppress_holds_and_transits');
+                                            removeCSSClass(document.getElementById('background'),'checkin_screen_amnesty_mode');
+                                            removeCSSClass(document.getElementById('background'),'checkin_screen_checkin_auto_print_slips');
 											document.getElementById('background-text').setAttribute('value',document.getElementById('circStrings').getString('staff.circ.process_item'));
 										} else {
-											x.setAttribute('style','background-color: red');
+                                            addCSSClass(x,'checkin_screen_backdating');
+                                            //removeCSSClass(x,'checkin_screen_normal');
 											document.getElementById('background-text').setAttribute('value',document.getElementById('circStrings').getFormattedString('staff.circ.backdated_checkin', [ev.target.value]));
 										}
 									}
-
 								} catch(E) {
 									var x = document.getElementById('background');
 									if (x) {
-                                        x.setAttribute('style','background-color: green');
+                                        //addCSSClass(x,'checkin_screen_normal');
+                                        removeCSSClass(x,'checkin_screen_backdating');
+                                        removeCSSClass(document.getElementById('background'),'checkin_screen_do_not_alert_on_precat');
+                                        removeCSSClass(document.getElementById('background'),'checkin_screen_suppress_holds_and_transits');
+                                        removeCSSClass(document.getElementById('background'),'checkin_screen_amnesty_mode');
+                                        removeCSSClass(document.getElementById('background'),'checkin_screen_checkin_auto_print_slips');
                                         document.getElementById('background-text').setAttribute('value',document.getElementById('circStrings').getString('staff.circ.process_item'));
                                     }
 									dump('checkin:effective_date: ' + E + '\n');
@@ -277,6 +287,50 @@
 					'cmd_csv_to_file' : [ ['command'], function() { 
                         obj.list.dump_csv_to_file( { 'defaultFileName' : 'checked_in.txt' } ); 
                         obj.controller.view.checkin_barcode_entry_textbox.focus();
+                    } ],
+                    'cmd_do_not_alert_on_precat' : [ ['command'], function(ev) {
+                        dump('in cmd_do_not_alert_on_precat\n');
+                        var bg = document.getElementById('background');
+                        var cb = document.getElementById('do_not_alert_on_precat');
+                        var ind = document.getElementById('do_not_alert_on_precat_indicator');
+                        var cn = 'checkin_screen_do_not_alert_on_precat';
+                        if (cb.getAttribute('checked') == 'true') { addCSSClass(bg,cn); } else { removeCSSClass(bg,cn); }
+                        ind.hidden = cb.getAttribute('checked') != 'true'; 
+                        document.getElementById('checkin_barcode_entry_textbox').focus();
+                        return true;
+                    } ],
+                    'cmd_suppress_holds_and_transits' : [ ['command'], function(ev) {
+                        dump('in cmd_suppress_holds_and_transits\n');
+                        var bg = document.getElementById('background');
+                        var cb = document.getElementById('suppress_holds_and_transits');
+                        var ind = document.getElementById('suppress_holds_and_transits_indicator');
+                        var cn = 'checkin_screen_suppress_holds_and_transits';
+                        if (cb.getAttribute('checked') == 'true') { addCSSClass(bg,cn); } else { removeCSSClass(bg,cn); }
+                        ind.hidden = cb.getAttribute('checked') != 'true'; 
+                        document.getElementById('checkin_barcode_entry_textbox').focus();
+                        return true;
+                    } ],
+                    'cmd_amnesty_mode' : [ ['command'], function(ev) {
+                        dump('in cmd_amnesty_mode\n');
+                        var bg = document.getElementById('background');
+                        var cb = document.getElementById('amnesty_mode');
+                        var ind = document.getElementById('amnesty_mode_indicator');
+                        var cn = 'checkin_screen_amnesty_mode';
+                        if (cb.getAttribute('checked') == 'true') { addCSSClass(bg,cn); } else { removeCSSClass(bg,cn); }
+                        ind.hidden = cb.getAttribute('checked') != 'true'; 
+                        document.getElementById('checkin_barcode_entry_textbox').focus();
+                        return true;
+                    } ],
+                    'cmd_checkin_auto_print_slips' : [ ['command'], function(ev) {
+                        dump('in cmd_checkin_auto_print_slips\n');
+                        var bg = document.getElementById('background');
+                        var cb = document.getElementById('checkin_auto_print_slips');
+                        var ind = document.getElementById('checkin_auto_print_slips_indicator');
+                        var cn = 'checkin_screen_checkin_auto_print_slips';
+                        if (cb.getAttribute('checked') == 'true') { addCSSClass(bg,cn); } else { removeCSSClass(bg,cn); }
+                        ind.hidden = cb.getAttribute('checked') != 'true'; 
+                        document.getElementById('checkin_barcode_entry_textbox').focus();
+                        return true;
                     } ]
 				}
 			}
@@ -355,7 +409,7 @@
 				if ( obj.test_barcode(barcode) ) { /* good */ } else { /* bad */ return; }
 			}
 			var backdate = obj.controller.view.checkin_effective_datepicker.value;
-			var auto_print = document.getElementById('checkin_auto');
+			var auto_print = document.getElementById('checkin_auto_print_slips');
 			if (auto_print) auto_print = auto_print.getAttribute('checked') == 'true';
 			JSAN.use('circ.util');
             var params = { 

Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkin.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkin.xul	2009-10-09 19:14:46 UTC (rev 14337)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkin.xul	2009-10-09 19:15:00 UTC (rev 14338)
@@ -42,11 +42,12 @@
 
 				var tab_name;
 				if (xul_param('hold_capture')) {
-					document.getElementById('checkin_auto').checked = true;
-					document.getElementById('checkin_auto').hidden = true;
+					var cb1 = document.getElementById('checkin_auto_print_slips'); cb1.hidden = true; cb1.checked = true;
+					var cb1_ind = document.getElementById('checkin_auto_print_slips_indicator'); cb1_ind.hidden = false;
+					var cb2 = document.getElementById('suppress_holds_and_transits'); cb2.hidden = true; cb2.checked = false;
+					var cb2_ind = document.getElementById('suppress_holds_and_transits_indicator'); cb2_ind.hidden = true;
 					document.getElementById('checkin_effective_date_hbox').hidden = true;
 					document.getElementById('caption').setAttribute('label',document.getElementById('circStrings').getString('staff.circ.checkin.hold_capture'));
-					document.getElementById('hold_capture_blurb').hidden = false;
 					tab_name = document.getElementById('circStrings').getString('staff.circ.checkin.hold_capture');
 				} else {
 					tab_name = document.getElementById('circStrings').getString('staff.circ.checkin.check_in.tab');
@@ -95,6 +96,10 @@
 		<command id="sel_transit_abort" disabled="true"/>
 		<command id="sel_mark_items_damaged" disabled="true"/>
 
+		<command id="cmd_do_not_alert_on_precat" />
+		<command id="cmd_suppress_holds_and_transits" />
+		<command id="cmd_amnesty_mode" />
+		<command id="cmd_checkin_auto_print_slips" />
 	</commandset>
 
     <messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties"/>

Modified: trunk/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul	2009-10-09 19:14:46 UTC (rev 14337)
+++ trunk/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul	2009-10-09 19:15:00 UTC (rev 14338)
@@ -38,16 +38,15 @@
 </box>
 
 <vbox id="cmvb1" flex="1">
-	<hbox id="background" style="background-color: green;">
+	<hbox id="background" class="checkin_screen_normal">
 		<spacer flex="1"/>
 		<vbox>
-			<hbox align="center"><label id="background-text" value="&staff.circ.checkin_overlay.background_text;" style="font-size: x-large; font-weight: bold;"/></hbox>
-			<hbox align="center"><label id="hold_capture_blurb" hidden="true" value="&staff.circ.checkin_overlay.background_text.hold_capture;" style="font-size: large; font-weight: bold;"/></hbox>
+			<hbox align="center"><label id="background-text" value="&staff.circ.checkin_overlay.background_text;" /></hbox>
             <vbox align="center">
-                <description id="do_not_alert_on_precat_indicator" hidden="true" style="font-size: large; font-weight: bold;">&staff.circ.checkin_overlay.do_not_alert_on_precat.label;</description>
-                <description id="suppress_holds_and_transits_indicator" hidden="true" style="font-size: large; font-weight: bold;">&staff.circ.checkin_overlay.suppress_holds_and_transits.label;</description>
-                <description id="amnesty_mode_indicator" hidden="true" style="font-size: large; font-weight: bold;">&staff.circ.checkin_overlay.amnesty_mode.label;</description>
-                <description id="checkin_auto_indicator" hidden="true" style="font-size: large; font-weight: bold;">&staff.circ.checkin_overlay.checkin_auto.label;</description>
+                <description id="do_not_alert_on_precat_indicator" hidden="true">&staff.circ.checkin_overlay.do_not_alert_on_precat.label;</description>
+                <description id="suppress_holds_and_transits_indicator" hidden="true">&staff.circ.checkin_overlay.suppress_holds_and_transits.label;</description>
+                <description id="amnesty_mode_indicator" hidden="true">&staff.circ.checkin_overlay.amnesty_mode.label;</description>
+                <description id="checkin_auto_print_slips_indicator" hidden="true">&staff.circ.checkin_overlay.checkin_auto_print_slips.label;</description>
             </vbox>
 		</vbox>
 		<spacer flex="1"/>
@@ -136,18 +135,14 @@
         accesskey="&staff.circ.checkin_overlay.checkin_modifiers_btn.accesskey;"
         type="menu" allowevents="false">
         <menupopup id="checkin_modifiers_popup">
-            <menuitem type="checkbox" id="do_not_alert_on_precat" oils_persist="checked" 
-                oncommand="document.getElementById('do_not_alert_on_precat_indicator').hidden = this.getAttribute('checked') != 'true'; document.getElementById('checkin_barcode_entry_textbox').focus();"
+            <menuitem type="checkbox" id="do_not_alert_on_precat" oils_persist="checked" command="cmd_do_not_alert_on_precat" oncommand="alert('here too');"
                 label="&staff.circ.checkin_overlay.do_not_alert_on_precat.label;" accesskey="&staff.circ.checkin_overlay.do_not_alert_on_precat.accesskey;"/>
-            <menuitem type="checkbox" id="suppress_holds_and_transits" oils_persist="checked" 
-                oncommand="document.getElementById('suppress_holds_and_transits_indicator').hidden = this.getAttribute('checked') != 'true'; document.getElementById('checkin_barcode_entry_textbox').focus();"
+            <menuitem type="checkbox" id="suppress_holds_and_transits" oils_persist="checked" command="cmd_suppress_holds_and_transits"
                 label="&staff.circ.checkin_overlay.suppress_holds_and_transits.label;" accesskey="&staff.circ.checkin_overlay.suppress_holds_and_transits.accesskey;"/>
-            <menuitem type="checkbox" id="amnesty_mode" oils_persist="checked" 
-                oncommand="document.getElementById('amnesty_mode_indicator').hidden = this.getAttribute('checked') != 'true'; document.getElementById('checkin_barcode_entry_textbox').focus();"
+            <menuitem type="checkbox" id="amnesty_mode" oils_persist="checked" command="cmd_amnesty_mode"
                 label="&staff.circ.checkin_overlay.amnesty_mode.label;" accesskey="&staff.circ.checkin_overlay.amnesty_mode.accesskey;"/>
-            <menuitem type="checkbox" id="checkin_auto" oils_persist="checked" 
-                oncommand="document.getElementById('checkin_auto_indicator').hidden = this.getAttribute('checked') != 'true'; document.getElementById('checkin_barcode_entry_textbox').focus();"
-                label="&staff.circ.checkin_overlay.checkin_auto.label;" accesskey="&staff.circ.checkin_overlay.checkin_auto.accesskey;"/>
+            <menuitem type="checkbox" id="checkin_auto_print_slips" oils_persist="checked" command="cmd_checkin_auto_print_slips"
+                label="&staff.circ.checkin_overlay.checkin_auto_print_slips.label;" accesskey="&staff.circ.checkin_overlay.checkin_auto_print_slips.accesskey;"/>
         </menupopup>
     </button>
 </hbox>

Modified: trunk/Open-ILS/xul/staff_client/server/skin/circ.css
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/skin/circ.css	2009-10-09 19:14:46 UTC (rev 14337)
+++ trunk/Open-ILS/xul/staff_client/server/skin/circ.css	2009-10-09 19:15:00 UTC (rev 14338)
@@ -2,3 +2,17 @@
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); 
 @namespace html url("http://www.w3.org/TR/REC-html40"); 
+
+.checkin_screen_normal { background-color: green; }
+.checkin_screen_backdating { background-color: red; }
+.checkin_screen_do_not_alert_on_precat { }
+.checkin_screen_suppress_holds_and_transits { }
+.checkin_screen_amnesty_mode { }
+.checkin_screen_checkin_auto_print_slips { }
+
+#background-text { font-size: x-large; font-weight: bold; }
+#do_not_alert_on_precat_indicator { background-color: -moz-dialog; color: -moz-dialog-text; font-size: large; font-weight: bold; }
+#suppress_holds_and_transits_indicator { background-color: -moz-dialog; color: -moz-dialog-text; font-size: large; font-weight: bold; }
+#amnesty_mode_indicator { background-color: -moz-dialog; color: -moz-dialog-text; font-size: large; font-weight: bold; }
+#checkin_auto_print_slips_indicator { background-color: -moz-dialog; color: -moz-dialog-text; font-size: large; font-weight: bold; }
+



More information about the open-ils-commits mailing list