[open-ils-commits] r17623 - branches/rel_2_0/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:05:31 EDT 2010
Author: erickson
Date: 2010-09-12 22:05:29 -0400 (Sun, 12 Sep 2010)
New Revision: 17623
Modified:
branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
Log:
back-port: 17622 => wrap custom props file reader in try/catch to prevent xhr complaining about missing file
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml 2010-09-13 02:04:24 UTC (rev 17622)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml 2010-09-13 02:05:29 UTC (rev 17623)
@@ -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