Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-31903 course: update patch to fix course highlight icon and title…

… toggle
  • Loading branch information...
commit e06bc8c074ccf0b20ced25197671191fc2eb7966 1 parent 46424df
@rajeshtaneja rajeshtaneja authored samhemelryk committed
Showing with 12 additions and 5 deletions.
  1. +1 −0  lib/ajax/ajaxcourse.js
  2. +11 −5 lib/ajax/section_classes.js
View
1  lib/ajax/ajaxcourse.js
@@ -198,6 +198,7 @@ main_class.prototype.mk_button = function(tag, imgSrc, text, attributes, imgAttr
image.setAttribute(imgAttributes[c][0], imgAttributes[c][1]);
}
}
+ image.setAttribute('hspace', '3');
return container;
};
View
16 lib/ajax/section_classes.js
@@ -92,15 +92,14 @@ 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),
- [['class', 'button highlightbutton']], [['class', 'highlightimage']]);
+ var 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;
}
if (this.sectionId > 0) {
var viewbutton = main.mk_button('div', main.portal.icons['hide'], main.getString('hidesection', this.sectionId),
- [['title', main.portal.strings['hide']],['class', 'button hidebutton']], [['class', 'hideimage']]);
+ [['title', main.portal.strings['hide'] ]]);
YAHOO.util.Event.addListener(viewbutton, 'click', this.toggle_hide, this,true);
commandContainer.appendChild(viewbutton);
this.viewButton = viewbutton;
@@ -364,15 +363,22 @@ section_class.prototype.toggle_hide = function(e,target,superficial) {
section_class.prototype.toggle_highlight = function() {
+ var strmarker = main.portal.strings['marker'];
+ var strmarked = main.portal.strings['marked'];
+
if (this.highlighted) {
YAHOO.util.Dom.removeClass(this.getEl(), 'current');
this.highlightButton.childNodes[0].src = main.portal.icons['marker'];
- this.highlightButton.title = main.getString('marker', this.sectionId);
+ this.highlightButton.childNodes[0].alt = strmarker;
+ this.highlightButton.childNodes[0].title = strmarker; //for IE
+ this.highlightButton.title = strmarker;
this.highlighted = false;
} else {
YAHOO.util.Dom.addClass(this.getEl(), 'current');
this.highlightButton.childNodes[0].src = main.portal.icons['marked'];
- this.highlightButton.title = main.getString('marked', this.sectionId);
+ this.highlightButton.childNodes[0].alt = strmarked;
+ this.highlightButton.childNodes[0].title = strmarked; //for IE
+ this.highlightButton.title = strmarked;
this.highlighted = true;
}
};
Please sign in to comment.
Something went wrong with that request. Please try again.