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

git-svn-id: https://develop.svn.wordpress.org/trunk@20650 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-04-30 20:50:50 +00:00
parent 82c5f5ed9b
commit 3ea234a24b
1 changed files with 2 additions and 0 deletions

View File

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