MDL-83116 output: apply appropriate icon class to collapsible region.

This commit is contained in:
Paul Holden
2024-09-12 14:48:51 +01:00
parent 3477082aa9
commit cd2c86b301
+2 -2
View File
@@ -116,12 +116,12 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) {
}
if (this.div.hasClass('collapsed')) {
// Add the correct image and record the YUI node created in the process
this.icon = Y.Node.create('<img src="'+M.util.image_url(collapsedimage, 'moodle')+'" alt="" />');
this.icon = Y.Node.create('<img src="'+M.util.image_url(collapsedimage, 'moodle')+'" alt="" class="icon" />');
// Shrink the div as it is collapsed by default
this.div.setStyle('height', caption.get('offsetHeight')+'px');
} else {
// Add the correct image and record the YUI node created in the process
this.icon = Y.Node.create('<img src="'+M.util.image_url('t/expanded', 'moodle')+'" alt="" />');
this.icon = Y.Node.create('<img src="'+M.util.image_url('t/expanded', 'moodle')+'" alt="" class="icon" />');
}
a.append(this.icon);