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:
parent
94cb070299
commit
a7dda77ea7
@ -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
@ -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.")
|
||||
) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user