Attach 'Screen Options' button to the sliding layer and related changes

git-svn-id: http://svn.automattic.com/wordpress/trunk@9363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-10-27 01:22:24 +00:00
parent bb7249cffe
commit 2e6d9f228e
19 changed files with 107 additions and 187 deletions

View File

@ -73,22 +73,12 @@ unset($hook_suffixes, $hook_suffix);
<div id="wpcontent">
<div id="wphead">
<?php
$settings_pages = array( 'categories.php', 'edit.php', 'edit-comments.php', 'edit-form-advanced.php', 'edit-link-categories.php', 'edit-link-form.php', 'edit-page-form.php', 'edit-tags.php', 'link-manager.php', 'upload.php', 'users.php', 'edit-pages.php', 'post-new.php', 'post.php', 'page-new.php', 'page.php', 'index.php' );
$blog_name = get_bloginfo('name', 'display');
if ( '' == $blog_name )
$blog_name = '&nbsp;';
?>
<img id="logo50" src="images/wp-logo.gif" alt="" /> <h1><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit site') ?>"><?php echo $blog_name ?></a>
<?php if ( false === strpos($_SERVER['REQUEST_URI'], 'page=') && in_array( $pagenow, $settings_pages ) ) { ?>
<span id="screen-options-link-wrap" class="hide-if-no-js screen-options-closed">
<span id="screen-options">
<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a>
<a href="#screen-options" id="hide-settings-link" class="show-settings" style="display:none;"><?php _e('Hide Options') ?></a>
</span>
</span>
<?php } ?></h1>
<img id="logo50" src="images/wp-logo.gif" alt="" /> <h1><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit site') ?>"><?php echo $blog_name ?></a></h1>
<div id="wphead-info">
<div id="user_info">
@ -98,13 +88,11 @@ if ( '' == $blog_name )
<?php favorite_actions(); ?>
</div>
</div>
<?php
require(ABSPATH . 'wp-admin/menu-header.php');
?>
<div id="wpbody">
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
<div id="wpbody-content">
<?php
do_action('admin_notices');

View File

@ -131,15 +131,7 @@ $messages[4] = __('Category not added.');
$messages[5] = __('Category not updated.');
?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('category') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('category') ?>
<?php
if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?>
@ -147,8 +139,8 @@ if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
endif; ?>
<div class="wrap">
<h2 class="floatedh2"><?php echo wp_specialchars( $title ); ?></h2>
<div class="wrap nosubsub">
<h2><?php echo wp_specialchars( $title ); ?></h2>
<form class="search-form topmargin" action="" method="get">
<p class="search-box">

View File

@ -807,8 +807,12 @@ table.diff .diff-addedline ins {
}
#screen-options-wrap {
background-color: #E4F2FD;
border-color: #c6d9e9;
background-color: #f1f1f1;
border-color: #dfdfdf;
}
#screen-options a.show-settings {
color: #606060;
}
#replydiv,

View File

