[open-ils-commits] r12402 - in trunk/Open-ILS/xul/staff_client: chrome/content/main server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Mar 4 13:47:24 EST 2009


Author: phasefx
Date: 2009-03-04 13:47:21 -0500 (Wed, 04 Mar 2009)
New Revision: 12402

Added:
   trunk/Open-ILS/xul/staff_client/server/patron/search_form_horiz.xul
   trunk/Open-ILS/xul/staff_client/server/patron/search_form_horiz_overlay.xul
Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
   trunk/Open-ILS/xul/staff_client/server/patron/display.js
Log:
alternative horizontal patron search interface

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2009-03-04 16:30:55 UTC (rev 12401)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2009-03-04 18:47:21 UTC (rev 12402)
@@ -305,6 +305,7 @@
 	'XUL_PATRON_INFO_GROUP' : '/xul/server/patron/info_group.xul',
 	'XUL_PATRON_ITEMS' : '/xul/server/patron/items.xul',
 	'XUL_PATRON_SEARCH_FORM' : '/xul/server/patron/search_form.xul',
+	'XUL_PATRON_HORIZONTAL_SEARCH_FORM' : '/xul/server/patron/search_form_horiz.xul',
 	'XUL_PATRON_SEARCH_RESULT' : '/xul/server/patron/search_result.xul',
 	'XUL_PATRON_SUMMARY' : '/xul/server/patron/summary.xul',
 	'XUL_PRE_CAT' : '/xul/server/circ/pre_cat_fields.xul',

Modified: trunk/Open-ILS/xul/staff_client/server/patron/display.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/display.js	2009-03-04 16:30:55 UTC (rev 12401)
+++ trunk/Open-ILS/xul/staff_client/server/patron/display.js	2009-03-04 18:47:21 UTC (rev 12402)
@@ -622,7 +622,8 @@
 			obj.controller.view.cmd_patron_merge.setAttribute('disabled','true');
 			obj.controller.view.cmd_search_form.setAttribute('disabled','true');
 
