[open-ils-commits] r18180 - trunk/Open-ILS/xul/staff_client/chrome/content/util (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Oct 5 15:33:12 EDT 2010
Author: phasefx
Date: 2010-10-05 15:33:08 -0400 (Tue, 05 Oct 2010)
New Revision: 18180
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js
Log:
be quiet with errors retrieving remote column settings
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js 2010-10-05 18:54:05 UTC (rev 18179)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js 2010-10-05 19:33:08 UTC (rev 18180)
@@ -305,12 +305,20 @@
}
/* local file will trump remote file if allowed, so save ourselves an http request if this is the case */
if (obj.data.hash.aous['url.remote_column_settings'] && ! my_cols ) {
- var x = new XMLHttpRequest();
- var url = obj.data.hash.aous['url.remote_column_settings'] + '/tree_columns_for_' + window.escape(id);
- x.open("GET", url, false);
- x.send(null);
- if (x.status == 200) {
- my_cols = JSON2js( x.responseText );
+ try {
+ var x = new XMLHttpRequest();
+ var url = obj.data.hash.aous['url.remote_column_settings'] + '/tree_columns_for_' + window.escape(id);
+ x.open("GET", url, false);
+ x.send(null);
+ if (x.status == 200) {
+ my_cols = JSON2js( x.responseText );
+ }
+ } catch(E) {
+ // This can happen in the offline interface if you logged in previously and url.remote_column_settings is set.
+ // 1) You may be really "offline" now
+ // 2) the URL may just be a path component without a hostname (ie "/xul/column_settings/"), which won't work
+ // when appended to chrome://open_ils_staff_client/
+ dump('Error retrieving column settings from ' + url + ': ' + E + '\n');
}
}
More information about the open-ils-commits
mailing list