[open-ils-commits] r17622 - trunk/Open-ILS/xul/staff_client/chrome/content/main (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Sep 12 22:04:26 EDT 2010
Author: erickson
Date: 2010-09-12 22:04:24 -0400 (Sun, 12 Sep 2010)
New Revision: 17622
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
Log:
wrap custom props file reader in try/catch to prevent xhr complaining about missing file
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml 2010-09-12 20:19:58 UTC (rev 17621)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml 2010-09-13 02:04:24 UTC (rev 17622)
@@ -189,16 +189,19 @@
alert(msg); throw(msg);
}
- var custom_src = String(this.src).replace('.','_custom.');
- var x2 = new XMLHttpRequest();
- x2.open("GET",custom_src,false);
- x2.send(null);
- if (x2.responseText) {
- var props = this._props2object(x2.responseText);
- for (var i in props) {
- this._props[i] = props[i];
+ try { // fail silently if no custom properties file exists
+ var custom_src = String(this.src).replace('.','_custom.');
+ var x2 = new XMLHttpRequest();
+ x2.open("GET",custom_src,false);
+ x2.send(null);
+ if (x2.responseText) {
+ var props = this._props2object(x2.responseText);
+ for (var i in props) {
+ this._props[i] = props[i];
+ }
}
- }
+ } catch(EE) {}
+
} catch(E) {
alert('Error loading properties in messagecatalog in bindings.xml: ' + E);
throw(E);
More information about the open-ils-commits
mailing list