Permalink
Browse files

MDL-31903 course: Title on highlight and hide icon should be only add…

…ed in ie
  • Loading branch information...
Rajesh Taneja Sam Hemelryk
Rajesh Taneja authored and Sam Hemelryk committed Mar 16, 2012
1 parent f6fd27e commit ea496d1a00f04695b62f5ec836072518f1b50736
Showing with 14 additions and 4 deletions.
  1. +14 −4 lib/ajax/section_classes.js
@@ -337,7 +337,10 @@ section_class.prototype.toggle_hide = function(e,target,superficial) {
YAHOO.util.Dom.removeClass(this.getEl(), 'hidden');
this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/show/i, 'hide');
this.viewButton.childNodes[0].alt = this.viewButton.childNodes[0].alt.replace(strshow, strhide);
this.viewButton.childNodes[0].title = this.viewButton.childNodes[0].title.replace(strshow, strhide); //IE hack.
// mk_button set title only in ie, so check before setting it
if (this.viewButton.childNodes[0].title) {
this.viewButton.childNodes[0].title = this.viewButton.childNodes[0].title.replace(strshow, strhide); //IE hack.
}
this.viewButton.title = this.viewButton.title.replace(strshow, strhide);
this.hidden = false;
@@ -353,7 +356,9 @@ section_class.prototype.toggle_hide = function(e,target,superficial) {
YAHOO.util.Dom.addClass(this.getEl(), 'hidden');
this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/hide/i, 'show');
this.viewButton.childNodes[0].alt = this.viewButton.childNodes[0].alt.replace(strhide, strshow);
this.viewButton.childNodes[0].title = this.viewButton.childNodes[0].title.replace(strhide, strshow); //IE hack.
if (this.viewButton.childNodes[0].title) {
this.viewButton.childNodes[0].title = this.viewButton.childNodes[0].title.replace(strhide, strshow); //IE hack.
}
this.viewButton.title = this.viewButton.title.replace(strhide, strshow);
this.hidden = true;
@@ -376,14 +381,19 @@ section_class.prototype.toggle_highlight = function() {
YAHOO.util.Dom.removeClass(this.getEl(), 'current');
this.highlightButton.childNodes[0].src = main.portal.icons['marker'];
this.highlightButton.childNodes[0].alt = strmarker;
this.highlightButton.childNodes[0].title = strmarker; //for IE
// mk_button set title only in ie, so check before setting it
if (this.highlightButton.childNodes[0].title) {
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.childNodes[0].alt = strmarked;
this.highlightButton.childNodes[0].title = strmarked; //for IE
if (this.highlightButton.childNodes[0].title) {
this.highlightButton.childNodes[0].title = strmarked; //for IE
}
this.highlightButton.title = strmarked;
this.highlighted = true;
}

0 comments on commit ea496d1

Please sign in to comment.