From 0bfca053e9b9ff243e08532551cab71b929ded00 Mon Sep 17 00:00:00 2001 From: azaozz Date: Tue, 4 Nov 2008 14:18:46 +0000 Subject: [PATCH] Make postboxes easier to drop in the left column git-svn-id: http://svn.automattic.com/wordpress/trunk@9510 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/postbox.js | 3 ++- wp-admin/wp-admin.css | 4 ++++ wp-includes/script-loader.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-admin/js/postbox.js b/wp-admin/js/postbox.js index 13be22692f..45a9dd6248 100644 --- a/wp-admin/js/postbox.js +++ b/wp-admin/js/postbox.js @@ -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'); diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 023d83c719..4470b0d97e 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -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 { diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index e0004b089d..8edc7acdee 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -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'), ) );