-			var loc = urls.XUL_PATRON_SEARCH_FORM; 
+		    var horizontal_interface = String( obj.OpenILS.data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true';
+			var loc = horizontal_interface ? urls.XUL_PATRON_HORIZONTAL_SEARCH_FORM : urls.XUL_PATRON_SEARCH_FORM; 
 			var my_xulG = {
 				'clear_left_deck' : function() {
 					setTimeout( function() {

Added: trunk/Open-ILS/xul/staff_client/server/patron/search_form_horiz.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/search_form_horiz.xul	                        (rev 0)
+++ trunk/Open-ILS/xul/staff_client/server/patron/search_form_horiz.xul	2009-03-04 18:47:21 UTC (rev 12402)
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!-- Application: Evergreen Staff Client -->
+<!-- Screen: Patron Display -->
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- STYLESHEETS -->
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/patron_display.css" type="text/css"?>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- LOCALIZATION -->
+<!DOCTYPE window PUBLIC "" ""[
+	<!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
+<!-- OVERLAYS -->
+<?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
+<?xul-overlay href="/xul/server/patron/search_form_horiz_overlay.xul"?>
+
+<window id="patron_search_form_win" 
+	onload="try { my_init(); font_helper(); } 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 $(id) { return document.getElementById(id); }
+		
+		function my_init() {
+			try {
+				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+				if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.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 patron_search_form.xul');
+
+				g.cgi = new CGI();
+				var keys = g.cgi.keys();
+				var query = {};
+				for (var i = 0; i < keys.length; i++) {
+					query[keys[i]] = g.cgi.param(keys[i]);
+				}
+				if (xulG.query) {
+					for (var i in xulG.query) {
+                        if (typeof xulG.query[i] == 'object') { xulG.query[i] = xulG.query[i].value; }
+						query[i] = xulG.query[i];
+					}
+				}
+
+				JSAN.use('patron.search_form'); g.search_form = new patron.search_form();
+				g.search_form.init( { 'query' : query } );
+
+				if (g.cgi.param('doit')||xulG.doit) {
+					g.search_form.submit();
+				}
+	
+			} catch(E) {
+				var err_msg = $("commonStrings").getFormattedString('common.exception', ['patron/search_form_horiz.xul', E]);
+				try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); }
+				alert(err_msg);
+			}
+		}
+		
+		function default_focus() {
+			setTimeout(
+				function() {
+					try {
+						netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+						document.getElementById('family_name').focus();
+					} catch(E) {
+						g.error.sdump('D_ERROR','default_focus(): ' + js2JSON(E));
+					}
+				}, 0
+			);
+		}
+
+
+	]]>
+	</script>
+	
+	<messagecatalog id="patronStrings" src="/xul/server/locale/<!--#echo var='locale'-->/patron.properties"/>
+
+	<commandset id="patron_search_form_cmds">
+	</commandset>
+
+	<box id="patron_search_form_main" />
+
+</window>
+

Added: trunk/Open-ILS/xul/staff_client/server/patron/search_form_horiz_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/search_form_horiz_overlay.xul	                        (rev 0)
+++ trunk/Open-ILS/xul/staff_client/server/patron/search_form_horiz_overlay.xul	2009-03-04 18:47:21 UTC (rev 12402)
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE overlay PUBLIC "" ""[
+   <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
+]>
+
+
+<overlay id="patron_search_overlay" 
+	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+<script>dump('loading patron/search_overlay.xul\n');</script>
+
+<commandset id="patron_search_form_cmds">
+	<command id="cmd_patron_search_submit" />
+	<command id="cmd_patron_search_clear" />
+</commandset>
+
+<box id="patron_search_form_main" orient="vertical" class="my_overflow">
+	<groupbox id="psgf_gb">
+		<caption id="psgf_gbc" label='&staff.patron_search_form.caption;' />
+        <hbox>
+            <hbox>
+                <label control="inactive" accesskey="&staff.patron.search_form_overlay.inactive.accesskey;" value="&staff.patron.search_form_overlay.inactive.value;"/>
+                <checkbox id="inactive" />
+            </hbox>
+            <hbox>
+                <label control="search_range_menu" value="&staff.patron.search_form_overlay.search_range_menu.value;"/>
+                <hbox id="search_depth" />
+            </hbox>
+        </hbox>
+        <hbox>
+            <grid id="psg" />
+            <vbox flex="1">
+                <button id="search" flex="1" label="&staff.patron_search_form.search.label;" 
+                    accesskey="&staff.patron_search_form.search.accesskey;"
+                    command="cmd_patron_search_submit"/>
+                <button id="clear" label="&staff.patron_search_form.clear.label;" 
+                    accesskey="&staff.patron_search_form.clear.accesskey;"
+                    command="cmd_patron_search_clear"/>
+            </vbox>
+        </hbox>
+	</groupbox>
+</box>
+
+<!-- group 0 = user  group 1 = address  group 2 = phone, ident -->
+
+<grid id="psg">
+	<columns id="psc">
+		<column id="psc1"/>
+		<column id="psc2" flex="1"/>
+		<column id="psc3"/>
+		<column id="psc4" flex="1"/>
+		<column id="psc5"/>
+		<column id="psc6" flex="1"/>
+		<column id="psc7"/>
+		<column id="psc8" flex="1"/>
+	</columns>
+	<rows id="psr">
+		<row id="psr1">
+			<label id="psl1" control="family_name" 
+				value="&staff.patron_search_form.family_name.label;" 
+				accesskey="&staff.patron_search_form.family_name.accesskey;"/>
+			<textbox id="family_name" group="0" context="clipboard"/>
+			<label id="psl7" control="street1" 
+				value="&staff.patron_search_form.street1.label;" 
+				accesskey="&staff.patron_search_form.street1.accesskey;"/>
+			<textbox id="street1" group="1" context="clipboard"/>
+			<label id="psl5" control="phone" 
+				value="&staff.patron_search_form.phone.label;" 
+				accesskey="&staff.patron_search_form.phone.accesskey;"/>
+			<textbox id="phone" group="2" context="clipboard"/>
+			<label id="psl6c" control="card" 
+				value="&staff.patron_search_form.card.label;" 
+				accesskey="&staff.patron_search_form.card.accesskey;"/>
+			<textbox id="card" group="0" context="clipboard"/>
+		</row>
+		<row id="psr2">
+			<label id="psl2" control="first_given_name" 
+				value="&staff.patron_search_form.first_given_name.label;" 
+				accesskey="&staff.patron_search_form.first_given_name.accesskey;"/>
+			<textbox id="first_given_name" group="0" context="clipboard"/>
+			<label id="psl8" control="street2" 
+				value="&staff.patron_search_form.street2.label;" 
+				accesskey="&staff.patron_search_form.street2.accesskey;"/>
+			<textbox id="street2" group="1" context="clipboard"/>
+			<label id="psl4" control="email" 
+				value="&staff.patron_search_form.email.label;" 
+				accesskey="&staff.patron_search_form.email.accesskey;"/>
+			<textbox id="email" group="0" context="clipboard"/>
+			<label id="psl6b" control="usrname" 
+				value="&staff.patron_search_form.usrname.label;" 
+				accesskey="&staff.patron_search_form.usrname.accesskey;"/>
+			<textbox id="usrname" group="0" context="clipboard"/>
+		</row>
+		<row id="psr3">
+			<label id="psl3" control="second_given_name" 
+				value="&staff.patron_search_form.second_given_name.label;" 
+				accesskey="&staff.patron_search_form.second_given_name.accesskey;"/>
+			<textbox id="second_given_name" group="0" context="clipboard"/>
+			<label id="psl9" control="city" 
+				value="&staff.patron_search_form.city.label;" 
+				accesskey="&staff.patron_search_form.city.accesskey;"/>
+			<textbox id="city" group="1" context="clipboard"/>
+			<label id="psl10" control="state" 
+				value="&staff.patron_search_form.state.label;" 
+				accesskey="&staff.patron_search_form.state.accesskey;"/>
+			<textbox id="state" group="1" context="clipboard"/>
+			<label id="psl6" control="ident" 
+				value="&staff.patron_search_form.ident.label;" 
+				accesskey="&staff.patron_search_form.ident.accesskey;"/>
+			<textbox id="ident" group="2" context="clipboard"/>
+		</row>
+		<row id="psr14">
+			<label id="psl14" control="alias" 
+				value="&staff.patron_search_form.alias.label;" 
+				accesskey="&staff.patron_search_form.alias.accesskey;"/>
+			<textbox id="alias" group="0" context="clipboard"/>
+			<label id="psl11" control="post_code" 
+				value="&staff.patron_search_form.post_code.label;" 
+				accesskey="&staff.patron_search_form.post_code.accesskey;"/>
+			<textbox id="post_code" group="1" context="clipboard"/>
+		</row>
+	</rows>
+</grid>
+
+
+</overlay>



More information about the open-ils-commits mailing list