[open-ils-commits] [GIT] Evergreen ILS branch master updated. 11c3308a4b88c5d6c03b68058fb142c1b650e01b

Evergreen Git git at git.evergreen-ils.org
Mon Oct 3 16:40:46 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  11c3308a4b88c5d6c03b68058fb142c1b650e01b (commit)
      from  a443e3b6e3aa7d75dc61dc95fa2cdc408ebfda65 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 11c3308a4b88c5d6c03b68058fb142c1b650e01b
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Mon Oct 3 16:03:00 2011 -0400

    JSPAC: Fix a bug (I think) in orgIsMine(), and show more MFHD holdings ...
    
    ... when search scope would have it so.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/web/opac/common/js/org_utils.js b/Open-ILS/web/opac/common/js/org_utils.js
index 1012c81..091d277 100644
--- a/Open-ILS/web/opac/common/js/org_utils.js
+++ b/Open-ILS/web/opac/common/js/org_utils.js
@@ -100,7 +100,7 @@ function orgIsMine(me, org, depth) {
 	if(me.id() == org.id()) {
 		return true;
 	}
-	if (depth) {
+	if (depth !== undefined) {
 		while (depth < findOrgDepth(me)) {
 			me = findOrgUnit( me.parent_ou() );
 		}
@@ -110,7 +110,7 @@ function orgIsMine(me, org, depth) {
 	}
 	var kids = me.children();
 	for( var i = 0; kids && i < kids.length; i++ ) {
-		if(orgIsMine(kids[i], org, false)) {
+		if(orgIsMine(kids[i], org /* intentional lack of 3rd arg */)) {
 			return true;
 		}
 
diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js
index 3fbc501..2d08344 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -360,8 +360,9 @@ function _holdingsDraw(h) {
         // Only draw holdings within our OU scope
         var here = findOrgUnit(getLocation());
         var entryNum = 0;
+        var depth = getDepth();
         dojo.forEach(holdings, function (item) {
-            if (orgIsMine(here, findOrgUnit(item.owning_lib()))) {
+            if (orgIsMine(here, findOrgUnit(item.owning_lib()), depth)) {
                 _holdingsDrawMFHD(item, entryNum);
                 entryNum++;
             }

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/opac/common/js/org_utils.js     |    4 ++--
 Open-ILS/web/opac/skin/default/js/rdetail.js |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list