Fix JSHint errors in the old XML-based ajax response JS.
props OriginalEXE. fixes #25954. git-svn-id: https://develop.svn.wordpress.org/trunk@26159 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
efe54a3ac6
commit
c0207f3bfb
@ -24,7 +24,7 @@ var wpAjax = jQuery.extend( {
|
||||
response.supplemental = {};
|
||||
if ( !jQuery( 'supplemental', child ).children().each( function() {
|
||||
response.supplemental[this.nodeName] = jQuery(this).text();
|
||||
} ).size() ) { response.supplemental = false }
|
||||
} ).size() ) { response.supplemental = false; }
|
||||
response.errors = [];
|
||||
if ( !jQuery('wp_error', child).each( function() {
|
||||
var code = jQuery(this).attr('code'), anError, errorData, formField;
|
||||
@ -54,7 +54,7 @@ var wpAjax = jQuery.extend( {
|
||||
},
|
||||
validateForm: function( selector ) {
|
||||
selector = jQuery( selector );
|
||||
return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() == ''; } ) ).size();
|
||||
return !wpAjax.invalidateForm( selector.find('.form-required').filter( function() { return jQuery('input:visible', this).val() === ''; } ) ).size();
|
||||
}
|
||||
}, wpAjax || { noPerm: 'You do not have permission to do that.', broken: 'An unidentified error has occurred.' } );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user