diff --git wp-admin/css/wp-admin.css wp-admin/css/wp-admin.css
index 95c0482..722074d 100644
|
|
ul.cat-checklist { |
3032 | 3032 | margin: 1px 0; |
3033 | 3033 | } |
3034 | 3034 | |
3035 | | #titlediv #title-prompt-text, |
3036 | | #wp-fullscreen-title-prompt-text { |
3037 | | color: #bbb; |
| 3035 | #wp-fullscreen-title-prompt-text, |
| 3036 | #titlediv #title-prompt-text { |
3038 | 3037 | position: absolute; |
| 3038 | right: 0; |
| 3039 | text-indent: 9px; |
| 3040 | font-weight: 200; |
3039 | 3041 | font-size: 1.7em; |
3040 | | padding: 11px 10px; |
| 3042 | width: 100%; |
| 3043 | color: #bbb; |
| 3044 | padding: 12px 0; |
| 3045 | color: rgba(0,0,0,0.5); |
| 3046 | -webkit-transition: all 0.3s ease-in-out; |
| 3047 | -moz-transition: all 0.3s ease-in-out; |
| 3048 | transition: all 0.3s ease-in-out; |
| 3049 | } |
| 3050 | |
| 3051 | #titlediv #title-prompt-text { |
| 3052 | top: 0; |
3041 | 3053 | } |
3042 | 3054 | |
3043 | 3055 | #wp-fullscreen-save .fs-saved { |
… |
… |
ul.cat-checklist { |
3046 | 3058 | margin-top: 4px; |
3047 | 3059 | } |
3048 | 3060 | |
3049 | | #wp-fullscreen-title-prompt-text { |
3050 | | padding: 11px; |
| 3061 | #wp-fullscreen-title-prompt-text {} |
| 3062 | |
| 3063 | #titlediv #title-prompt-text.active, |
| 3064 | #wp-fullscreen-title-prompt-text.active { |
| 3065 | width: 160px; |
| 3066 | color: #efefef; |
| 3067 | color: rgba(0,0,0,0.2); |
| 3068 | } |
| 3069 | |
| 3070 | #titlediv #title-prompt-text.off, |
| 3071 | #wp-fullscreen-title-prompt-text.off { |
| 3072 | opacity: 0; |
3051 | 3073 | } |
3052 | 3074 | |
3053 | 3075 | #poststuff .inside-submitbox, |
diff --git wp-admin/edit-form-advanced.php wp-admin/edit-form-advanced.php
index e656dd5..36cc982 100644
|
|
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); |
361 | 361 | <?php if ( post_type_supports($post_type, 'title') ) { ?> |
362 | 362 | <div id="titlediv"> |
363 | 363 | <div id="titlewrap"> |
364 | | <label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label> |
| 364 | <label id="title-prompt-text" for="title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label> |
365 | 365 | <input type="text" name="post_title" size="30" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" /> |
366 | 366 | </div> |
367 | 367 | <div class="inside"> |
diff --git wp-admin/js/post.js wp-admin/js/post.js
index 7b7d4c3..3b36a13 100644
|
|
jQuery(document).ready( function($) { |
770 | 770 | } |
771 | 771 | |
772 | 772 | wptitlehint = function(id) { |
773 | | id = id || 'title'; |
| 773 | // Hide the label if the title has a value |
| 774 | if ( $( '#title, #wp-fullscreen-title' ).val() != '' ) |
| 775 | $( '#title-prompt, #wp-fullscreen-title-prompt-text' ).hide(); |
774 | 776 | |
775 | | var title = $('#' + id), titleprompt = $('#' + id + '-prompt-text'); |
776 | | |
777 | | if ( title.val() == '' ) |
778 | | titleprompt.removeClass('screen-reader-text'); |
779 | | |
780 | | titleprompt.click(function(){ |
781 | | $(this).addClass('screen-reader-text'); |
782 | | title.focus(); |
| 777 | $( '#title, #wp-fullscreen-title' ).keypress( function () { |
| 778 | $( '#title-prompt-text, #wp-fullscreen-title-prompt-text' ).addClass( 'active' ); |
783 | 779 | }); |
784 | 780 | |
785 | | title.blur(function(){ |
786 | | if ( this.value == '' ) |
787 | | titleprompt.removeClass('screen-reader-text'); |
788 | | }).focus(function(){ |
789 | | titleprompt.addClass('screen-reader-text'); |
790 | | }).keydown(function(e){ |
791 | | titleprompt.addClass('screen-reader-text'); |
792 | | $(this).unbind(e); |
| 781 | // Check the text typed and react occordingly |
| 782 | $( '#title, #wp-fullscreen-title' ).change( function () { |
| 783 | if ( $( this ).val() == '' ) { |
| 784 | $( '#title-prompt-text, #wp-fullscreen-title-prompt-text' ).removeClass( 'off' ).removeClass( 'active' ); |
| 785 | } else { |
| 786 | $( '#title-prompt-text, #wp-fullscreen-title-prompt-text' ).addClass( 'off' ); |
| 787 | } |
793 | 788 | }); |
794 | 789 | } |
795 | 790 | |