Ticket #21754: 21754.2.patch
File 21754.2.patch, 7.3 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/dashboard.php
503 503 ?> 504 504 505 505 <form name="post" action="<?php echo esc_url( admin_url( 'post.php' ) ); ?>" method="post" id="quick-press"> 506 < h4 id="quick-post-title"><label for="title"><?php _e('Title') ?></label></h4>507 <div class="input-text-wrap">506 <div class="input-text-wrap" id="title-wrap"> 507 <label class="screen-reader-text prompt" for="title" id="title-prompt-text"><?php _e( 'Enter title here' ); ?></label> 508 508 <input type="text" name="post_title" id="title" autocomplete="off" value="<?php echo esc_attr( $post->post_title ); ?>" /> 509 509 </div> 510 510 … … 514 514 </div> 515 515 <?php endif; ?> 516 516 517 <h4 id="content-label"><label for="content"><?php _e('Content') ?></label></h4>518 517 <div class="textarea-wrap"> 518 <label class="screen-reader-text" for="content"><?php _e( 'Content' ); ?></label> 519 519 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15"><?php echo esc_textarea( $post->post_content ); ?></textarea> 520 520 </div> 521 521 522 522 <script type="text/javascript">edCanvas = document.getElementById('content');edInsertContent = null;</script> 523 523 524 < h4><label for="tags-input"><?php _e('Tags') ?></label></h4>525 <div class="input-text-wrap">524 <div class="input-text-wrap" id="tags-input-wrap"> 525 <label class="screen-reader-text prompt" for="tags-input" id="tags-input-prompt-text"><?php _e( 'Tags (separate with commas)' ); ?></label> 526 526 <input type="text" name="tags_input" id="tags-input" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /> 527 527 </div> 528 528 -
wp-admin/js/dashboard.js
1 var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad ;1 var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad, quickPressHint; 2 2 3 3 jQuery(document).ready( function($) { 4 4 /* Dashboard Welcome Panel */ … … 63 63 postboxes.add_postbox_toggles(pagenow, { pbshow: ajaxPopulateWidgets } ); 64 64 65 65 /* QuickPress */ 66 quickPressHint = function(id) { 67 id = id || 'title'; 68 69 var input = $('#' + id), prompt = $('#' + id + '-prompt-text'); 70 71 if ( input.val() == '' ) 72 prompt.removeClass('screen-reader-text'); 73 74 prompt.click(function(){ 75 $(this).addClass('screen-reader-text'); 76 input.focus(); 77 }); 78 79 input.blur(function(){ 80 if ( this.value == '' ) 81 prompt.removeClass('screen-reader-text'); 82 }).focus(function(){ 83 prompt.addClass('screen-reader-text'); 84 }).keydown(function(e){ 85 prompt.addClass('screen-reader-text'); 86 $(this).unbind(e); 87 }); 88 } 89 66 90 quickPressLoad = function() { 67 91 var act = $('#quickpost-action'), t; 68 92 t = $('#quick-press').submit( function() { … … 87 111 88 112 $('#publish').click( function() { act.val( 'post-quickpress-publish' ); } ); 89 113 114 quickPressHint(); 115 quickPressHint('tags-input'); 116 90 117 }; 91 118 quickPressLoad(); 92 119 -
wp-admin/css/wp-admin.css
2805 2805 position: relative; 2806 2806 margin-bottom: 20px; 2807 2807 } 2808 #titlediv label { cursor: text; }2809 2808 2809 #titlediv label { 2810 cursor: text; 2811 } 2812 2810 2813 #titlediv div.inside { 2811 2814 margin: 0; 2812 2815 } … … 6018 6021 } 6019 6022 6020 6023 /* QuickPress */ 6021 #dashboard_quick_press h4 { 6022 font-family: sans-serif; 6023 float: left; 6024 width: 5em; 6025 clear: both; 6026 font-weight: normal; 6027 text-align: right; 6028 font-size: 12px; 6024 #dashboard_quick_press .input-text-wrap { 6025 position: relative; 6029 6026 } 6030 6027 6031 #dashboard_quick_press h4 label { 6032 margin-right: 10px; 6028 #dashboard_quick_press .prompt { 6029 color: #bbb; 6030 position: absolute; 6033 6031 } 6034 6032 6033 #title-wrap label, 6034 #tags-input-wrap label { 6035 cursor: text; 6036 } 6037 6038 #title-wrap #title { 6039 padding: 2px 6px; 6040 font-size: 1.3em; 6041 line-height: 100%; 6042 outline: none; 6043 } 6044 6045 #tags-input-wrap #tags-input { 6046 outline: none; 6047 } 6048 6049 #title-wrap #title-prompt-text { 6050 font-size: 1.3em; 6051 padding: 5px 8px; 6052 } 6053 6054 #tags-input-wrap #tags-input-prompt-text { 6055 font-size: 1em; 6056 padding: 4px 8px; 6057 } 6058 6035 6059 #dashboard_quick_press .input-text-wrap, 6036 6060 #dashboard_quick_press .textarea-wrap { 6037 margin: 0 0 1em 5em;6061 margin: 0 0 1em 0; 6038 6062 } 6039 6063 6040 6064 #dashboard_quick_press .wp-media-buttons { 6041 margin: 0 0 . 5em 5em;6065 margin: 0 0 .2em 8px; 6042 6066 padding: 0; 6043 6067 } 6044 6068 … … 6046 6070 color: #777; 6047 6071 } 6048 6072 6049 #dashboard-widgets #dashboard_quick_press form p.submit {6050 margin-left: 4.6em;6051 }6052 6053 6073 #dashboard-widgets #dashboard_quick_press form p.submit input { 6054 6074 float: left; 6055 6075 } 6056 6076 6057 6077 #dashboard-widgets #dashboard_quick_press form p.submit #save-post { 6058 margin: 0 1em 0 10px;6078 margin: 0 1em 0 0; 6059 6079 } 6060 6080 6061 6081 #dashboard-widgets #dashboard_quick_press form p.submit #publish { … … 8079 8099 .locale-zh-cn #sort-buttons { font-size: 1em !important; } 8080 8100 8081 8101 /* ru_RU: Text needs more room to breathe. */ 8082 .locale-ru-ru #dashboard_quick_press .input-text-wrap,8083 .locale-ru-ru #dashboard_quick_press .textarea-wrap,8084 .locale-ru-ru #dashboard_quick_press .wp-media-buttons {8085 margin-left: 5.7em; /* default 5em + 0.7em */8086 }8087 .locale-ru-ru #dashboard_quick_press h4 {8088 width: 5.7em; /* default 5.5em + 0.2em */8089 }8090 .locale-ru-ru #dashboard-widgets #dashboard_quick_press form p.submit {8091 margin-left: 5.3em; /* default 4.6em + 0.7em */8092 }8093 8102 .locale-ru-ru .inline-edit-row fieldset label span.title { 8094 8103 width: auto; /* default 5em */ 8095 8104 min-width: 5em; … … 8104 8113 width: 245px; /* default 200px + 45px */ 8105 8114 } 8106 8115 8107 /* lt_LT: QuickPress + QuickEdit */ 8108 .locale-lt-lt #dashboard_quick_press .input-text-wrap, 8109 .locale-lt-lt #dashboard_quick_press .textarea-wrap, 8110 .locale-lt-lt #dashboard_quick_press .wp-media-buttons { 8111 margin-left: 7em; 8112 } 8113 .locale-lt-lt #dashboard_quick_press h4 { 8114 width: 7em; 8115 } 8116 /* lt_LT: QuickEdit */ 8116 8117 .locale-lt-lt .inline-edit-row fieldset label span.title { 8117 8118 width: 8em; 8118 8119 } -
wp-admin/css/ie-rtl.css
78 78 padding-left: 1px; 79 79 } 80 80 81 #dashboard_quick_press h4 {82 text-align: right;83 }84 85 81 .tagchecklist span a { 86 82 margin: 4px -9px 0 0; 87 83 } -
wp-admin/css/wp-admin-rtl.css
1850 1850 } 1851 1851 1852 1852 /* QuickPress */ 1853 #dashboard_quick_press h4 {1854 float: right;1855 text-align: left;1856 }1857 1858 #dashboard_quick_press .wp-media-buttons {1859 margin: 0 5em 0.5em 0;1860 }1861 1862 #dashboard_quick_press h4 label {1863 margin-right: 0;1864 margin-left: 10px;1865 }1866 1867 #dashboard_quick_press .input-text-wrap,1868 #dashboard_quick_press .textarea-wrap {1869 margin: 0 5em 1em 0;1870 }1871 1872 #dashboard_quick_press #media-buttons {1873 margin: 0 5em .5em 0;1874 padding: 0;1875 }1876 1877 #dashboard-widgets #dashboard_quick_press form p.submit {1878 margin-left: 0;1879 margin-right: 4.6em;1880 }1881 1882 1853 #dashboard-widgets #dashboard_quick_press form p.submit input { 1883 1854 float: right; 1884 1855 } 1885 1856 1886 1857 #dashboard-widgets #dashboard_quick_press form p.submit #save-post { 1887 margin: 0 10px0 1em;1858 margin: 0 0 0 1em; 1888 1859 } 1889 1860 1890 1861 #dashboard-widgets #dashboard_quick_press form p.submit #publish {