From c615381288e9832ff1d0570eeadcecddec30a976 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 24 Feb 2008 02:04:11 +0000 Subject: [PATCH] Specify min width on pages that use TinyMCE. Props azaozz. fixes #5975 git-svn-id: http://svn.automattic.com/wordpress/trunk@6996 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-header.php | 15 ++++++++++++++- wp-admin/css/ie.css | 15 ++++++++++++++- wp-admin/wp-admin.css | 4 ++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 73ec721588..971ca3e7ac 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -6,6 +6,19 @@ if ( $editing ) { wp_enqueue_script( 'wp_tiny_mce' ); } +$min_width_pages = array( 'post.php', 'post-new.php', 'page.php', 'page-new.php', 'widgets.php', 'comment.php' ); +$the_current_page = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']); +$ie6_no_scrollbar = true; + +function add_minwidth($c) { + return $c . 'minwidth '; +} + +if ( in_array( $the_current_page, $min_width_pages ) ) { + $ie6_no_scrollbar = false; + add_filter( 'admin_body_class', 'add_minwidth' ); +} + get_admin_page_title(); ?> @@ -26,7 +39,7 @@ wp_admin_css(); //<\/scr"+"ipt>");s=d.getElementById("__ie_onload");s[c]=function(){s[r]=="complete"&&x()};/*@end@*/if(/WebKit/i.test(navigator.userAgent))t=setInterval(function(){/loaded|complete/.test(d[r])&&x()},10);o=w.onload;w.onload=function(){x();o&&o()}}e.push(f)}})();//]]> - +