forked from LiveCarta/LiveCartaWP
Changed source root directory
This commit is contained in:
4
html/wp-content/plugins/post-smtp/assets/js/dataTable.min.js
vendored
Normal file
4
html/wp-content/plugins/post-smtp/assets/js/dataTable.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
105
html/wp-content/plugins/post-smtp/assets/js/postman-admin.js
Normal file
105
html/wp-content/plugins/post-smtp/assets/js/postman-admin.js
Normal file
@@ -0,0 +1,105 @@
|
||||
jQuery( document ).ready( function() {
|
||||
|
||||
/**
|
||||
* Wizard And Settings Notification Hide & Seek :D
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @version 1.0.0
|
||||
*/
|
||||
jQuery( '.input_notification_service' ).change(function() {
|
||||
|
||||
var selected = jQuery( this ).val();
|
||||
|
||||
if ( selected == 'default' ) {
|
||||
|
||||
jQuery('#slack_cred').slideUp( 'fast' );
|
||||
jQuery('#pushover_cred').slideUp( 'fast' );
|
||||
jQuery('#webhook_alert_urls').slideUp( 'fast' );
|
||||
jQuery('#email_notify').slideDown();
|
||||
|
||||
}
|
||||
|
||||
if ( selected == 'pushover' ) {
|
||||
|
||||
jQuery('#slack_cred').slideUp( 'fast' );
|
||||
jQuery('#email_notify').slideUp( 'fast' );
|
||||
jQuery('#webhook_alert_urls').slideUp( 'fast' );
|
||||
jQuery('#pushover_cred').slideDown();
|
||||
|
||||
}
|
||||
|
||||
if ( selected == 'slack' ) {
|
||||
|
||||
jQuery('#email_notify').slideUp( 'fast' );
|
||||
jQuery('#pushover_cred').slideUp( 'fast' );
|
||||
jQuery('#webhook_alert_urls').slideUp( 'fast' );
|
||||
jQuery('#slack_cred').slideDown();
|
||||
|
||||
}
|
||||
|
||||
if ( selected == 'webhook_alerts' ) {
|
||||
|
||||
jQuery('#email_notify').slideUp( 'fast' );
|
||||
jQuery('#pushover_cred').slideUp( 'fast' );
|
||||
jQuery('#slack_cred').slideUp( 'fast' );
|
||||
jQuery('#webhook_alert_urls').slideDown();
|
||||
|
||||
}
|
||||
|
||||
if ( selected == 'none' ) {
|
||||
|
||||
jQuery('#email_notify').slideUp( 'fast' );
|
||||
jQuery('#slack_cred').slideUp( 'fast' );
|
||||
jQuery('#pushover_cred').slideUp( 'fast' );
|
||||
jQuery('#webhook_alert_urls').slideDown();
|
||||
|
||||
}
|
||||
|
||||
Hook.call( 'post_smtp_notification_change', selected );
|
||||
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Webhook Alerts
|
||||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
jQuery( document ).on( 'click', '.post-smtp-add-webhook-url', function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
var webhookElement = jQuery( '.post-smtp-webhook-urls' ).find( '.post-smtp-webhook-url-container' ).first().clone();
|
||||
webhookElement.find( 'input' ).val( '' );
|
||||
jQuery( webhookElement ).find( 'input' ).after( '<span class="post-smtp-remove-webhook-url dashicons dashicons-trash"></span>' );
|
||||
|
||||
jQuery( '.post-smtp-webhook-urls' ).find( '.post-smtp-webhook-url-container' ).last().after( webhookElement );
|
||||
|
||||
});
|
||||
|
||||
jQuery( document ).on( 'click', '.post-smtp-remove-webhook-url', function() {
|
||||
jQuery( this ).closest( '.post-smtp-webhook-url-container' ).remove();
|
||||
} );
|
||||
|
||||
jQuery( '.postman_sent_mail-count' ).closest( 'li' ).css( 'display', 'none' );
|
||||
|
||||
//Discard less secure notification
|
||||
jQuery( document ).on( 'click', '#discard-less-secure-notification', function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
jQuery.ajax( {
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'ps-discard-less-secure-notification',
|
||||
_wp_nonce: postmanPro.lessSecureNotice
|
||||
},
|
||||
success: function(data) {
|
||||
jQuery( '.ps-less-secure-notice .notice-dismiss' ).click();
|
||||
}
|
||||
} )
|
||||
|
||||
jQuery( '.ps-less-secure-notice .notice-dismiss' ).click();
|
||||
} )
|
||||
|
||||
|
||||
} );
|
||||
@@ -0,0 +1,47 @@
|
||||
jQuery( document ).ready( function() {
|
||||
|
||||
jQuery.fn.suggestPro = function() {
|
||||
|
||||
jQuery( postmanPro ).each( function( index, value ){
|
||||
|
||||
var allRows = jQuery( '.ps-socket-wizad-row' );
|
||||
var totalRows = allRows.length - 1;
|
||||
var lastRow = jQuery( allRows[totalRows] );
|
||||
var lastRowLength = lastRow.find( 'label' );
|
||||
|
||||
//Write in existing row
|
||||
if( lastRowLength.length < 3 ) {
|
||||
jQuery( lastRow ).append(
|
||||
`<a href="${value.url}" style="box-shadow: none;" target="_blank">
|
||||
<label style="text-align:center">
|
||||
<div class="ps-single-socket-outer ps-sib">
|
||||
<img src="${value.pro}" class="ps-sib-recommended">
|
||||
<img src="${value.logo}" class="ps-wizard-socket-logo" width="165px">
|
||||
</div>
|
||||
<img draggable="false" role="img" class="emoji" alt="🔒" src="https://s.w.org/images/core/emoji/14.0.0/svg/1f512.svg">${value.extenstion}
|
||||
</label>
|
||||
</a>`
|
||||
);
|
||||
}
|
||||
//New row
|
||||
else {
|
||||
jQuery( lastRow ).after(
|
||||
`<div class='ps-socket-wizad-row'>
|
||||
<a href="${value.url}" style="box-shadow: none;" target="_blank">
|
||||
<label style="text-align:center">
|
||||
<div class="ps-single-socket-outer ps-sib">
|
||||
<img src="${value.pro}" class="ps-sib-recommended">
|
||||
<img src="${value.logo}" class="ps-wizard-socket-logo" width="165px">
|
||||
</div>
|
||||
<img draggable="false" role="img" class="emoji" alt="🔒" src="https://s.w.org/images/core/emoji/14.0.0/svg/1f512.svg">${value.extenstion}
|
||||
</label>
|
||||
</a>
|
||||
</div>`
|
||||
);
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
} )
|
||||
Reference in New Issue
Block a user