mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Add 'enter title here' text to title box. see #12591
git-svn-id: http://svn.automattic.com/wordpress/trunk@13964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2c4c31118e
commit
d05e120d44
File diff suppressed because one or more lines are too long
@ -1765,6 +1765,7 @@ div.inside {
|
||||
}
|
||||
|
||||
#titlediv {
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
#titlediv label { cursor: text; }
|
||||
@ -1792,6 +1793,13 @@ div.inside {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#titlediv #title-prompt-text {
|
||||
color: #bbb;
|
||||
position: absolute;
|
||||
font-size: 1.7em;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#poststuff .inside-submitbox,
|
||||
#side-sortables .inside-submitbox {
|
||||
margin: 0 3px;
|
||||
|
@ -192,7 +192,7 @@ $side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
|
||||
<?php if ( post_type_supports($post_type, 'title') ) { ?>
|
||||
<div id="titlediv">
|
||||
<div id="titlewrap">
|
||||
<label class="screen-reader-text" for="title"><?php _e('Title') ?></label>
|
||||
<label class="hide-if-no-js" id="title-prompt-text" for="title"><?php _e('Enter title here') ?></label>
|
||||
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
|
||||
</div>
|
||||
<div class="inside">
|
||||
|
@ -599,4 +599,17 @@ jQuery(document).ready( function($) {
|
||||
}
|
||||
makeSlugeditClickable();
|
||||
}
|
||||
|
||||
$('#title-prompt-text').click(function(){
|
||||
$(this).css('visibility', 'hidden').siblings('#title').focus();
|
||||
});
|
||||
$('#title').blur(function(){
|
||||
if (this.value == '')
|
||||
$(this).siblings('#title-prompt-text').css('visibility', '');
|
||||
}).focus(function(){
|
||||
$(this).siblings('#title-prompt-text').css('visibility', 'hidden');
|
||||
}).keydown(function(e){
|
||||
$(this).siblings('#title-prompt-text').css('visibility', 'hidden');
|
||||
$(this).unbind(e);
|
||||
});
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@ -279,7 +279,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20091012' );
|
||||
$scripts->add_data( 'postbox', 'group', 1 );
|
||||
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20100401' );
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20100403' );
|
||||
$scripts->add_data( 'post', 'group', 1 );
|
||||
$scripts->localize( 'post', 'postL10n', array(
|
||||
'tagsUsed' => __('Tags used on this post:'),
|
||||
@ -449,7 +449,7 @@ function wp_default_styles( &$styles ) {
|
||||
// all colors stylesheets need to have the same query strings (cache manifest compat)
|
||||
$colors_version = '20100326b';
|
||||
|
||||
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20100326c' );
|
||||
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20100403' );
|
||||
|
||||
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20100219' );
|
||||
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
||||
|
Loading…
Reference in New Issue
Block a user