mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
course ajax MDL-22653 Toggling of label visibility now dims text correctly. Kudos to Davo
This commit is contained in:
parent
704c5dfed4
commit
56dc41d0c4
@ -535,6 +535,7 @@ resource_class.prototype.init_resource = function(id, group, config, parentObj)
|
||||
this.groupmode = null; // Can be null (i.e. does not apply), 0, 1 or 2.
|
||||
|
||||
this.linkContainer = this.getEl().getElementsByTagName('a')[0];
|
||||
this.divContainer = this.getEl().getElementsByTagName('div')[0];
|
||||
|
||||
this.commandContainer = null;
|
||||
this.indentLeftButton = null;
|
||||
@ -757,6 +758,7 @@ resource_class.prototype.toggle_hide = function(target, e, superficial, force) {
|
||||
}
|
||||
if (this.hidden) {
|
||||
YAHOO.util.Dom.removeClass(this.linkContainer, 'dimmed');
|
||||
YAHOO.util.Dom.removeClass(this.divContainer, 'dimmed_text');
|
||||
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.title = this.viewButton.title.replace(strshow, strhide);
|
||||
@ -767,6 +769,7 @@ resource_class.prototype.toggle_hide = function(target, e, superficial, force) {
|
||||
}
|
||||
} else {
|
||||
YAHOO.util.Dom.addClass(this.linkContainer, 'dimmed');
|
||||
YAHOO.util.Dom.addClass(this.divContainer, 'dimmed_text');
|
||||
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.title = this.viewButton.title.replace(strhide, strshow);
|
||||
|
Loading…
x
Reference in New Issue
Block a user