wrap custom props file reader in try/catch to prevent xhr complaining about missing...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Sep 2010 02:04:24 +0000 (02:04 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Sep 2010 02:04:24 +0000 (02:04 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17622 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/bindings.xml

index d17f839..f16d773 100644 (file)
                                 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);