Adjust the height of the help columns on 'Help' tab open. see #18690.

git-svn-id: https://develop.svn.wordpress.org/trunk@19045 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2011-10-23 17:55:24 +00:00
parent 94cb070299
commit a7dda77ea7
3 changed files with 11 additions and 12 deletions

View File

@@ -138,6 +138,14 @@ screenMeta = {
screenMeta.refresh();
},
refresh: function( panel, link ) {
var columns = $('#contextual-help-wrap').children(),
height;
columns.height('auto');
height = Math.max.apply( null, $.map( columns, function( el ) { return $(el).height(); }) );
columns.height( height );
screenMeta.element.css({ top: 0 });
screenMeta.page.css({ paddingTop: screenMeta.padding + screenMeta.element.outerHeight() });
},
@@ -154,9 +162,7 @@ screenMeta = {
*/
$('.contextual-help-tabs').delegate('a', 'click focus', function(e) {
var link = $(this),
panel,
columns,
height;
panel;
e.preventDefault();
@@ -174,13 +180,6 @@ $('.contextual-help-tabs').delegate('a', 'click focus', function(e) {
$('.help-tab-content').not( panel ).removeClass('active').hide();
panel.addClass('active').show();
// Adjust the height of the help columns
columns = $('#contextual-help-wrap').children();
columns.height('auto');
height = Math.max.apply( null, $.map( columns, function( el ) { return $(el).height(); }) );
columns.height( height );
// Refresh the padding of the screen meta box.
screenMeta.refresh();
});