MDL-37566 AJAX Fix issues with minimum height and centring

Conflicts:
	lib/yui/chooserdialogue/chooserdialogue.js
This commit is contained in:
Andrew Robert Nicols
2013-02-07 01:12:22 +01:00
committed by Eloy Lafuente (stronk7)
parent 377d577f2d
commit 72ffbbad46
+17 -1
View File
@@ -239,8 +239,21 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
newheight = newheight - (15 + 15 + 40 + 40);
dialogue.setStyle('maxHeight', newheight + 'px');
dialogueheight = bb.getStyle('height');
if (dialogueheight.match(/.*px$/)) {
dialogueheight = dialogueheight.replace(/px$/, '');
} else {
dialogueheight = totalheight;
}
if (dialogueheight < this.get('baseheight')) {
dialogueheight = this.get('baseheight');
dialogue.setStyle('height', dialogueheight + 'px');
}
// Re-calculate the location now that we've changed the size
var dialoguetop = Math.max(12, ((winheight - totalheight) / 2)) + offsettop;
dialoguetop = Math.max(12, ((winheight - dialogueheight) / 2)) + offsettop;
// We need to set the height for the yui3-widget - can't work
// out what we're setting at present -- shoud be the boudingBox
@@ -312,6 +325,9 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
minheight : {
value : 300
},
baseheight: {
value : 400
},
maxheight : {
value : 660
},