mirror of
https://github.com/moodle/moodle.git
synced 2025-07-10 00:46:32 +02:00
weblib: MDL-17085 a function to print a collapsible region of the UI, with the collapsed state stored in a user_perference - minor layout improvements for IE.
This commit is contained in:
@ -626,7 +626,7 @@ function collapsible_region(id, userpref, strtooltip) {
|
||||
if (this.div.className.match(/\bcollapsed\b/)) {
|
||||
this.collapsed = true;
|
||||
var region = YAHOO.util.Region.getRegion(this.caption);
|
||||
this.div.style.height = (region.bottom - region.top) + 'px';
|
||||
this.div.style.height = (region.bottom - region.top + 3) + 'px';
|
||||
}
|
||||
|
||||
// Add the appropriate image.
|
||||
@ -697,13 +697,14 @@ collapsible_region.prototype.handle_click = function(e) {
|
||||
this.animation.stop();
|
||||
}
|
||||
if (this.collapsed) {
|
||||
var targetel = this.caption;
|
||||
var region = YAHOO.util.Region.getRegion(this.caption);
|
||||
var targetheight = region.bottom - region.top + 3;
|
||||
} else {
|
||||
var targetel = this.innerdiv;
|
||||
var region = YAHOO.util.Region.getRegion(this.innerdiv);
|
||||
var targetheight = region.bottom - region.top + 2;
|
||||
this.div.className = this.div.className.replace(/\s*\bcollapsed\b\s*/, ' ');
|
||||
}
|
||||
var region = YAHOO.util.Region.getRegion(targetel);
|
||||
this.animation.attributes.height = { to: region.bottom - region.top, unit: 'px' };
|
||||
this.animation.attributes.height = { to: targetheight, unit: 'px' };
|
||||
this.animation.animate();
|
||||
|
||||
// Set the appropriate icon.
|
||||
|
Reference in New Issue
Block a user