Skip to content

Commit

Permalink
Merge branch 'MDL-66721-master' of git://github.com/bmbrands/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jan 14, 2020
2 parents ea990a3 + a3f7695 commit 47d18a7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
}
}

// Take off 15px top and bottom for borders, plus 40px each for the title and button area before setting the
// new max-height
// Take off 15px top and bottom for borders, plus 69px for the title and 57px for the
// button area before setting the new max-height.
totalheight = newheight;
newheight = newheight - (15 + 15 + 40 + 40);
newheight = newheight - (69 + 57 + 15 + 15);
dialogue.setStyle('maxHeight', newheight + 'px');

var dialogueheight = bb.getStyle('height');
Expand All @@ -262,6 +262,8 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
if (dialogueheight < this.get('baseheight')) {
dialogueheight = this.get('baseheight');
dialogue.setStyle('height', dialogueheight + 'px');
} else {
dialogue.setStyle('height', 'auto');
}

this.panel.centerDialogue();
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
}
}

// Take off 15px top and bottom for borders, plus 40px each for the title and button area before setting the
// new max-height
// Take off 15px top and bottom for borders, plus 69px for the title and 57px for the
// button area before setting the new max-height.
totalheight = newheight;
newheight = newheight - (15 + 15 + 40 + 40);
newheight = newheight - (69 + 57 + 15 + 15);
dialogue.setStyle('maxHeight', newheight + 'px');

var dialogueheight = bb.getStyle('height');
Expand All @@ -262,6 +262,8 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
if (dialogueheight < this.get('baseheight')) {
dialogueheight = this.get('baseheight');
dialogue.setStyle('height', dialogueheight + 'px');
} else {
dialogue.setStyle('height', 'auto');
}

this.panel.centerDialogue();
Expand Down
8 changes: 5 additions & 3 deletions lib/yui/src/chooserdialogue/js/chooserdialogue.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
}
}

// Take off 15px top and bottom for borders, plus 40px each for the title and button area before setting the
// new max-height
// Take off 15px top and bottom for borders, plus 69px for the title and 57px for the
// button area before setting the new max-height.
totalheight = newheight;
newheight = newheight - (15 + 15 + 40 + 40);
newheight = newheight - (69 + 57 + 15 + 15);
dialogue.setStyle('maxHeight', newheight + 'px');

var dialogueheight = bb.getStyle('height');
Expand All @@ -260,6 +260,8 @@ Y.extend(CHOOSERDIALOGUE, Y.Base, {
if (dialogueheight < this.get('baseheight')) {
dialogueheight = this.get('baseheight');
dialogue.setStyle('height', dialogueheight + 'px');
} else {
dialogue.setStyle('height', 'auto');
}

this.panel.centerDialogue();
Expand Down

0 comments on commit 47d18a7

Please sign in to comment.