Merge branch 'wip-MDL-38887-m25' of git://github.com/marinaglancy/moodle
authorAparup Banerjee <aparup@moodle.com>
Tue, 9 Apr 2013 06:21:22 +0000 (14:21 +0800)
committerAparup Banerjee <aparup@moodle.com>
Tue, 9 Apr 2013 06:21:22 +0000 (14:21 +0800)
1  2 
blocks/navigation/yui/src/navigation/js/navigation.js

@@@ -361,10 -361,15 +361,15 @@@ BRANCH.prototype = 
          }
  
          if (!link) {
+             var branchspan = Y.Node.create('<span></span>');
              if (branchicon) {
-                 branchp.appendChild(branchicon);
+                 branchspan.appendChild(branchicon);
              }
-             branchp.append(this.get('name'));
+             branchspan.append(this.get('name'));
+             if (this.get('hidden')) {
+                 branchspan.addClass('dimmed_text');
+             }
+             branchp.appendChild(branchspan);
          } else {
              var branchlink = Y.Node.create('<a title="'+this.get('title')+'" href="'+link+'"></a>');
              if (branchicon) {
                  url = M.cfg.wwwroot + '/course/index.php';
              }
          } else {
 -            url = M.cfg.wwwroot+'/course/category.php?id=' + branch.get('key');
 +            url = M.cfg.wwwroot+'/course/index.php?categoryid=' + branch.get('key');
          }
          branch.addChild({
              name : M.str.moodle.viewallcourses,