Fix overlap in plugin and theme editors, props eddieringle, fixes #10101 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@11647 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-06-26 11:07:10 +00:00
parent ffef1c0d4c
commit 8fb6081b5b
9 changed files with 61 additions and 90 deletions

View File

@ -267,7 +267,7 @@ td.help {
color: #000; color: #000;
} }
.side-info h5, .bordertitle { .side-info h5 {
border-bottom-color: #dadada; border-bottom-color: #dadada;
} }

View File

@ -267,7 +267,7 @@ td.help {
color: #000; color: #000;
} }
.side-info h5, .bordertitle { .side-info h5 {
border-bottom-color: #dadada; border-bottom-color: #dadada;
} }

View File

@ -246,7 +246,8 @@ a.button {
.tagchecklist, .tagchecklist,
#col-container, #col-container,
#col-left, #col-left,
#col-right { #col-right,
.fileedit-sub {
display: block; display: block;
zoom: 100%; zoom: 100%;
} }

View File

@ -1,12 +1,3 @@
#templateside { #templateside {
float: left; float: left;
} }
#themeselector {
padding-right: 0;
padding-left: 5px;
float: left;
}
div.tablenav {
margin-right: 0;
margin-left: 210px;
}

View File

@ -11,41 +11,26 @@
#templateside { #templateside {
float: right; float: right;
width: 190px; width: 190px;
word-wrap: break-word;
} }
#templateside h3, #postcustomstuff p.submit { #templateside h3,
#postcustomstuff p.submit {
margin: 0; margin: 0;
} }
h3#bordertitle {
margin-bottom: 10px;
}
#templateside h4 { #templateside h4 {
margin-bottom: 0; margin: 1em 0 0;
} }
#templateside ol, #templateside ul { #templateside ol,
list-style: none; #templateside ul {
margin: .5em; margin: .5em;
padding: 0; padding: 0;
} }
#templateside ol li, #templateside ul li { #templateside li {
margin: 1px 0; margin: 4px 0;
}
#themeselector {
padding-right: 5px;
float: right;
position: relative;
bottom: 25px;
top:20px;
}
#themeselector select {
margin: 0;
padding: 0;
} }
.nonessential { .nonessential {
@ -56,11 +41,6 @@ h3#bordertitle {
padding: 1px; padding: 1px;
} }
div.bordertitle h2 {
border: none;
padding-bottom: 0;
}
div.tablenav { div.tablenav {
margin-right: 210px; margin-right: 210px;
} }
@ -72,4 +52,9 @@ div.tablenav {
line-height: 22px; line-height: 22px;
vertical-align: top; vertical-align: top;
font-weight: bold; font-weight: bold;
} }
.fileedit-sub {
padding: 10px 0 8px;
line-height: 180%;
}

View File

@ -136,8 +136,25 @@ default:
<div class="wrap"> <div class="wrap">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?></h2> <h2><?php echo esc_html( $title ); ?></h2>
<div class="bordertitle">
<form id="themeselector" action="plugin-editor.php" method="post"> <div class="fileedit-sub">
<div class="alignleft">
<big><?php
if ( is_plugin_active($plugin) ) {
if ( is_writeable($real_file) )
echo sprintf(__('Editing <strong>%s</strong> (active)'), $file);
else
echo sprintf(__('Browsing <strong>%s</strong> (active)'), $file);
} else {
if ( is_writeable($real_file) )
echo sprintf(__('Editing <strong>%s</strong> (inactive)'), $file);
else
echo sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file);
}
?></big>
</div>
<div class="alignright">
<form action="plugin-editor.php" method="post">
<strong><label for="plugin"><?php _e('Select plugin to edit:'); ?> </label></strong> <strong><label for="plugin"><?php _e('Select plugin to edit:'); ?> </label></strong>
<select name="plugin" id="plugin"> <select name="plugin" id="plugin">
<?php <?php
@ -156,27 +173,11 @@ default:
<input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" /> <input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />
</form> </form>
</div> </div>
<div class="tablenav">
<div class="alignleft">
<big><?php
if ( is_plugin_active($plugin) ) {
if ( is_writeable($real_file) )
echo sprintf(__('Editing <strong>%s</strong> (active)'), $file);
else
echo sprintf(__('Browsing <strong>%s</strong> (active)'), $file);
} else {
if ( is_writeable($real_file) )
echo sprintf(__('Editing <strong>%s</strong> (inactive)'), $file);
else
echo sprintf(__('Browsing <strong>%s</strong> (inactive)'), $file);
}
?></big>
</div>
<br class="clear" /> <br class="clear" />
</div> </div>
<br class="clear" />
<div id="templateside"> <div id="templateside">
<h3 id="bordertitle"><?php _e('Plugin Files'); ?></h3> <h3><?php _e('Plugin Files'); ?></h3>
<ul> <ul>
<?php <?php
@ -195,8 +196,8 @@ foreach ( $plugin_files as $plugin_file ) :
<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo $plugin_file; ?>&amp;plugin=<?php echo $plugin; ?>"><?php echo $plugin_file ?></a></li> <li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo $plugin_file; ?>&amp;plugin=<?php echo $plugin; ?>"><?php echo $plugin_file ?></a></li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>
</div> </div>
<form name="template" id="template" action="plugin-editor.php" method="post"> <form name="template" id="template" action="plugin-editor.php" method="post">
<?php wp_nonce_field('edit-plugin_' . $file) ?> <?php wp_nonce_field('edit-plugin_' . $file) ?>
<div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea> <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
<input type="hidden" name="action" value="update" /> <input type="hidden" name="action" value="update" />
@ -221,10 +222,10 @@ foreach ( $plugin_files as $plugin_file ) :
<?php else : ?> <?php else : ?>
<p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p> <p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p>
<?php endif; ?> <?php endif; ?>
</form> </form>
<div class="clear"> &nbsp; </div> <br class="clear" />
</div> </div>
<?php <?php
break; break;
} }
include("admin-footer.php") ?> include("admin-footer.php");

