[open-ils-commits] r19854 - branches/rel_2_0/Open-ILS/web/opac/common/js (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 22 12:01:07 EDT 2011


Author: phasefx
Date: 2011-03-22 12:01:04 -0400 (Tue, 22 Mar 2011)
New Revision: 19854

Modified:
   branches/rel_2_0/Open-ILS/web/opac/common/js/opac_utils.js
Log:
have checkILSEvent handle events that aren't in ils_events.xml

Signed-off-by: Jason Etheridge <jason at esilibrary.com>


Modified: branches/rel_2_0/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/opac/common/js/opac_utils.js	2011-03-22 16:00:13 UTC (rev 19853)
+++ branches/rel_2_0/Open-ILS/web/opac/common/js/opac_utils.js	2011-03-22 16:01:04 UTC (rev 19854)
@@ -1043,8 +1043,13 @@
 }
 
 function checkILSEvent(obj) {
-	if( obj && obj.ilsevent != null && obj.ilsevent != 0 )
-		return parseInt(obj.ilsevent);
+	if (obj && typeof obj == 'object' && typeof obj.ilsevent != 'undefined') {
+        if (obj.ilsevent === '') {
+            return true;
+        } else if ( obj.ilsevent != null && obj.ilsevent != 0 ) {
+            return parseInt(obj.ilsevent);
+        }
+    }
 	return null;
 }
 



More information about the open-ils-commits mailing list