[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. effa4d715919f45dda4b7be8d9e3a92d7e5da3dd

Evergreen Git git at git.evergreen-ils.org
Mon Oct 3 16:41:19 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, rel_2_1 has been updated
       via  effa4d715919f45dda4b7be8d9e3a92d7e5da3dd (commit)
      from  7e66a7e134c7ac8815c00d5bb7226f93496a2ff2 (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 effa4d715919f45dda4b7be8d9e3a92d7e5da3dd
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