[open-ils-commits] r13271 - trunk/Open-ILS/web/opac/skin/default/js (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun May 31 23:36:14 EDT 2009
Author: dbs
Date: 2009-05-31 23:36:12 -0400 (Sun, 31 May 2009)
New Revision: 13271
Modified:
trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
Borrow miker's approach to finding the right depth to display holdings
(might be worthwhile abstracting the 'here' bit to org_utils.js)
Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2009-06-01 03:33:13 UTC (rev 13270)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2009-06-01 03:36:12 UTC (rev 13271)
@@ -228,9 +228,15 @@
}
function _holdingsDrawMFHD(holdings, entryNum) {
- if (!orgIsMine(findOrgUnit(holdings.owning_lib()), findOrgUnit(getLocation()))) {
- return null;
- }
+ var here = findOrgUnit(getLocation());
+ if (getDepth() > 0 || getDepth === 0 ) {
+ while (getDepth() < findOrgDepth(here))
+ here = findOrgUnit( here.parent_ou() );
+ if (!orgIsMine(findOrgUnit(here), findOrgUnit(holdings.owning_lib()))) {
+ return null;
+ }
+ }
+
var hh = holdings.holdings();
var hch = holdings.current_holdings();
var hs = holdings.supplements();
More information about the open-ils-commits
mailing list