dettatching refs, hopefully staving off leaks in the browser
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 3 Aug 2005 20:52:35 +0000 (20:52 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 3 Aug 2005 20:52:35 +0000 (20:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1606 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/org_tree_js.pl

index d8a7b4f..710f548 100644 (file)
@@ -48,6 +48,15 @@ for (var i in orgArraySearcher) {
                x.parent_ou().children(new Array());
        x.parent_ou().children().push(x);
 }
+function _tree_killer () {
+       globalOrgTree = null;
+       for (var i in orgArraySearcher) {
+               x=orgArraySearcher[i];
+               x.children(null);
+               x.parent_ou(null);
+               orgArraySearcher[i]=null;
+       }
+}
 JS
 
 $pile .= "var globalOrgTypes = JSON2js(\"$types_string\");";