Press Enter to save in Quick Edit, props aaron_guitar, fixes #8061

git-svn-id: http://svn.automattic.com/wordpress/trunk@9566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-11-08 06:54:42 +00:00
parent ce2413cb7f
commit c5af1c84e3
3 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,7 @@ inlineEditPost = {
$('a.cancel', qeRow).click(function() { return inlineEditPost.revert(); });
$('a.save', qeRow).click(function() { return inlineEditPost.save(this); });
$('input, select', qeRow).keydown(function(e) { if(e.which == 13) return inlineEditPost.save(this); });
$('a.cancel', bulkRow).click(function() { return inlineEditPost.revert(); });
$('a.save', bulkRow).click(function() { return inlineEditPost.saveBulk(); });

View File

@ -17,6 +17,7 @@ inlineEditTax = {
$('a.cancel', row).click(function() { return inlineEditTax.revert(); });
$('a.save', row).click(function() { return inlineEditTax.save(this); });
$('input, select', row).keydown(function(e) { if(e.which == 13) return inlineEditTax.save(this); });
// add events
// t.rows.dblclick(function() { inlineEditTax.toggle(this); });

View File

@ -263,12 +263,12 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' );
$scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081031' );
$scripts->add( 'inline-edit-post', '/wp-admin/js/inline-edit-post.js', array( 'jquery', 'jquery-form', 'suggest' ), '20081107' );
$scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
'error' => __('Error while saving the changes.')
) );
$scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081031' );
$scripts->add( 'inline-edit-tax', '/wp-admin/js/inline-edit-tax.js', array( 'jquery', 'jquery-form' ), '20081107' );
$scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
'error' => __('Error while saving the changes.')
) );