Changeset 21310
- Timestamp:
- 07/23/2012 11:46:27 PM (13 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/common.dev.js
r21305 r21310 322 322 // tab in textareas 323 323 $('#newcontent').bind('keydown.wpevent_InsertTab', function(e) { 324 if ( e.keyCode != 9 ) 325 return true; 326 327 var el = e.target, selStart = el.selectionStart, selEnd = el.selectionEnd, val = el.value, scroll, sel; 324 var el = e.target, selStart, selEnd, val, scroll, sel; 325 326 if ( e.keyCode == 27 ) { // escape key 327 $(el).data('tab-out', true); 328 return; 329 } 330 331 if ( e.keyCode != 9 || e.ctrlKey || e.altKey || e.shiftKey ) // tab key 332 return; 333 334 if ( $(el).data('tab-out') ) { 335 $(el).data('tab-out', false); 336 return; 337 } 338 339 selStart = el.selectionStart; 340 selEnd = el.selectionEnd; 341 val = el.value; 328 342 329 343 try { -
trunk/wp-admin/plugin-editor.php
r20525 r21310 227 227 <form name="template" id="template" action="plugin-editor.php" method="post"> 228 228 <?php wp_nonce_field('edit-plugin_' . $file) ?> 229 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> 229 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" aria-describedby="newcontent-description" tabindex="1"><?php echo $content ?></textarea> 230 <span id="newcontent-description" class="screen-reader-text"><?php _e('Content of the edited file. The Tab key enters a tab character, to move below this area, press the Esc key followed by the Tab key. Shift + Tab works as expected.'); ?></span> 230 231 <input type="hidden" name="action" value="update" /> 231 232 <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" /> … … 257 258 </div> 258 259 <script type="text/javascript"> 259 /* <![CDATA[ */260 260 jQuery(document).ready(function($){ 261 261 $('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); }); 262 262 $('#newcontent').scrollTop( $('#scrollto').val() ); 263 263 }); 264 /* ]]> */265 264 </script> 266 265 <?php -
trunk/wp-admin/theme-editor.php
r20844 r21310 199 199 <form name="template" id="template" action="theme-editor.php" method="post"> 200 200 <?php wp_nonce_field( 'edit-theme_' . $file . $stylesheet ); ?> 201 <div><textarea cols="70" rows="30" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> 202 <input type="hidden" name="action" value="update" /> 203 <input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" /> 204 <input type="hidden" name="theme" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" /> 205 <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" /> 206 </div> 201 <div><textarea cols="70" rows="30" name="newcontent" id="newcontent" aria-describedby="newcontent-description" tabindex="1"><?php echo $content ?></textarea> 202 <span id="newcontent-description" class="screen-reader-text"><?php _e('Content of the edited file. The Tab key enters a tab character, to move below this area, press the Esc key followed by the Tab key. Shift + Tab works as expected.'); ?></span> 203 <input type="hidden" name="action" value="update" /> 204 <input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" /> 205 <input type="hidden" name="theme" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" /> 206 <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" /> 207 </div> 207 208 <?php if ( ! empty( $functions ) ) : ?> 208 209 <div id="documentation" class="hide-if-no-js">
Note: See TracChangeset
for help on using the changeset viewer.