Make postboxes easier to drop in the left column

git-svn-id: https://develop.svn.wordpress.org/trunk@9510 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2008-11-04 14:18:46 +00:00
parent 7d45802347
commit f4f88befc6
3 changed files with 7 additions and 2 deletions

View File

@ -33,7 +33,8 @@
if ( doIt || $('#side-sortables > .postbox:visible').length ) {
if ( ! $('#post-body').hasClass('has-sidebar') ) {
$('#post-body').addClass('has-sidebar');
$('#side-sortables').css({'minHeight':$('#post-body').height()+'px'});
var h = Math.min( $('#post-body').height(), 300 );
$('#side-sortables').css({'minHeight':h+'px'});
}
} else {
$('#post-body').removeClass('has-sidebar');

View File

@ -1312,6 +1312,10 @@ table.form-table td .updated {
margin: 0;
}
#side-sortables {
min-height: 300px;
}
#side-sortables .submitbox .submit input,
#side-sortables .submitbox .submit .preview,
#side-sortables .submitbox .submit a.preview:hover {

View File

@ -166,7 +166,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'admin-forms', '/wp-admin/js/forms.js', array('jquery'), '20080729');
$scripts->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );
$scripts->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' );
$scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery-ui-sortable'), '20081030' );
$scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery-ui-sortable'), '20081104' );
$scripts->localize( 'postbox', 'postboxL10n', array(
'requestFile' => admin_url('admin-ajax.php'),
) );