Make postboxes easier to drop in the left column

git-svn-id: http://svn.automattic.com/wordpress/trunk@9510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-11-04 14:18:46 +00:00
parent 7c063b0b50
commit 0bfca053e9
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'),
) );