[open-ils-commits] r8926 - in trunk/Open-ILS/xul/staff_client:
chrome/content/main server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Mar 8 04:51:27 EST 2008
Author: phasefx
Date: 2008-03-08 04:18:41 -0500 (Sat, 08 Mar 2008)
New Revision: 8926
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
trunk/Open-ILS/xul/staff_client/server/cat/z3950.js
Log:
added a testString binding to messagecat, since z3950.js is generating keys and getString throws an alert when a key is not found
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml 2008-03-08 09:02:30 UTC (rev 8925)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml 2008-03-08 09:18:41 UTC (rev 8926)
@@ -153,6 +153,21 @@
</body>
</method>
+ <method name="testString">
+ <parameter name="key"/>
+ <body>
+ <![CDATA[
+ try {
+ var str = this._props[key];
+ return (typeof str != 'undefined');
+ } catch(e) {
+ return false;
+ }
+ ]]>
+ </body>
+ </method>
+
+
<method name="getString">
<parameter name="key"/>
<body>
Modified: trunk/Open-ILS/xul/staff_client/server/cat/z3950.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/z3950.js 2008-03-08 09:02:30 UTC (rev 8925)
+++ trunk/Open-ILS/xul/staff_client/server/cat/z3950.js 2008-03-08 09:18:41 UTC (rev 8926)
@@ -206,7 +206,7 @@
}
if (attr.label) {
attrs[i].labels[ attr.label ] = true;
- } else if (document.getElementById('commonStrings').getString('staff.z39_50.search_class.' + i)) {
+ } else if (document.getElementById('commonStrings').testString('staff.z39_50.search_class.' + i)) {
attrs[i].labels[ document.getElementById('commonStrings').getString('staff.z39_50.search_class.' + i) ] = true;
} else if (attr.name) {
attrs[i].labels[ attr.name ] = true;
More information about the open-ils-commits
mailing list