View File

@ -117,8 +117,13 @@ $desc_header = ( $description != $file_show ) ? "<strong>$description</strong> (
<div class="wrap"> <div class="wrap">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?></h2> <h2><?php echo esc_html( $title ); ?></h2>
<div class="bordertitle">
<form id="themeselector" action="theme-editor.php" method="post"> <div class="fileedit-sub">
<div class="alignleft">
<big><?php echo sprintf($desc_header, $file_show); ?></big>
</div>
<div class="alignright">
<form action="theme-editor.php" method="post">
<strong><label for="theme"><?php _e('Select theme to edit:'); ?> </label></strong> <strong><label for="theme"><?php _e('Select theme to edit:'); ?> </label></strong>
<select name="theme" id="theme"> <select name="theme" id="theme">
<?php <?php
@ -134,15 +139,11 @@ $desc_header = ( $description != $file_show ) ? "<strong>$description</strong> (
<input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" /> <input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />
</form> </form>
</div> </div>
<div class="tablenav">
<div class="alignleft">
<big><?php echo sprintf($desc_header, $file_show); ?></big>
</div>
<br class="clear" /> <br class="clear" />
</div> </div>
<br class="clear" /> <br class="clear" />
<div id="templateside"> <div id="templateside">
<h3 id="bordertitle"><?php _e("Theme Files"); ?></h3> <h3><?php _e("Theme Files"); ?></h3>
<?php <?php
if ($allowed_files) : if ($allowed_files) :
@ -193,9 +194,7 @@ if ($allowed_files) :
</ul> </ul>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php <?php if (!$error) { ?>
if (!$error) {
?>
<form name="template" id="template" action="theme-editor.php" method="post"> <form name="template" id="template" action="theme-editor.php" method="post">
<?php wp_nonce_field('edit-theme_' . $file . $theme) ?> <?php wp_nonce_field('edit-theme_' . $file . $theme) ?>
<div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea> <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
@ -223,15 +222,15 @@ if ($allowed_files) :
<?php endif; ?> <?php endif; ?>
</div> </div>
</form> </form>
<?php <?php
} else { } else {
echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>'; echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>';
} }
?> ?>
<div class="clear"> &nbsp; </div> <br class="clear" />
</div> </div>
<?php <?php
break; break;
} }
include("admin-footer.php") ?> include("admin-footer.php");

View File

@ -2092,12 +2092,6 @@ p.search-box {
padding: 0 0 .2em 1px; padding: 0 0 .2em 1px;
} }
.bordertitle {
padding-bottom: 5px;
border-bottom-width: 1px;
border-bottom-style: solid;
}
/* Edit posts */ /* Edit posts */
td.post-title strong, td.plugin-title strong { td.post-title strong, td.plugin-title strong {

View File

@ -421,9 +421,9 @@ function wp_default_styles( &$styles ) {
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' ); $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' );
// all colors stylesheets need to have the same query strings (cache manifest compat) // all colors stylesheets need to have the same query strings (cache manifest compat)
$colors_version = '20090610'; $colors_version = '20090625';
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20090612' ); $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20090625' );
$styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' ); $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20090612' ); $styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20090612' );
@ -443,7 +443,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'widgets', '/wp-admin/css/widgets.css', array(), '20090603' ); $styles->add( 'widgets', '/wp-admin/css/widgets.css', array(), '20090603' );
$styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20090514' ); $styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20090514' );
$styles->add( 'install', '/wp-admin/css/install.css', array(), '20090514' ); $styles->add( 'install', '/wp-admin/css/install.css', array(), '20090514' );
$styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css', array(), '20090514' ); $styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css', array(), '20090625' );
$styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20090514' ); $styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20090514' );
$styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' ); $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' );
$styles->add( 'login', '/wp-admin/css/login.css', array(), '20090514' ); $styles->add( 'login', '/wp-admin/css/login.css', array(), '20090514' );