MDL-31903 course: Highlight icon will get iniatlised properly
This commit is contained in:
committed by
Sam Hemelryk
parent
690cf46b0c
commit
65df3cd2cb
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user