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

git-svn-id: http://svn.automattic.com/wordpress/trunk@19045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-23 17:55:24 +00:00
parent ffcb6aba46
commit ad0e83c165
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();
});

File diff suppressed because one or more lines are too long

View File

@ -61,7 +61,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111012', 1 );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111023', 1 );
$scripts->add_script_data( 'common', 'commonL10n', array(
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
) );