Ticket #17133: keystroke_save.patch
| File keystroke_save.patch, 2.0 KB (added by , 14 years ago) |
|---|
-
wp-admin/theme-editor.php
241 241 <?php endif; ?> 242 242 <?php 243 243 if ( is_writeable( $file ) ) : 244 submit_button( __( 'Update File' ), 'primary', ' submit', true, array( 'tabindex' => '2' ) );244 submit_button( __( 'Update File' ), 'primary', 'form_submit', true, array( 'tabindex' => '2' ) ); 245 245 else : ?> 246 246 <p><em><?php _e('You need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.'); ?></em></p> 247 247 <?php endif; ?> … … 260 260 $('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); }); 261 261 $('#newcontent').scrollTop( $('#scrollto').val() ); 262 262 }); 263 jQuery(document).keydown(function(event){ 264 if (event.metaKey && event.which == 83){ 265 event.preventDefault(); 266 jQuery("form#template").submit() 267 }; 268 }); 263 269 /* ]]> */ 264 270 </script> 265 271 <?php -
wp-admin/plugin-editor.php
238 238 echo "<input type='hidden' name='phperror' value='1' />"; 239 239 submit_button( __( 'Update File and Attempt to Reactivate' ), 'primary', 'submit', false, array( 'tabindex' => '2' ) ); 240 240 } else { 241 submit_button( __( 'Update File' ), 'primary', ' submit', false, array( 'tabindex' => '2' ) );241 submit_button( __( 'Update File' ), 'primary', 'form_submit', false, array( 'tabindex' => '2' ) ); 242 242 } 243 243 ?> 244 244 </p> … … 254 254 $('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); }); 255 255 $('#newcontent').scrollTop( $('#scrollto').val() ); 256 256 }); 257 jQuery(document).keydown(function(event){ 258 if (event.metaKey && event.which == 83){ 259 event.preventDefault(); 260 jQuery("form#template").submit() 261 }; 262 }); 257 263 /* ]]> */ 258 264 </script> 259 265 <?php