@ -13,7 +13,6 @@
#wpbody-content {
overflow: hidden;
padding-top: 10px;
}
#adminmenu {
@ -163,10 +162,8 @@ h6 {
.subsubsub {
list-style: none;
margin: 0;
margin: 0 0 5px;
padding: 0;
position: relative;
top: -5px;
white-space: nowrap;
font-size: 12px;
float: left;
@ -296,10 +293,9 @@ th.check-column + th, th.check-column + td {
}
.wrap h2 {
clear: both;
font: italic normal normal 24px/29px Georgia, "Times New Roman", Times, serif;
margin: 5px 0 10px;
padding: 8px 15px 4px 0;
margin: 0;
padding: 20px 15px 10px 0;
}
.wrap h2.long-header {

View File

@ -81,15 +81,7 @@ $post_id = isset($_GET['p']) ? (int) $_GET['p'] : 0;
$search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : '';
$search = attribute_escape( $search_dirty ); ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('comment') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('comment') ?>
<?php
if ( isset( $_GET['approved'] ) || isset( $_GET['deleted'] ) || isset( $_GET['spam'] ) ) {

View File

@ -459,14 +459,7 @@ endif;
?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php meta_box_prefs('post') ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('post', 1) ?>
<?php if ( $notice ) : ?>
<div id="notice" class="error"><p><?php echo $notice ?></p></div>

View File

@ -60,25 +60,17 @@ $messages[4] = __('Category not added.');
$messages[5] = __('Category not updated.');
$messages[6] = __('Categories deleted.'); ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('link-category') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('link-category') ?>
<?php if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?>
<div id="message" class="updated fade"><p><?php echo $messages[$msg]; ?></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
endif; ?>
<div class="wrap">
<h2 class="floatedh2"><?php echo wp_specialchars( $title ); ?></h2>
<div class="wrap nosubsub">
<h2><?php echo wp_specialchars( $title ); ?></h2>
<form class="search-form topmargin" action="" method="get">
<form class="search-form" action="" method="get">
<p class="search-box">
<label class="hidden" for="category-search-input"><?php _e( 'Search Categories' ); ?>:</label>
<input type="text" class="search-input" id="category-search-input" name="s" value="<?php _admin_search_query(); ?>" />

View File

@ -309,15 +309,7 @@ function link_advanced_meta_box($link) {
}
add_meta_box('linkadvanceddiv', __('Advanced'), 'link_advanced_meta_box', 'link', 'normal', 'core'); ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php meta_box_prefs('link') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('link', 1) ?>
<div class="wrap">
<h2><?php echo wp_specialchars( $title ); ?></h2>

View File

@ -349,15 +349,7 @@ add_meta_box('revisionsdiv', __('Page Revisions'), 'page_revisions_meta_box', 'p
endif;
?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php meta_box_prefs('page') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('page', 1); ?>
<div class="wrap">
<h2><?php echo wp_specialchars( $title ); ?></h2>

View File

@ -100,15 +100,7 @@ if ( is_singular() ) {
require_once('admin-header.php'); ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('page') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('page') ?>
<?php if ( isset($_GET['locked']) || isset($_GET['skipped']) || isset($_GET['updated']) ) { ?>
<div id="message" class="updated fade"><p>

View File

@ -129,25 +129,17 @@ $messages[4] = __('Tag not added.');
$messages[5] = __('Tag not updated.');
$messages[6] = __('Tags deleted.'); ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('tag') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('tag') ?>
<?php if ( isset($_GET['message']) && ( $msg = (int) $_GET['message'] ) ) : ?>
<div id="message" class="updated fade"><p><?php echo $messages[$msg]; ?></p></div>
<?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
endif; ?>
<div class="wrap">
<h2 class="floatedh2"><?php echo wp_specialchars( $title ); ?></h2>
<div class="wrap nosubsub">
<h2><?php echo wp_specialchars( $title ); ?></h2>
<form class="search-form topmargin" action="" method="get">
<form class="search-form" action="" method="get">
<p class="search-box">
<label class="hidden" for="tag-search-input"><?php _e( 'Search Tags' ); ?>:</label>
<input type="text" class="search-input" id="tag-search-input" name="s" value="<?php _admin_search_query(); ?>" />

View File

@ -90,15 +90,7 @@ if ( empty($_GET['mode']) )
else
$mode = attribute_escape($_GET['mode']); ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('post') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('post') ?>
<?php
if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?>

View File

@ -3090,4 +3090,31 @@ function _post_states($post) {
}
}
function screen_options($screen, $metabox = false) {
?>
<div id="screen-options">
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php
if ( $metabox ) {
meta_box_prefs($screen);
} else {
manage_columns_prefs($screen);
wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false );
}
?>
<br class="clear" />
</div></form>
</div>
<div id="screen-options-link-wrap" class="hide-if-no-js screen-options-closed">
<a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a>
<a href="#screen-options" id="hide-settings-link" class="show-settings" style="display:none;"><?php _e('Hide Options') ?></a>
</div>
</div>
<?php
}
?>

View File

@ -28,14 +28,7 @@ require_once('admin-header.php');
$today = current_time('mysql', 1);
?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php meta_box_prefs('dashboard') ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('dashboard', 1); ?>
<div class="wrap">
<h2><?php echo wp_specialchars( $title ); ?></h2>

View File

@ -74,15 +74,7 @@ switch ($order_by) {
break;
} ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('link') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('link') ?>
<?php
if ( isset($_GET['deleted']) ) {
@ -94,14 +86,14 @@ if ( isset($_GET['deleted']) ) {
}
?>
<div class="wrap">
<h2 class="floatedh2"><?php echo wp_specialchars( $title ); ?></h2>
<div class="wrap nosubsub">
<h2><?php echo wp_specialchars( $title ); ?></h2>
<form class="search-form topmargin" action="" method="get">
<form class="search-form" action="" method="get">
<p class="search-box">
<label class="hidden" for="link-search-input"><?php _e( 'Search Links' ); ?>:</label>
<input type="text" class="search-input" id="link-search-input" name="s" value="<?php _admin_search_query(); ?>" />
<input type="submit" value="<?php _e( 'Search Links' ); ?>" class="button" />
<input type="submit" value="<?php _e( 'Search Links' ); ?>" class="button-primary" />
</p>
</form>
<br class="clear" />

View File

@ -129,7 +129,7 @@ function _wp_menu_output( &$menu, &$submenu, $submenu_as_parent = true ) {
?>
<ul id="adminmenu" class="wp-menu">
<ul id="adminmenu">
<?php

View File

@ -145,15 +145,7 @@ if ( is_singular() ) {
require_once('admin-header.php'); ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('media') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('media') ?>
<?php
if ( isset($_GET['posted']) && (int) $_GET['posted'] ) {

View File

@ -237,15 +237,7 @@ default:
}
endif; ?>
<div id="screen-options-wrap" class="hidden">
<h5><?php _e('Show on screen') ?></h5>
<form id="adv-settings" action="" method="get">
<div class="metabox-prefs">
<?php manage_columns_prefs('user') ?>
<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?>
<br class="clear" />
</div></form>
</div>
<?php screen_options('user') ?>
<?php if ( isset($errors) && is_wp_error( $errors ) ) : ?>
<div class="error">
@ -312,7 +304,7 @@ unset($role_links);
<p class="search-box">
<label class="hidden" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label>
<input type="text" class="search-input" id="user-search-input" name="usersearch" value="<?php echo attribute_escape($wp_user_search->search_term); ?>" />
<input type="submit" value="<?php _e( 'Search Users' ); ?>" class="button" />
<input type="submit" value="<?php _e( 'Search Users' ); ?>" class="button-primary" />
</p>
</form>

View File

@ -1019,6 +1019,7 @@ strong .post-com-count {
border-radius: 3px;
}
/*
#wpbody ul.wp-menu {
list-style: none;
margin: 10px 0;
@ -1042,7 +1043,7 @@ strong .post-com-count {
text-decoration: none;
color: #666;
}
*/
/* end menu stuff */
/* Admin Footer */
@ -1408,11 +1409,6 @@ table.form-table td .updated {
text-decoration: underline;
}
.wrap h2.floatedh2 {
float: left;
margin: 5px 0;
}
#poststuff h2 {
margin-top: 20px;
font-size: 1.5em;
@ -1752,11 +1748,15 @@ p#big-add-button .button {
p.search-box {
float: right;
margin: -10px 0 0;
margin: -5px 0 0;
}
.topmargin p.search-box {
margin-top: 25px;
#wpbody-content .nosubsub p.search-box {
margin-top: -12px;
}
#wpbody-content .nosubsub h2 {
padding-bottom: 0;
}
.search-input {
@ -2258,39 +2258,46 @@ fieldset {
}
/* show/hide settings */
#screen-options-link-wrap {
background: url( images/screen-options-left.gif ) no-repeat 0 0;
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
height: 23px;
position: absolute;
right: 100px;
top: 46px;
padding: 0 0 0 8px;
}
#screen-options {
vertical-align: middle;
height: 23px;
line-height: 23px;
font-size: 11px;
background: url( images/screen-options-right.gif ) no-repeat 100% 0;
display: block;
padding-right: 20px;
position: relative;
clear: both;
}
.screen-options-open #screen-options {
background: url( images/screen-options-right-up.gif ) no-repeat 100% 0;
#wpbody {
clear: both;
}
#screen-options-link-wrap {
float: right;
background: transparent url( images/screen-options-left.gif ) no-repeat 0 0;
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
height: 23px;
padding: 0;
position: relative;
right: 100px;
top: -1px;
}
#screen-options a.show-settings {
color: #666;
text-decoration: none;
z-index: 1;
float: left;
margin-left: -8px;
padding-left: 8px;
margin-right: -20px;
padding-right: 20px;
padding: 0 18px 0 8px;
height: 23px;
line-height: 23px;
font-size: 11px;
display: block;
background-repeat: no-repeat;
background-position: right top;
background-color: tarnsparent;
}
#screen-options a#show-settings-link {
background-image: url( images/screen-options-right.gif );
}
#screen-options a#hide-settings-link {
background-image: url( images/screen-options-right-up.gif );
}
#screen-options a.show-settings:hover {
@ -2307,7 +2314,7 @@ fieldset {
border-style: none solid solid;
border-top: 0 none;
border-width: 0 1px 1px;
margin: -10px 15px 10px;
margin: 0 15px;
-moz-border-radius: 0 0 4px 4px;
-webkit-border-bottom-left-radius: 4px;
-webkit-border-bottom-right-radius: 4px;