Prevent accidental multiple click when creating new categories. Props mdawaffe. fixes #17936

git-svn-id: http://svn.automattic.com/wordpress/trunk@20650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2012-04-30 20:50:50 +00:00
parent a19ca4686c
commit 93d9788068
1 changed files with 2 additions and 0 deletions

View File

@ -314,12 +314,14 @@ jQuery(document).ready( function($) {
if ( !$('#new'+taxonomy).val() )
return false;
s.data += '&' + $( ':checked', '#'+taxonomy+'checklist' ).serialize();
$( '#' + taxonomy + '-add-submit' ).prop( 'disabled', true );
return s;
};
catAddAfter = function( r, s ) {
var sup, drop = $('#new'+taxonomy+'_parent');
$( '#' + taxonomy + '-add-submit' ).prop( 'disabled', false );
if ( 'undefined' != s.parsed.responses[0] && (sup = s.parsed.responses[0].supplemental.newcat_parent) ) {
drop.before(sup);
drop.remove();