]> git.mjollnir.org Git - moodle.git/commitdiff
"REPOSITORY/MSL-13766, highlight active repository on the left listing"
authordongsheng <dongsheng>
Tue, 24 Feb 2009 02:48:19 +0000 (02:48 +0000)
committerdongsheng <dongsheng>
Tue, 24 Feb 2009 02:48:19 +0000 (02:48 +0000)
repository/javascript.php

index 5fd46196bfb4e2c2df54383f3a1f7fafca17f8b5..fda8c65ae57f89606bfe56ea596f914dd0198fdc 100644 (file)
@@ -360,6 +360,13 @@ _client.print_instances = function() {
             link.appendChild(icon);
             link.className = 'fp-repo-name';
             link.onclick = function() {
+                // highlight active repo
+                for(var cc in _client.repos){
+                    var tmp_id = 'repo-call-$suffix-'+ _client.repos[cc].id;
+                    var el = document.getElementById(tmp_id);
+                    el.style.background = 'transparent';
+                }
+                this.style.background = '#CCC';
                 var re = /repo-call-$suffix-(\d+)/i;
                 var id = this.id.match(re);
                 repository_client_$suffix.req(id[1], '');