[open-ils-commits] r7495 - in
branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content: main util
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 29 14:40:15 EDT 2007
Author: phasefx
Date: 2007-06-29 14:37:06 -0400 (Fri, 29 Jun 2007)
New Revision: 7495
Modified:
branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content/main/constants.js
branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content/util/date.js
Log:
fix for offline isodate lib loading bug
Modified: branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2007-06-29 17:53:14 UTC (rev 7494)
+++ branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content/main/constants.js 2007-06-29 18:37:06 UTC (rev 7495)
@@ -181,7 +181,8 @@
'org_tree' : '/opac/common/js/OrgTree.js',
'browser' : '/opac/en-US/skin/default/xml/advanced.xml',
'fieldmapper' : '/opac/common/js/fmall.js',
- 'isodate_lib' : '/opac/common/js/DP_DateExtensions.js',
+ 'isodate_lib_remote' : '/opac/common/js/DP_DateExtensions.js',
+ 'isodate_lib_local' : 'chrome://open_ils_staff_client/content/OpenILS/util/DP_DateExtensions.js',
'xsl_marc2html' : '/opac/extras/xsl/oilsMARC21slim2HTML.xsl',
'AUDIO_GOOD_SOUND' : '/xul/server/skin/media/audio/bonus.wav',
Modified: branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content/util/date.js
===================================================================
--- branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content/util/date.js 2007-06-29 17:53:14 UTC (rev 7494)
+++ branches/rel_1_0/Open-ILS/xul/staff_client/chrome/content/util/date.js 2007-06-29 18:37:06 UTC (rev 7495)
@@ -88,10 +88,24 @@
var s = format;
if (s == '') { s = '%F %H:%M'; }
if (typeof _date.iso8601Format != 'function') {
-
- var js = JSAN._loadJSFromUrl( urls.isodate_lib );
- try { eval( js ); } catch(E) { alert('Problem loading ISO8601 date extension:' + E); }
+
+ try {
+ var js = JSAN._loadJSFromUrl( urls.isodate_lib_remote );
+ eval( js );
+ } catch(E) {
+
+ try {
+ var js = JSAN._loadJSFromUrl( urls.isodate_lib_local );
+ eval( js );
+
+ } catch(F) {
+
+ alert('Problem loading ISO8601 date extension:' + E + '\n' + F);
+
+ }
+ }
+
}
if (typeof _date.iso8601Format == 'function') {
s = s.replace( /%\{iso8601\}/g, _date.iso8601Format("YMDHMS") );
More information about the open-ils-commits
mailing list