Permalink
Browse files

MDL-31903 course: Highlight icon will get iniatlised properly

  • Loading branch information...
1 parent f753887 commit 618c155a24c14fbe96a5f161f3a7013b92de671a @rajeshtaneja rajeshtaneja committed with Sam Hemelryk Mar 16, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/ajax/section_classes.js
View
8 lib/ajax/section_classes.js
@@ -92,7 +92,13 @@ section_class.prototype.init_buttons = function() {
}
if (main.getString('courseformat', this.sectionId) != "weeks" && this.sectionId > 0) {
- var highlightbutton = main.mk_button('div', main.portal.icons['marker'], main.getString('marker', this.sectionId));
+ var highlightbutton = '';
+ //If current topic, then initalised as marked else marker
+ if (YAHOO.util.Dom.hasClass(this.getEl(),'current')) {
+ highlightbutton = main.mk_button('div', main.portal.icons['marked'], main.getString('marked', this.sectionId));
+ } else {
+ highlightbutton = main.mk_button('div', main.portal.icons['marker'], main.getString('marker', this.sectionId));
+ }
YAHOO.util.Event.addListener(highlightbutton, 'click', this.mk_marker, this, true);
commandContainer.appendChild(highlightbutton);
this.highlightButton = highlightbutton;

0 comments on commit 618c155

Please sign in to comment.