Fix lag when opening help tab if screen options was opened before, fixes #19172
git-svn-id: https://develop.svn.wordpress.org/trunk@19186 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3de47877d6
commit
da045838f5
|
@ -124,18 +124,22 @@ screenMeta = {
|
||||||
panel.parent().show();
|
panel.parent().show();
|
||||||
panel.slideDown( 'fast', function() {
|
panel.slideDown( 'fast', function() {
|
||||||
link.addClass('screen-meta-active');
|
link.addClass('screen-meta-active');
|
||||||
|
screenMeta.refresh();
|
||||||
});
|
});
|
||||||
|
|
||||||
screenMeta.refresh();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function( panel, link ) {
|
refresh: function( panel, link ) {
|
||||||
var columns = $('#contextual-help-wrap').children(), height;
|
var columns = $('#contextual-help-wrap').children(), height = 0;
|
||||||
|
|
||||||
columns.height('auto');
|
columns.each(function(){
|
||||||
|
var h = $(this).height();
|
||||||
|
|
||||||
height = Math.max.apply( null, $.map( columns, function( el ) { return $(el).height(); }) );
|
if ( h > height )
|
||||||
columns.height( height );
|
height = h;
|
||||||
|
});
|
||||||
|
|
||||||
|
if ( height )
|
||||||
|
columns.height( height );
|
||||||
},
|
},
|
||||||
|
|
||||||
close: function( panel, link ) {
|
close: function( panel, link ) {
|
||||||
|
|
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( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
|
||||||
|
|
||||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111103b', 1 );
|
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111106', 1 );
|
||||||
$scripts->add_script_data( 'common', 'commonL10n', array(
|
$scripts->add_script_data( 'common', 'commonL10n', array(
|
||||||
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
|
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
|
||||||
) );
|
) );
|
||||||
|
|
Loading…
Reference in New Issue