]> git.mjollnir.org Git - moodle.git/commitdiff
"REPOSITORY/MDL-13766, sometimes element id is missing, fixed"
authordongsheng <dongsheng>
Thu, 12 Mar 2009 08:44:23 +0000 (08:44 +0000)
committerdongsheng <dongsheng>
Thu, 12 Mar 2009 08:44:23 +0000 (08:44 +0000)
repository/javascript.php

index 710512634910611001826453be9cf0e4dd20ed24..1f1f72d145e00b7992fda2bcd80c9ac7360705ba 100644 (file)
@@ -931,14 +931,16 @@ _client.makepath = function() {
             var el = new YAHOO.util.Element(link.id);
             el.id = _client.repositoryid;
             el.path = _client.ds.path[i].path;
+            el.link_id = link.id;
             el.on('contentReady', function() {
-                var path_link = document.getElementById(link.id);
+                var path_link = document.getElementById(this.link_id);
                 path_link.id = this.id;
-                path_link.path = this.path
+                path_link.path = this.path;
                 path_link.onclick = function() {
                     repository_client_$suffix.req(this.id, this.path);
                 }
             });
+            link = null;
         }
     }
 }