mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-04-21 10:33:44 +03:00
Fix lint issues
This commit is contained in:
parent
2a66f3f870
commit
3133f0896a
|
@ -25,7 +25,7 @@ jQuery( document ).ready( function( $ ) {
|
|||
return {
|
||||
top: bounds.y + offsetTop + bounds.height,
|
||||
left: bounds.x + offsetLeft + bounds.width - modalWidth,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,9 +34,8 @@ jQuery( document ).ready( function( $ ) {
|
|||
function openModal() {
|
||||
const position = getModalPosition();
|
||||
// Hide other content on this page while modal is open.
|
||||
for ( i = 0; i < children.length; i++ ) {
|
||||
for ( let i = 0; i < children.length; i++ ) {
|
||||
if ( children[ i ].hasAttribute( 'data-no-inert' ) ) {
|
||||
console.log( 'no inert' );
|
||||
continue;
|
||||
}
|
||||
if ( children[ i ].getAttribute( 'inert' ) ) {
|
||||
|
@ -58,7 +57,7 @@ jQuery( document ).ready( function( $ ) {
|
|||
*/
|
||||
function closeModal() {
|
||||
// Reveal content again.
|
||||
for ( i = 0; i < children.length; i++ ) {
|
||||
for ( let i = 0; i < children.length; i++ ) {
|
||||
if ( ! children[ i ].hasAttribute( 'data-keep-inert' ) ) {
|
||||
children[ i ].removeAttribute( 'inert' );
|
||||
}
|
||||
|
@ -89,10 +88,10 @@ jQuery( document ).ready( function( $ ) {
|
|||
data: {
|
||||
action: 'send-manage-email',
|
||||
pledge_id: FiveForTheFuture.pledgeId,
|
||||
email: email,
|
||||
email,
|
||||
_ajax_nonce: FiveForTheFuture.ajaxNonce,
|
||||
},
|
||||
success: function( response ) {
|
||||
success( response ) {
|
||||
if ( response.message ) {
|
||||
const $message = $( '<div>' )
|
||||
.addClass( 'notice notice-alt' )
|
||||
|
@ -131,6 +130,3 @@ jQuery( document ).ready( function( $ ) {
|
|||
|
||||
$( modal.querySelector( 'form' ) ).submit( sendRequest );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue