[open-ils-commits] r19155 - trunk/Open-ILS/web/opac/common/js (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jan 11 16:45:58 EST 2011


Author: phasefx
Date: 2011-01-11 16:45:53 -0500 (Tue, 11 Jan 2011)
New Revision: 19155

Modified:
   trunk/Open-ILS/web/opac/common/js/opac_utils.js
Log:
fix regression with org selector when specifying ?ol= and the org unit hiding setting is unset


Modified: trunk/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/opac_utils.js	2011-01-11 21:29:35 UTC (rev 19154)
+++ trunk/Open-ILS/web/opac/common/js/opac_utils.js	2011-01-11 21:45:53 UTC (rev 19155)
@@ -854,7 +854,11 @@
     if ( findOrgDepth( context_org ) < depth ) {
         return false; // disable org hiding if Original Location doesn't make sense with setting depth (avoids disjointed org selectors)
     }
-    return { 'org' : findOrgUnit(context_org), 'depth' : depth };
+    if (depth) {
+        return { 'org' : findOrgUnit(context_org), 'depth' : depth };
+    } else {
+        return false;
+    }
 }
 
 var orgTreeSelector;



More information about the open-ils-commits mailing list