added companion to orgIsMine which will look at a list of parent orgs
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Aug 2008 22:37:08 +0000 (22:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Aug 2008 22:37:08 +0000 (22:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10446 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/org_utils.js

index b23fb62..d1921bf 100644 (file)
@@ -92,7 +92,14 @@ function orgIsMine(me, org) {
        return false;
 }
 
-
+function orgIsMineFromSet(meList, org) {
+    org = findOrgUnit(org);
+    for(var i = 0; i < meList.length; i++) {
+        if(orgIsMine(findOrgUnit(meList[i]), org))
+            return true;
+    }
+    return false;
+}
 
 var orgArraySearcher = {};
 var globalOrgTree;