Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-31903 course: Highlight icon will get iniatlised properly

  • Loading branch information...
commit 65df3cd2cb0a8d847f910da16824f039aa79b093 1 parent 690cf46
Rajesh Taneja authored March 16, 2012 samhemelryk committed March 26, 2012

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  lib/ajax/section_classes.js
8  lib/ajax/section_classes.js
@@ -92,7 +92,13 @@ section_class.prototype.init_buttons = function() {
92 92
     }
93 93
 
94 94
     if (main.getString('courseformat', this.sectionId) != "weeks" && this.sectionId > 0) {
95  
-        var highlightbutton = main.mk_button('div', main.portal.icons['marker'], main.getString('marker', this.sectionId));
  95
+        var highlightbutton = '';
  96
+        //If current topic, then initalised as marked else marker
  97
+        if (YAHOO.util.Dom.hasClass(this.getEl(),'current')) {
  98
+            highlightbutton = main.mk_button('div', main.portal.icons['marked'], main.getString('marked', this.sectionId));
  99
+        } else {
  100
+            highlightbutton = main.mk_button('div', main.portal.icons['marker'], main.getString('marker', this.sectionId));
  101
+        }
96 102
         YAHOO.util.Event.addListener(highlightbutton, 'click', this.mk_marker, this, true);
97 103
         commandContainer.appendChild(highlightbutton);
98 104
         this.highlightButton = highlightbutton;

0 notes on commit 65df3cd

Please sign in to comment.
Something went wrong with that request. Please try again.