[open-ils-commits] r8450 - in trunk/Open-ILS/xul/staff_client: .
chrome/content/main chrome/content/util external
server/OpenILS server/admin server/cat server/circ
server/locale/en-US server/main server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 21 12:57:17 EST 2008
Author: dbs
Date: 2008-01-21 12:31:02 -0500 (Mon, 21 Jan 2008)
New Revision: 8450
Removed:
trunk/Open-ILS/xul/staff_client/external/dtd2js.pl
trunk/Open-ILS/xul/staff_client/external/dtd2js.sh
Modified:
trunk/Open-ILS/xul/staff_client/Makefile
trunk/Open-ILS/xul/staff_client/chrome/content/main/main.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/main.xul
trunk/Open-ILS/xul/staff_client/chrome/content/util/error.js
trunk/Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul
trunk/Open-ILS/xul/staff_client/server/admin/font_settings.xul
trunk/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul
trunk/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul
trunk/Open-ILS/xul/staff_client/server/admin/transit_list.xul
trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul
trunk/Open-ILS/xul/staff_client/server/circ/util.js
trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
trunk/Open-ILS/xul/staff_client/server/main/data.xul
trunk/Open-ILS/xul/staff_client/server/patron/bills.js
trunk/Open-ILS/xul/staff_client/server/patron/info_group.xul
trunk/Open-ILS/xul/staff_client/server/patron/search_result.js
trunk/Open-ILS/xul/staff_client/server/patron/util.js
Log:
Eliminate lang.js (old i18n approach).
Load common.properties in util_overlay.xul so it is available globally.
Modified: trunk/Open-ILS/xul/staff_client/Makefile
===================================================================
--- trunk/Open-ILS/xul/staff_client/Makefile 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/Makefile 2008-01-21 17:31:02 UTC (rev 8450)
@@ -48,9 +48,6 @@
generated:
@echo ' * Grabbing lang.dtd from the OPAC code '
cp ../../../Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
- # Generate the lang.js file for the stamped build
- external/dtd2js.pl build/chrome/locale/en-US/lang.dtd > build/chrome/content/main/lang.js
- cp build/chrome/content/main/lang.js build/server/main/lang.js
open-ils:
@echo ' * Grabbing more OPAC code and legacy code and custom code'
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/main.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/main.js 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/main.js 2008-01-21 17:31:02 UTC (rev 8450)
@@ -58,8 +58,6 @@
JSAN.use('OpenILS.data');
G.data = new OpenILS.data()
G.data.on_error = G.auth.logoff;
- G.data.entities = entities;
- G.data.stash('entities');
JSAN.use('util.file');
G.file = new util.file();
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/main.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/main.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/main.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -49,11 +49,10 @@
<script>dump('Loaded OpenILS/util_overlay.xul\n');</script>
- <script type="text/javascript" src="chrome://open_ils_staff_client/content/main/lang.js"/>
<script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
<script type="text/javascript" src="chrome://open_ils_staff_client/content/main/main.js"/>
<script>
- dump("entities['lang.version'] = " + entities['lang.version'] + '\n');
+ dump("lang.version = " + &lang.version; + '\n');
</script>
<commandset id="auth_cmds">
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/error.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/error.js 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/error.js 2008-01-21 17:31:02 UTC (rev 8450)
@@ -254,12 +254,6 @@
's_alert' : function (s) { alert(s); },
- 'get_ilsevent' : function(status) {
- JSAN.use('OpenILS.data');
- this.OpenILS.data = new OpenILS.data(); this.OpenILS.data.init({'via':'stash'});
- return this.OpenILS.data.entities['ilsevent.'+status];
- },
-
'standard_network_error_alert' : function(msg) {
var obj = this;
if (!msg) msg = '';
Deleted: trunk/Open-ILS/xul/staff_client/external/dtd2js.pl
===================================================================
--- trunk/Open-ILS/xul/staff_client/external/dtd2js.pl 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/external/dtd2js.pl 2008-01-21 17:31:02 UTC (rev 8450)
@@ -1,21 +0,0 @@
-#!/usr/bin/perl
-#<!ENTITY common.title "Title">
-#<!ENTITY common.author "Author">
-#<!ENTITY common.subject "Subject">
-#<!ENTITY common.series "Series">
-#<!ENTITY common.keyword "Keyword">
-#<!ENTITY common.type "Type">
-#<!ENTITY tricksy.entity 'Some text with "quoted" content'>
-
-print "var entities = {};";
-while( $line = <> ) {
-
- if ($line =~ /<!ENTITY\s+(\S+)\s+((["']).*\3)\s*>\s*$/) {
- print "entities['$1'] = $2;\n";
- } elsif ($line =~ /^\s*<!--.*?-->\s*$/) {
- # Ignore comments
- } else {
- chomp $line;
- if ($line) { print STDERR "Problem with: $line\n"; }
- }
-}
Deleted: trunk/Open-ILS/xul/staff_client/external/dtd2js.sh
===================================================================
--- trunk/Open-ILS/xul/staff_client/external/dtd2js.sh 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/external/dtd2js.sh 2008-01-21 17:31:02 UTC (rev 8450)
@@ -1,2 +0,0 @@
-#!/bin/bash
-./dtd2js.pl ../../../web/opac/locale/en-US/lang.dtd > ../chrome/content/main/lang.js
Modified: trunk/Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -19,6 +19,8 @@
<script type="text/javascript" src="/opac/common/js/org_utils.js" />
<script type="text/javascript" src="global_util.js" />
<script>dump('finished openils_util_overlay\n');</script>
+
+ <messagecatalog id="commonStrings" src='/xul/server/locale/<!--#echo var="locale"-->/common.properties'/>
</scripts>
</overlay>
Modified: trunk/Open-ILS/xul/staff_client/server/admin/font_settings.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/font_settings.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/admin/font_settings.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -128,7 +128,6 @@
]]>
</script>
- <messagecatalog id="commonStrings" src='/xul/server/locale/<!--#echo var="locale"-->/common.properties'/>
<messagecatalog id="adminStrings" src='/xul/server/locale/<!--#echo var="locale"-->/admin.properties'/>
<groupbox orient="vertical">
Modified: trunk/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/admin/hold_pull_list.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -67,8 +67,6 @@
]]>
</script>
- <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
-
<commandset id="holds_cmds">
<command id="sel_mark_items_damaged" disabled="true"/>
<command id="sel_mark_items_missing" disabled="true"/>
Modified: trunk/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -52,7 +52,6 @@
]]>
</script>
- <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
<messagecatalog id="adminStrings" src="/xul/server/locale/<!--#echo var='locale'-->/admin.properties"/>
<vbox id="admin_offline_manage_xacts_main" flex="1">
Modified: trunk/Open-ILS/xul/staff_client/server/admin/transit_list.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/transit_list.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/admin/transit_list.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -53,8 +53,6 @@
]]>
</script>
- <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale'-->/common.properties"/>
-
<vbox flex="1" class="my_overflow">
<hbox>
<groupbox id="lib_hbox" orient="horizontal">
Modified: trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/cat/copy_buckets.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -73,7 +73,6 @@
]]>
</script>
- <messagecatalog id="commonStrings" src="/xul/server/locale/<!--#echo var='locale' -->/common.properties"/>
<messagecatalog id="catStrings" src="/xul/server/locale/<!--#echo var='locale' -->/cat.properties"/>
<commandset id="copy_buckets_cmds">
Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js 2008-01-21 17:31:02 UTC (rev 8450)
@@ -403,20 +403,18 @@
JSAN.use('util.network'); var network = new util.network();
JSAN.use('util.money');
- function getString(s) { return data.entities[s]; }
-
var c = [
{
- 'id' : 'acp_id', 'label' : getString('staff.acp_label_id'), 'flex' : 1,
+ 'id' : 'acp_id', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_id'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp.id(); }, 'persist' : 'hidden width ordinal',
},
{
- 'id' : 'circ_id', 'label' : getString('staff.circ_label_id'), 'flex' : 1,
+ 'id' : 'circ_id', 'label' : document.getElementById('commonStrings').getString('staff.circ_label_id'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.circ ? my.circ.id() : ( my.acp.circulations() ? my.acp.circulations()[0].id() : ""); },
'persist' : 'hidden width ordinal',
},
{
- 'id' : 'mvr_doc_id', 'label' : getString('staff.mvr_label_doc_id'), 'flex' : 1,
+ 'id' : 'mvr_doc_id', 'label' : document.getElementById('commonStrings').getString('staff.mvr_label_doc_id'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.mvr.doc_id(); },
'persist' : 'hidden width ordinal',
},
@@ -425,12 +423,12 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.service; },
},
{
- 'id' : 'barcode', 'label' : getString('staff.acp_label_barcode'), 'flex' : 1,
+ 'id' : 'barcode', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_barcode'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp.barcode(); },
'persist' : 'hidden width ordinal',
},
{
- 'id' : 'call_number', 'label' : getString('staff.acp_label_call_number'), 'flex' : 1,
+ 'id' : 'call_number', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_call_number'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { if (my.acp && my.acp.call_number() == -1) { return "Not Cataloged"; } else { if (!my.acn) { var x = network.simple_request("FM_ACN_RETRIEVE",[ my.acp.call_number() ]); if (x.ilsevent) { return "Not Cataloged"; } else { my.acn = x; return x.label(); } } else { return my.acn.label(); } } },
'persist' : 'hidden width ordinal',
},
@@ -441,28 +439,28 @@
'persist' : 'hidden width ordinal',
},
{
- 'id' : 'copy_number', 'label' : getString('staff.acp_label_copy_number'), 'flex' : 1, 'sort_type' : 'number',
+ 'id' : 'copy_number', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_copy_number'), 'flex' : 1, 'sort_type' : 'number',
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp.copy_number(); },
'persist' : 'hidden width ordinal',
},
{
- 'id' : 'location', 'label' : getString('staff.acp_label_location'), 'flex' : 1,
+ 'id' : 'location', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_location'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { if (Number(my.acp.location())>=0) return data.lookup("acpl", my.acp.location() ).name(); else return my.acp.location().name(); },
'persist' : 'hidden width ordinal',
},
{
- 'id' : 'loan_duration', 'label' : getString('staff.acp_label_loan_duration'), 'flex' : 1,
+ 'id' : 'loan_duration', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_loan_duration'), 'flex' : 1,
'primary' : false, 'hidden' : true,
'render' : function(my) { switch(my.acp.loan_duration()){ case 1: return "Short"; break; case 2: return "Normal"; break; case 3: return "Long"; break; }; },
'persist' : 'hidden width ordinal',
},
{
- 'id' : 'circ_lib', 'label' : getString('staff.acp_label_circ_lib'), 'flex' : 1,
+ 'id' : 'circ_lib', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_circ_lib'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { if (Number(my.acp.circ_lib())>=0) return data.hash.aou[ my.acp.circ_lib() ].shortname(); else return my.acp.circ_lib().shortname(); },
'persist' : 'hidden width ordinal',
},
{
- 'id' : 'fine_level', 'label' : getString('staff.acp_label_fine_level'), 'flex' : 1,
+ 'id' : 'fine_level', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_fine_level'), 'flex' : 1,
'primary' : false, 'hidden' : true,
'render' : function(my) { switch(my.acp.fine_level()){ case 1: return "Low"; break; case 2: return "Normal"; break; case 3: return "High"; break; }; },
'persist' : 'hidden width ordinal',
@@ -496,19 +494,19 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return get_bool( my.acp.deposit() ) ? "Yes" : "No"; },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'deposit_amount', 'label' : getString('staff.acp_label_deposit_amount'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'deposit_amount', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_deposit_amount'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp.price() == null ? "<Unset>" : util.money.sanitize(my.acp.deposit_amount()); }, 'sort_type' : 'money',
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'price', 'label' : getString('staff.acp_label_price'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'price', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_price'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp.price() == null ? "<Unset>" : util.money.sanitize(my.acp.price()); }, 'sort_type' : 'money',
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'circ_as_type', 'label' : getString('staff.acp_label_circ_as_type'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'circ_as_type', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_circ_as_type'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp.circ_as_type(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'circ_modifier', 'label' : getString('staff.acp_label_circ_modifier'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'circ_modifier', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_circ_modifier'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp.circ_modifier(); },
},
{
@@ -537,7 +535,7 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.circ.xact_finish(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'due_date', 'label' : getString('staff.circ_label_due_date'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'due_date', 'label' : document.getElementById('commonStrings').getString('staff.circ_label_due_date'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.circ ? my.circ.due_date().substr(0,10) : (my.acp.circulations() ? my.acp.circulations()[0].due_date().substr(0,10) : ""); },
},
{
@@ -549,11 +547,11 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp.edit_date().substr(0,10); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'title', 'label' : getString('staff.mvr_label_title'), 'flex' : 2, 'sort_type' : 'title',
+ 'persist' : 'hidden width ordinal', 'id' : 'title', 'label' : document.getElementById('commonStrings').getString('staff.mvr_label_title'), 'flex' : 2, 'sort_type' : 'title',
'primary' : false, 'hidden' : true, 'render' : function(my) { try { return my.mvr.title(); } catch(E) { return my.acp.dummy_title(); } }
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'author', 'label' : getString('staff.mvr_label_author'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'author', 'label' : document.getElementById('commonStrings').getString('staff.mvr_label_author'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { try { return my.mvr.author(); } catch(E) { return my.acp.dummy_author(); } }
},
{
@@ -577,7 +575,7 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.mvr.tcn(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'renewal_remaining', 'label' : getString('staff.circ_label_renewal_remaining'), 'flex' : 0,
+ 'persist' : 'hidden width ordinal', 'id' : 'renewal_remaining', 'label' : document.getElementById('commonStrings').getString('staff.circ_label_renewal_remaining'), 'flex' : 0,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.circ ? my.circ.renewal_remaining() : (my.acp.circulations() ? my.acp.circulations()[0].renewal_remaining() : ""); }, 'sort_type' : 'number',
},
{
@@ -589,7 +587,7 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.circ ? my.circ.stop_fines_time() : (my.acp.circulations() ? my.acp.circulations()[0].stop_fines_time() : ""); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'status', 'label' : getString('staff.acp_label_status'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'status', 'label' : document.getElementById('commonStrings').getString('staff.acp_label_status'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { if (Number(my.acp.status())>=0) return data.hash.ccs[ my.acp.status() ].name(); else return my.acp.status().name(); },
},
{
@@ -643,8 +641,6 @@
JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
- function getString(s) { return data.entities[s]; }
-
var c = [
{
'persist' : 'hidden width ordinal', 'id' : 'transit_item_barcode', 'label' : 'Barcode', 'flex' : 1,
@@ -723,8 +719,6 @@
JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
- function getString(s) { return data.entities[s]; }
-
var c = [
{
'persist' : 'hidden width ordinal', 'id' : 'request_lib', 'label' : 'Request Lib (Full Name)', 'flex' : 1,
@@ -764,11 +758,11 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.capture_time() ? my.ahr.capture_time().toString().substr(0,10) : ""; },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'status', 'label' : getString('staff.ahr_status_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'status', 'label' : document.getElementById('commonStrings').getString('staff.ahr_status_label'), 'flex' : 1,
'primary' : false, 'hidden' : false, 'render' : function(my) { switch(my.status) { case 1: case "1": return "Waiting for copy"; break; case 2: case "2": return "Waiting for capture"; break; case 3: case "3": return "In-Transit"; break; case 4: case "4" : return "Ready for pickup"; break; default: return my.status; break;}; },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'hold_type', 'label' : getString('staff.ahr_hold_type_label'), 'flex' : 0,
+ 'persist' : 'hidden width ordinal', 'id' : 'hold_type', 'label' : document.getElementById('commonStrings').getString('staff.ahr_hold_type_label'), 'flex' : 0,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.hold_type(); },
},
{
@@ -785,64 +779,64 @@
'render' : function(my) { if (Number(my.ahr.pickup_lib())>=0) return data.hash.aou[ my.ahr.pickup_lib() ].name(); else return my.ahr.pickup_lib().name(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'pickup_lib_shortname', 'label' : getString('staff.ahr_pickup_lib_label'), 'flex' : 0,
+ 'persist' : 'hidden width ordinal', 'id' : 'pickup_lib_shortname', 'label' : document.getElementById('commonStrings').getString('staff.ahr_pickup_lib_label'), 'flex' : 0,
'primary' : false, 'hidden' : true,
'render' : function(my) { if (Number(my.ahr.pickup_lib())>=0) return data.hash.aou[ my.ahr.pickup_lib() ].shortname(); else return my.ahr.pickup_lib().shortname(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'current_copy', 'label' : getString('staff.ahr_current_copy_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'current_copy', 'label' : document.getElementById('commonStrings').getString('staff.ahr_current_copy_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.acp ? my.acp.barcode() : "No Copy"; },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'email_notify', 'label' : getString('staff.ahr_email_notify_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'email_notify', 'label' : document.getElementById('commonStrings').getString('staff.ahr_email_notify_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return get_bool(my.ahr.email_notify()) ? "Yes" : "No"; },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'expire_time', 'label' : getString('staff.ahr_expire_time_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'expire_time', 'label' : document.getElementById('commonStrings').getString('staff.ahr_expire_time_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.expire_time(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'fulfillment_time', 'label' : getString('staff.ahr_fulfillment_time_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'fulfillment_time', 'label' : document.getElementById('commonStrings').getString('staff.ahr_fulfillment_time_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.fulfillment_time(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'holdable_formats', 'label' : getString('staff.ahr_holdable_formats_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'holdable_formats', 'label' : document.getElementById('commonStrings').getString('staff.ahr_holdable_formats_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.holdable_formats(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'id', 'label' : getString('staff.ahr_id_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'id', 'label' : document.getElementById('commonStrings').getString('staff.ahr_id_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.id(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'phone_notify', 'label' : getString('staff.ahr_phone_notify_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'phone_notify', 'label' : document.getElementById('commonStrings').getString('staff.ahr_phone_notify_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.phone_notify(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'prev_check_time', 'label' : getString('staff.ahr_prev_check_time_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'prev_check_time', 'label' : document.getElementById('commonStrings').getString('staff.ahr_prev_check_time_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.prev_check_time(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'requestor', 'label' : getString('staff.ahr_requestor_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'requestor', 'label' : document.getElementById('commonStrings').getString('staff.ahr_requestor_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.requestor(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'selection_depth', 'label' : getString('staff.ahr_selection_depth_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'selection_depth', 'label' : document.getElementById('commonStrings').getString('staff.ahr_selection_depth_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.selection_depth(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'target', 'label' : getString('staff.ahr_target_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'target', 'label' : document.getElementById('commonStrings').getString('staff.ahr_target_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.target(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'usr', 'label' : getString('staff.ahr_usr_label'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'usr', 'label' : document.getElementById('commonStrings').getString('staff.ahr_usr_label'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.ahr.usr(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'title', 'label' : getString('staff.mvr_label_title'), 'flex' : 1, 'sort_type' : 'title',
+ 'persist' : 'hidden width ordinal', 'id' : 'title', 'label' : document.getElementById('commonStrings').getString('staff.mvr_label_title'), 'flex' : 1, 'sort_type' : 'title',
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.mvr ? my.mvr.title() : "No Title?"; },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'author', 'label' : getString('staff.mvr_label_author'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'author', 'label' : document.getElementById('commonStrings').getString('staff.mvr_label_author'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.mvr ? my.mvr.author() : "No Author?"; },
},
{
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties 2008-01-21 17:31:02 UTC (rev 8450)
@@ -11,3 +11,54 @@
common.barcode.status.warning.blocked=Blocked
common.barcode.status.warning.unknown=with an unknown code: %1$s
common.date.invalid=Invalid Date
+lang.version=remote v1
+staff.acp_label_barcode=Barcode
+staff.acp_label_call_number=Call Number
+staff.acp_label_circ_as_type=Circ As Type
+staff.acp_label_circ_lib=Circ Lib
+staff.acp_label_circ_modifier=Circ Modifier
+staff.acp_label_copy_number=Copy Number
+staff.acp_label_deposit_amount=Deposit Amount
+staff.acp_label_fine_level=Fine Level
+staff.acp_label_id=Copy ID
+staff.acp_label_loan_duration=Loan Duration
+staff.acp_label_location=Location
+staff.acp_label_price=Price
+staff.acp_label_status=Status
+staff.ahr_current_copy_label=Current Copy
+staff.ahr_email_notify_label=Email Notify
+staff.ahr_expire_time_label=Expire Time
+staff.ahr_fulfillment_time_label=Fulfillment Time
+staff.ahr_hold_type_label=Type
+staff.ahr_holdable_formats_label=Holdable Formats
+staff.ahr_id_label=Hold Id
+staff.ahr_phone_notify_label=Phone Notify
+staff.ahr_pickup_lib_label=Pickup Lib
+staff.ahr_prev_check_time_label=Prev Check Time
+staff.ahr_requestor_label=Requestor
+staff.ahr_selection_depth_label=Selection Depth
+staff.ahr_status_label=Status
+staff.ahr_target_label=Target
+staff.ahr_usr_label=Usr
+staff.circ_label_due_date=Due Date
+staff.circ_label_id=Circ Id
+staff.circ_label_renewal_remaining=Remaining Renewals
+staff.mvr_label_author=Author
+staff.mvr_label_doc_id=Doc Id
+staff.mvr_label_title=Title
+staff.bills_xact_dates_label=Record / Dates
+staff.bills_information=Information
+staff.bills_current_payment_label=Current Payment
+staff.mbts_id_label=Bill #
+staff.mbts_xact_start_label=Start
+staff.mbts_xact_finish_label=Finish
+staff.mbts_total_owed_label=Total Billed
+staff.mbts_total_paid_label=Total Paid
+staff.mbts_balance_owed_label=Balance Owed
+staff.au_label_active=Active
+staff.au_label_id=Record ID
+staff.au_label_prefix=Prefix
+staff.au_label_family_name=Family Name
+staff.au_label_first_given_name=First Name
+staff.au_label_second_given_name=Middle Name
+staff.au_label_suffix=Suffix
Modified: trunk/Open-ILS/xul/staff_client/server/main/data.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/main/data.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/main/data.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -37,12 +37,10 @@
<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="chrome://open_ils_staff_client/content/main/lang.js"/>
- <script type="text/javascript" src="/xul/server/main/lang.js"/>
<script type="text/javascript" src="chrome://open_ils_staff_client/content/main/JSAN.js"/>
<script>
<![CDATA[
- dump("entities['lang.version'] = " + entities['lang.version'] + '\n');
+ dump("lang.version = " + document.getElementById('commonStrings').getString('lang.version') + "\n");
function data_init() {
@@ -181,8 +179,6 @@
JSAN.use('OpenILS.data');
g.data = new OpenILS.data()
g.data.on_error = xulG.auth.logoff;
- g.data.entities = entities;
- g.data.stash('entities');
g.data.session = {};
g.data.session.key = xulG.auth.session.key;
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bills.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bills.js 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bills.js 2008-01-21 17:31:02 UTC (rev 8450)
@@ -123,18 +123,17 @@
JSAN.use('util.list'); obj.list = new util.list('bill_list');
- function getString(s) { return obj.OpenILS.data.entities[s]; }
obj.list.init(
{
'columns' : [
/*
{
- 'id' : 'xact_dates', 'label' : getString('staff.bills_xact_dates_label'), 'flex' : 1,
+ 'id' : 'xact_dates', 'label' : document.getElementById('commonStrings').getString('staff.bills_xact_dates_label'), 'flex' : 1,
'primary' : false, 'hidden' : false, 'render' : 'obj.xact_dates_box(my.mobts)'
},
*/
{
- 'id' : 'notes', 'label' : getString('staff.bills_information'), 'flex' : 2,
+ 'id' : 'notes', 'label' : document.getElementById('commonStrings').getString('staff.bills_information'), 'flex' : 2,
'primary' : false, 'hidden' : false, 'render' : 'obj.info_box(my)'
},
{
@@ -142,7 +141,7 @@
'primary' : false, 'hidden' : false, 'render' : 'obj.money_box(my.mobts)'
},
{
- 'id' : 'current_pay', 'label' : getString('staff.bills_current_payment_label'), 'flex' : 0,
+ 'id' : 'current_pay', 'label' : document.getElementById('commonStrings').getString('staff.bills_current_payment_label'), 'flex' : 0,
'render' : 'obj.payment_box()'
}
],
@@ -717,7 +716,6 @@
'xact_dates_box' : function ( mobts ) {
var obj = this;
try {
- function getString(s) { return obj.OpenILS.data.entities[s]; }
var grid = document.createElement('grid');
var cols = document.createElement('columns');
grid.appendChild( cols );
@@ -734,7 +732,7 @@
row0.appendChild( hb_r0_1 );
var label_r0_1 = document.createElement('label');
hb_r0_1.appendChild( label_r0_1 );
- label_r0_1.setAttribute('value',getString('staff.mbts_id_label'));
+ label_r0_1.setAttribute('value',document.getElementById('commonStrings').getString('staff.mbts_id_label'));
var label_r0_2 = document.createElement('label');
hb_r0_1.appendChild( label_r0_2 );
label_r0_2.setAttribute('value',mobts.id());
@@ -742,7 +740,7 @@
rows.appendChild( row1 );
var label_r1_1 = document.createElement('label');
row1.appendChild( label_r1_1 );
- label_r1_1.setAttribute('value',getString('staff.mbts_xact_start_label'));
+ label_r1_1.setAttribute('value',document.getElementById('commonStrings').getString('staff.mbts_xact_start_label'));
var label_r1_2 = document.createElement('label');
row1.appendChild( label_r1_2 );
label_r1_2.setAttribute('value',mobts.xact_start().toString().substr(0,10));
@@ -750,7 +748,7 @@
rows.appendChild( row2 );
var label_r2_1 = document.createElement('label');
row2.appendChild( label_r2_1 );
- label_r2_1.setAttribute('value',getString('staff.mbts_xact_finish_label'));
+ label_r2_1.setAttribute('value',document.getElementById('commonStrings').getString('staff.mbts_xact_finish_label'));
var label_r2_2 = document.createElement('label');
row2.appendChild( label_r2_2 );
try { label_r2_2.setAttribute('value',mobts.xact_finish().toString().substr(0,10));
@@ -766,7 +764,6 @@
var obj = this;
try {
JSAN.use('util.money');
- function getString(s) { return obj.OpenILS.data.entities[s]; }
var grid = document.createElement('grid');
var cols = document.createElement('columns');
grid.appendChild( cols );
@@ -778,7 +775,7 @@
rows.appendChild( row1 );
var label_r1_1 = document.createElement('label');
row1.appendChild( label_r1_1 );
- label_r1_1.setAttribute('value',getString('staff.mbts_total_owed_label'));
+ label_r1_1.setAttribute('value',document.getElementById('commonStrings').getString('staff.mbts_total_owed_label'));
var label_r1_2 = document.createElement('label');
row1.appendChild( label_r1_2 );
label_r1_2.setAttribute('value','$' + util.money.sanitize(mobts.total_owed() || '0') );
@@ -786,7 +783,7 @@
rows.appendChild( row2 );
var label_r2_1 = document.createElement('label');
row2.appendChild( label_r2_1 );
- label_r2_1.setAttribute('value',getString('staff.mbts_total_paid_label'));
+ label_r2_1.setAttribute('value',document.getElementById('commonStrings').getString('staff.mbts_total_paid_label'));
var label_r2_2 = document.createElement('label');
row2.appendChild( label_r2_2 );
label_r2_2.setAttribute('value','$' + util.money.sanitize(mobts.total_paid() || '0') );
@@ -794,7 +791,7 @@
rows.appendChild( row3 );
var label_r3_1 = document.createElement('label');
row3.appendChild( label_r3_1 );
- label_r3_1.setAttribute('value',getString('staff.mbts_balance_owed_label'));
+ label_r3_1.setAttribute('value',document.getElementById('commonStrings').getString('staff.mbts_balance_owed_label'));
label_r3_1.setAttribute('style','font-weight: bold');
var label_r3_2 = document.createElement('label');
row3.appendChild( label_r3_2 );
@@ -810,7 +807,6 @@
'info_box' : function ( my ) {
var obj = this;
try {
- function getString(s) { return obj.OpenILS.data.entities[s]; }
var vbox = document.createElement('vbox');
var hbox = document.createElement('hbox');
Modified: trunk/Open-ILS/xul/staff_client/server/patron/info_group.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/info_group.xul 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/patron/info_group.xul 2008-01-21 17:31:02 UTC (rev 8450)
@@ -67,7 +67,6 @@
g.OpenILS.data = new OpenILS.data(); g.OpenILS.data.init({'via':'stash'});
JSAN.use('util.list'); g.list = new util.list('patron_list');
- function getString(s) { return g.OpenILS.data.entities[s]; }
JSAN.use('patron.util');
var columns = patron.util.columns(
Modified: trunk/Open-ILS/xul/staff_client/server/patron/search_result.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/search_result.js 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/patron/search_result.js 2008-01-21 17:31:02 UTC (rev 8450)
@@ -22,7 +22,6 @@
obj.OpenILS.data = new OpenILS.data(); obj.OpenILS.data.init({'via':'stash'});
JSAN.use('util.list'); obj.list = new util.list('patron_list');
- function getString(s) { return obj.OpenILS.data.entities[s]; }
JSAN.use('patron.util');
var columns = patron.util.columns(
Modified: trunk/Open-ILS/xul/staff_client/server/patron/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/util.js 2008-01-21 15:20:39 UTC (rev 8449)
+++ trunk/Open-ILS/xul/staff_client/server/patron/util.js 2008-01-21 17:31:02 UTC (rev 8450)
@@ -14,9 +14,6 @@
JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
JSAN.use('util.money'); JSAN.use('util.date');
- function getString(s) { return data.entities[s]; }
-
-
var c = [
{
'persist' : 'hidden width ordinal', 'id' : 'id', 'label' : 'Id', 'flex' : 1,
@@ -113,9 +110,6 @@
JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
JSAN.use('util.money'); JSAN.use('util.date');
- function getString(s) { return data.entities[s]; }
-
-
var c = [
{
'persist' : 'hidden width ordinal', 'id' : 'id', 'label' : 'Id', 'flex' : 1,
@@ -191,9 +185,6 @@
JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
JSAN.use('util.money'); JSAN.use('util.date'); JSAN.use('patron.util');
- function getString(s) { return data.entities[s]; }
-
-
var c = [
{
'persist' : 'hidden width ordinal', 'id' : 'mp_id', 'label' : 'ID', 'flex' : 1,
@@ -264,8 +255,6 @@
JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
- function getString(s) { return data.entities[s]; }
-
var c = [
{
'persist' : 'hidden width ordinal', 'id' : 'barcode', 'label' : 'Barcode', 'flex' : 1,
@@ -280,7 +269,7 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return data.hash.pgt[ my.au.profile() ].name(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'active', 'label' : getString('staff.au_label_active'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'active', 'label' : document.getElementById('commonStrings').getString('staff.au_label_active'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return get_bool( my.au.active() ) ? "Yes" : "No"; },
},
{
@@ -288,27 +277,27 @@
'primary' : false, 'hidden' : true, 'render' : function(my) { return get_bool( my.au.barred() ) ? "Yes" : "No"; },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'id', 'label' : getString('staff.au_label_id'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'id', 'label' : document.getElementById('commonStrings').getString('staff.au_label_id'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.au.id(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'prefix', 'label' : getString('staff.au_label_prefix'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'prefix', 'label' : document.getElementById('commonStrings').getString('staff.au_label_prefix'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.au.prefix(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'family_name', 'label' : getString('staff.au_label_family_name'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'family_name', 'label' : document.getElementById('commonStrings').getString('staff.au_label_family_name'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.au.family_name(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'first_given_name', 'label' : getString('staff.au_label_first_given_name'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'first_given_name', 'label' : document.getElementById('commonStrings').getString('staff.au_label_first_given_name'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.au.first_given_name(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'second_given_name', 'label' : getString('staff.au_label_second_given_name'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'second_given_name', 'label' : document.getElementById('commonStrings').getString('staff.au_label_second_given_name'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.au.second_given_name(); },
},
{
- 'persist' : 'hidden width ordinal', 'id' : 'suffix', 'label' : getString('staff.au_label_suffix'), 'flex' : 1,
+ 'persist' : 'hidden width ordinal', 'id' : 'suffix', 'label' : document.getElementById('commonStrings').getString('staff.au_label_suffix'), 'flex' : 1,
'primary' : false, 'hidden' : true, 'render' : function(my) { return my.au.suffix(); },
},
{
More information about the open-ils-commits
mailing list