first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,605 @@
.admin_page_postman-configuration_wizard {
-ms-overflow-style: none; /* Internet Explorer 10+ */
scrollbar-width: none; /* Firefox */
}
.admin_page_postman-configuration_wizard::-webkit-scrollbar {
display: none; /* Safari and Chrome */
}
.ps-logo {
text-align: center;
margin: 50px 0;
}
.ps-wizard-outer {
border: 2px solid #375caf;
border-radius: 7px;
width: 875px;
margin: 0 auto;
}
.ps-wizard-nav {
width: 32%;
float: left;
}
.ps-wizard-pages {
width: 67%;
float: right;
}
.ps-wizard-section {
margin: 25px 0;
}
.ps-wizard-footer {
background: #f1f1f1;
padding: 17px 0;
}
.ps-wizard-nav {
border-right: 1px solid #d9d9d9;
}
.ps-wizard-section .ps-wizard-nav {
height: 484px;
}
.smtp-outer .ps-wizard-section .ps-wizard-nav {
height: 978px;
}
.gmail_api-outer .ps-wizard-section .ps-wizard-nav {
height: 1087px;
}
.mandrill_api-outer .ps-wizard-section .ps-wizard-nav {
height: 676px;
}
.sendgrid_api-outer .ps-wizard-section .ps-wizard-nav {
height: 676px;
}
.mailgun_api-outer .ps-wizard-section .ps-wizard-nav {
height: 904px;
}
.sendinblue_api-outer .ps-wizard-section .ps-wizard-nav {
height: 724px;
}
.postmark_api-outer .ps-wizard-section .ps-wizard-nav {
height: 676px;
}
.sparkpost_api-outer .ps-wizard-section .ps-wizard-nav {
height: 676px;
}
.elasticemail_api-outer .ps-wizard-section .ps-wizard-nav {
height: 676px;
}
.office365_api-outer .ps-wizard-section .ps-wizard-nav {
height: 978px;
}
.zohomail_api-outer .ps-wizard-section .ps-wizard-nav {
height: 1087px;
}
.aws_ses_api-outer .ps-wizard-section .ps-wizard-nav {
height: 887px;
}
.mailjet_api-outer .ps-wizard-section .ps-wizard-nav {
height: 778px;
}
.ps-wizard-footer .ps-wizard-nav {
border-right: none;
}
.ps-wizard-nav table,
.ps-wizard-footer table {
padding: 0 25px;
}
.ps-wizard-edit span {
color: #375caf;
font-size: 25px;
}
.ps-wizard-nav table td,
.ps-wizard-footer table td {
padding: 12px 6px;
vertical-align: middle;
}
.ps-wizard-circle {
text-align: center;
}
.ps-active-nav .ps-wizard-circle span.ps-tick:before {
background-color: #375caf;
}
.ps-in-active-nav .ps-wizard-circle span.ps-tick:before {
background-color: #d9d9d9;
}
.ps-active-nav .ps-wizard-circle span.ps-tick:before,
.ps-in-active-nav .ps-wizard-circle span.ps-tick:before
{
content: '';
height: 35px;
width: 35px;
border-radius: 40px;
display: inline-block;
vertical-align: top;
line-height: 1;
margin: 4.4px 4.6px;
}
.ps-active-nav .ps-wizard-circle span.ps-tick,
.ps-in-active-nav .ps-wizard-circle span.ps-tick
{
display: inline-table;
width: 48px;
height: 48px;
}
.ps-wizard-circle span.ps-tick {
font-size: 44px;
display: inline-table;
color: #375caf;
}
.ps-wizard-text {
font-weight: 600;
}
.ps-wizard-footer-left {
width: 32%;
float: left;
}
.ps-wizard-footer-right {
float: right;
width: 67%;
}
.ps-in-active-nav .ps-wizard-edit,
.ps-active-nav .ps-wizard-edit,
.ps-wizard-footer .ps-in-active-nav .ps-wizard-text {
display: none;
}
.ps-tick {
position: relative;
z-index: 8;
}
.ps-in-active-nav .ps-wizard-line:after,
.ps-active-nav .ps-wizard-line:after {
content: '';
position: absolute;
width: 3px;
height: 39px;
left: 23px;
bottom: 41px;
z-index: -3;
}
.ps-in-active-nav .ps-wizard-line:after {
background: #d9d9d9;
}
.ps-active-nav .ps-wizard-line:after,
.ps-wizard-line:after {
background: #375caf;
}
.ps-wizard-footer .ps-active-nav .ps-wizard-line:after {
height: 342px;
}
.ps-wizard-screens-container {
padding: 0 25px;
}
.ps-wizard-step {
display: none;
}
.ps-wizard-pages p {
font-weight: 600;
font-size: 12px;
}
.ps-wizard-pages a {
color: #000;
}
.smtp-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 837px;
}
.gmail_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 946px;
}
.mandrill_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 535px;
}
.sendgrid_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 535px;
}
.mailgun_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 763px;
}
.sendinblue_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 583px;
}
.postmark_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 535px;
}
.sparkpost_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 535px;
}
.elasticemail_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 535px;
}
.office365_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 837px;
}
.zohomail_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 946px;;
}
.aws_ses_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 746px;;
}
.mailjet_api-outer .ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 638px;;
}
.ps-wizard-footer-left .ps-in-active-nav .ps-wizard-line:after {
height: 343px;
}
.ps-wizard-sockets {
display: flex;
margin: 15px 0 15px 0;
}
.ps-wizard-socket-radio label {
margin: 0;
overflow: hidden;
position: relative;
}
.ps-wizard-socket-radio img {
width: 31px;
cursor: pointer;
transition: transform 1s;
object-fit: cover;
padding: 8px 20px 3px 20px;
}
.ps-wizard-socket-tick-container {
transition: .5s ease;
opacity: 0;
position: absolute;
top: 29%;
left: 29%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
cursor: pointer;
}
.ps-wizard-socket-check:checked + label > .ps-wizard-socket-tick-container {
opacity: 1;
}
.ps-wizard-socket-radio {
border: 2px solid #000;
width: 100px;
height: 66px;
margin-right: 15px;
}
.ps-wizard-socket-radio input {
display: none!important;
}
.ps-wizard-socket-radio label {
margin: 0!important;
display: inline-block;
}
.ps-wizard-socket-tick span {
font-size: 15px;
background-color: #4caf50;
color: #fff;
border-radius: 100%;
height: 15px;
width: 15px;
border: 2px solid #fff;
}
.ps-wizard-socket-radio-outer {
text-align: center;
}
.ps-wizard-sockets h4 {
margin: 0;
}
.ps-wizard-socket-radio:has(.ps-wizard-socket-check:checked) {
border: 2px solid #4db556;
}
.button-primary.ps-blue-btn {
border: #485b87;
background: #375caf;
border-radius: 0px;
line-height: 40px;
width: 184px;
}
.button-primary.ps-blue-btn.focus,
.button-primary.ps-blue-btn.hover,
.button-primary.ps-blue-btn:focus,
.button-primary.ps-blue-btn:hover {
background: #4c6fbd;
border-color: #4c6fbd;
}
.button-primary.ps-yellow-btn {
border: #ff9900;
background: #ff9900;
border-radius: 0px;
line-height: 40px;
width: 170px;
color: #000!important;
}
.button-primary.ps-yellow-btn.focus,
.button-primary.ps-yellow-btn.hover,
.button-primary.ps-yellow-btn:focus,
.button-primary.ps-yellow-btn:hover {
background: #ffac31;
border-color: #000000;
}
.button-primary.ps-blue-btn .dashicons,
.button-primary.ps-yellow-btn .dashicons {
vertical-align: middle;
font-size: 16px;
}
.button-primary {
text-align: center;
}
.ps-wizard-footer-right button {
float: right;
}
.ps-wizard-footer-right .ps-wizard-step-1,
.ps-wizard-footer-right .ps-wizard-step-2,
.ps-wizard-footer-right .ps-wizard-step-3,
.ps-wizard-footer-right .ps-wizard-step-4 {
padding: 15px 10px;
}
.ps-wizard-error {
color: red;
}
.ps-wizard-success {
color: green;
}
.ps-wizard-error,
.ps-wizard-success {
display: inline-block;
font-weight: 600;;
}
.ps-wizard-pages {
min-height: 351px;
}
.ps-wizard-edit .dashicons-edit {
cursor: pointer;
}
.ps-wizard-socket {
display: none;
}
.ps-wizard-back {
font-size: 12px;
text-decoration: none;
color: #375caf!important;
}
.ps-wizard-back span {
font-size: 13px;
vertical-align: sub;
}
.ps-wizard-socket h3 {
margin: 5px 0;
}
.ps-form-ui label {
font-weight: 600;
}
.ps-form-ui input[type="text"],
.ps-form-ui select {
width: 100%!important;
max-width: 100%!important;
height: 37px;
margin-top: 5px;
border: 1px solid #000;
border-radius: 0;
}
.ps-form-control {
margin-bottom: 25px;
}
.ps-form-control-info {
color: #979797;
font-size: 10px;
}
.ps-wizard-socket {
line-height: 22px;
}
.ps-form-switch-control {
display: inline-block;
}
.ps-form-switch-control .ps-switch-1 input:checked + .slider {
background-color: #375caf;
}
.ps-wizard-congrates {
float: left;
}
.ps-wizard-view-logs {
float: right;
}
.ps-wizard-pages .ps-wizard-step-4 a {
color: #375caf;
}
.ps-wizard-card {
background: whitesmoke;
padding: 8px 15px;
}
.ps-wizard-card p {
margin-bottom: 30px;
}
.ps-wizard-page-footer {
width: 875px;
text-align: center;
margin: 45px auto;
}
.ps-wizard-page-footer a {
margin: 0 25px;
color: #949494;
}
.ps-wizard-footer .ps-active-nav .ps-wizard-circle span.ps-tick:before {
content: "\f12a";
background-color: transparent;
margin: 0;
height: auto;
width: auto;
}
.ps-pro-extension-outer {
position: relative;
}
.ps-pro-extension-tag {
position: absolute;
left: 0;
top: 0;
background: #FF9900;
color: #ffffff;
}
.ps-pro-extension-tag {
position: absolute;
left: 1px;
top: 1px;
background: #FF9900;
color: #ffffff;
font-size: 11px;
font-weight: bold;
font-family: sans-serif;
padding: 0px 3px;
}
.ps-pro-popup-overlay {
display: none;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #bfbfbfa1;
z-index: 9990;
}
.ps-pro-popup-container {
position: relative;
width: 100%;
height: 100%;
}
.ps-pro-popup-outer {
position: absolute;
width: 500px;
height: 360px;
border-top: 3px solid #375caf;
background: #fff;
margin: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
span.ps-pro-close-popup {
position: absolute;
right: 27px;
top: 0;
color: #fff;
background: #bababa;
}
.ps-pro-popup-body {
position: relative;
cursor: pointer;
line-height: 30px;
}
.ps-pro-popup-content {
width: 60%;
text-align: center;
font-weight: bolder;
margin: 30px auto;
}
.ps-pro-popup-content p {
font-size: 11px;
color: #000;
margin: 25px 0;
}
/* Lets make wizard responsive */

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

View File

@@ -0,0 +1,513 @@
jQuery( document ).ready(function() {
jQuery( '.ps-wizard-socket-check:checked' ).siblings( '.ps-wizard-socket-tick-container' ).css( { 'opacity': 1 } );
jQuery( document ).on( 'click', '.ps-wizard-socket-radio label', function() {
jQuery( '.ps-wizard-socket-tick-container' ).css( { 'opacity': 0 } );
jQuery( this ).find( '.ps-wizard-socket-tick-container' ).css( { 'opacity': 1 } );
} )
/**
* Refresh the wizard to show the current step
*
* @return void
* @since 2.0.0
* @version 1.0.0
*/
const refreshWizard = function() {
var tableRow = jQuery( '.ps-wizard-nav table tr.ps-active-nav' );
var activeTab = jQuery( tableRow ).hasClass( 'ps-active-nav' );
if( activeTab ) {
var stepID = jQuery( tableRow ).find( '.dashicons-edit' ).data( 'step' );
jQuery( '.ps-wizard-step' ).hide();
jQuery( `.ps-wizard-step-${stepID}` ).fadeIn( 'slow' );
}
}
/**
* Validate the current step
*
* @param {int} stepID Current Step ID
* @return bool
* @since 2.0.0
* @version 1.0.0
*/
const validateStep = function( stepID ) {
//Validate step 1
if( stepID == 1 ) {
if( jQuery( '.ps-wizard-socket-check' ).is( ':checked' ) ) {
var selectedSocket = jQuery( '.ps-wizard-socket-check:checked' ).val();
var _element = jQuery( '.ps-wizard-outer' ).removeClass();
jQuery( _element ).addClass( 'ps-wizard-outer' );
jQuery( _element ).addClass( `${selectedSocket}-outer` );
//Remove Warning (if has), and contiue to next step
jQuery( '.ps-wizard-error' ).html( '' );
jQuery( '.ps-wizard-page-footer' ).fadeOut();
renderSocketSettings();
return true;
}
else {
jQuery( '.ps-wizard-error' ).html( `<span class="dashicons dashicons-warning"></span> ${PostSMTPWizard.Step1E1}` );
}
}
//Validate step 2
if( stepID == 2 ) {
var selectedSocket = jQuery( '.ps-wizard-socket-check:checked' ).val();
selectedSocket = jQuery( `.${selectedSocket}` ).find( 'input' );
var validated = false;
jQuery( selectedSocket ).each( function( index, element ) {
var attr = jQuery( element ).attr( 'required' );
if( typeof attr !== 'undefined' && attr !== false && jQuery( element ).val() == '' ) {
var error = jQuery( element ).data( 'error' );
jQuery( '.ps-wizard-error' ).html( `<span class="dashicons dashicons-warning"></span> ${error}` );
validated = false;
jQuery( element ).focus();
return false;
}
else {
//Validate From Name, From Email
jQuery( '.ps-name-email-settings' ).find( 'input' ).each( function( index, element ) {
var attr = jQuery( element ).attr( 'required' );
if( typeof attr !== 'undefined' && attr !== false && jQuery( element ).val() == '' ) {
var error = jQuery( element ).data( 'error' );
jQuery( '.ps-wizard-error' ).html( `<span class="dashicons dashicons-warning"></span> ${error}` );
validated = false;
jQuery( element ).focus();
return false;
}
else {
//remove error, since everything is good to go :).
jQuery( '.ps-wizard-error' ).html( '' );
validated = true;
}
} );
}
} );
//If everything is good to go, lets save settings.
if( validated === true ) {
var button = jQuery( '.ps-wizard-step-2' ).find( '.ps-wizard-next-btn' );
var buttonHTML = jQuery( button ).html();
jQuery( button ).html( 'Saving...' );
//Lets AJAX request.
jQuery.ajax( {
url: ajaxurl,
type: 'POST',
async: true,
data: {
action: 'ps-save-wizard',
FormData: jQuery( '#ps-wizard-form' ).serialize(),
},
success: function( response ) {
jQuery( '.ps-wizard-error' ).html( '' );
nextStep( stepID );
var _element = jQuery( '.ps-wizard-outer' ).removeClass();
jQuery( _element ).addClass( 'ps-wizard-outer' );
},
error: function( response ) {
jQuery( '.ps-wizard-error' ).html( `<span class="dashicons dashicons-warning"></span> ${PostSMTPWizard.Step2E3}` );
},
complete: function( response ) {
jQuery( button ).html( buttonHTML );
}
} );
}
}
//Validate step 3 | No validation required, we can skip this step.
if( stepID == 3 ) {
return true;
}
}
/**
* Switch to next step
*
* @param {int} stepID Current Step ID
* @return void
* @since 2.0.0
* @version 1.0.0
*/
const nextStep = function( stepID ) {
var nextStep = stepID + 1;
jQuery( `*[data-step="${stepID}"]` ).closest( 'tr' ).removeClass();
jQuery( `*[data-step="${nextStep}"]` ).closest( 'tr' ).removeClass();
jQuery( `*[data-step="${nextStep}"]` ).closest( 'tr' ).addClass( 'ps-active-nav' );
refreshWizard();
}
/**
* Switch to step
*
* @param {int} stepID Step ID to be switched to
* @return void
* @since 2.0.0
* @version 1.0.0
*/
const switchStep = function( stepID ) {
jQuery( '.ps-wizard-nav table tr.ps-active-nav' ).addClass( 'ps-in-active-nav' );
jQuery( '.ps-wizard-nav table tr.ps-active-nav' ).removeClass( 'ps-active-nav' );
jQuery( `*[data-step="${stepID}"]` ).closest( 'tr' ).addClass( 'ps-active-nav' );
jQuery( '.ps-wizard-success' ).html( '' );
jQuery( '.ps-wizard-error' ).html( '' );
refreshWizard();
}
/**
* Render Socket Settings
*
* @return void
* @since 2.0.0
* @version 1.0.0
*/
const renderSocketSettings = function() {
var selectedSocket = jQuery( '.ps-wizard-socket-check:checked' ).val();
jQuery( '.ps-wizard-socket' ).hide();
jQuery( `.${selectedSocket}` ).fadeIn( 'slow' );
}
/**
* Gets URL Parameter
*
* @return void
* @since 2.0.0
* @version 1.0.0
*/
const getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = window.location.search.substring(1),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
}
}
return false;
};
//Switch to next step
jQuery( document ).on( 'click', '.ps-wizard-next-btn', function( e ) {
e.preventDefault();
var stepID = jQuery( this ).data( 'step' );
if( validateStep( stepID ) === true ) {
nextStep( stepID );
}
} );
//Switch to step | Edit Step
jQuery( document ).on( 'click', '.ps-wizard-nav table tr td .dashicons-edit, .ps-wizard-back', function( e ) {
e.preventDefault();
var stepID = jQuery( this ).data( 'step' );
if( stepID == 1 ) {
jQuery( '.ps-wizard-page-footer' ).fadeIn( 'slow' );
}
if( stepID !== 2 ) {
var _element = jQuery( '.ps-wizard-outer' ).removeClass();
jQuery( _element ).addClass( 'ps-wizard-outer' );
}
if( stepID == 2 ) {
var selectedSocket = jQuery( '.ps-wizard-socket-check:checked' ).val();
var _element = jQuery( '.ps-wizard-outer' ).removeClass();
jQuery( _element ).addClass( 'ps-wizard-outer' );
jQuery( _element ).addClass( `${selectedSocket}-outer` );
}
switchStep( stepID );
} );
//Send test email
jQuery( document ).on( 'click', '.ps-wizard-send-test-email', function( e ) {
e.preventDefault();
var sendTo = jQuery( '.ps-test-to' ).val();
var security = jQuery( '#security' ).val();
if( sendTo == '' ) {
jQuery( '.ps-wizard-error' ).html( `<span class="dashicons dashicons-warning"></span> ${PostSMTPWizard.Step3E4}` );
return;
}
jQuery( '.ps-wizard-error' ).html('');
jQuery( '.ps-wizard-success' ).html( 'Sending...' );
jQuery.ajax( {
url: ajaxurl,
type: 'POST',
data: {
action: 'postman_send_test_email',
email: sendTo,
security: security,
},
success: function( response ) {
jQuery( '.ps-wizard-success' ).html( '' );
if( response.success === true ) {
jQuery( '.ps-wizard-success' ).html( `<span class="dashicons dashicons-yes"></span> ${response.data.message}` );
jQuery( '.ps-finish-wizard' ).html( `${PostSMTPWizard.finish} <span class="dashicons dashicons-arrow-right-alt">` );
}
if( response.success === false ) {
jQuery( '.ps-wizard-error' ).html( `<span class="dashicons dashicons-warning"></span> ${response.data.message}` );
}
}
} );
} );
//Connect to Office 365 | Auth
jQuery( document ).on( 'click', '#ps-wizard-connect-office365', function( e ) {
e.preventDefault();
var office365_app_id = jQuery( '.ps-office365-client-id' ).val();
var office365_app_password = jQuery( '.ps-office365-client-secret' ).val();
var _button = jQuery( this ).html();
if( office365_app_id == '' ) {
jQuery( '.ps-office365-client-id' ).focus();
return;
}
if( office365_app_password == '' ) {
jQuery( '.ps-office365-client-secret' ).focus();
return;
}
jQuery( this ).html( 'Redirecting...' );
var authURL = `https://login.microsoftonline.com/common/oauth2/v2.0/authorize?state=${PostSMTPWizard.office365State}&scope=openid profile offline_access Mail.Send Mail.Send.Shared&response_type=code&approval_prompt=auto&redirect_uri=${PostSMTPWizard.adminURL}&client_id=${office365_app_id}`;
jQuery.ajax( {
url: ajaxurl,
type: 'POST',
async: true,
data: {
action: 'ps-save-wizard',
FormData: jQuery( '#ps-wizard-form' ).serialize(),
},
success: function( response ) {
window.location.assign( authURL );
},
} );
} );
//Connect to Gmail API | Auth
jQuery( document ).on( 'click', '#ps-wizard-connect-gmail', function( e ) {
e.preventDefault();
var clientID = jQuery( '.ps-gmail-api-client-id' ).val();
var clientSecret = jQuery( '.ps-gmail-client-secret' ).val();
var redirectURI = jQuery( this ).attr( 'href' );
if( clientID == '' ) {
jQuery( '.ps-gmail-api-client-id' ).focus();
return;
}
if( clientSecret == '' ) {
jQuery( '.ps-gmail-client-secret' ).focus();
return;
}
jQuery( this ).html( 'Redirecting...' );
jQuery.ajax( {
url: ajaxurl,
type: 'POST',
async: true,
data: {
action: 'ps-save-wizard',
FormData: jQuery( '#ps-wizard-form' ).serialize(),
},
success: function( response ) {
window.location.assign( redirectURI );
},
} );
} );
//Connect to Zoho | Auth
jQuery( document ).on( 'click', '#ps-wizard-connect-zoho', function( e ) {
e.preventDefault();
var clientID = jQuery( '.ps-zoho-client-id' ).val();
var clientSecret = jQuery( '.ps-zoho-client-secret' ).val();
var redirectURI = jQuery( this ).attr( 'href' );
if( clientID == '' ) {
jQuery( '.ps-zoho-client-id' ).focus();
return;
}
if( clientSecret == '' ) {
jQuery( '.ps-zoho-client-secret' ).focus();
return;
}
jQuery( this ).html( 'Redirecting...' );
jQuery.ajax( {
url: ajaxurl,
type: 'POST',
async: true,
data: {
action: 'ps-save-wizard',
FormData: jQuery( '#ps-wizard-form' ).serialize(),
},
success: function( response ) {
window.location.assign( redirectURI );
},
} );
} );
refreshWizard();
if( getUrlParameter( 'socket' ) ) {
jQuery( document ).scrollTop( jQuery( document ).height() );
}
jQuery( document ).on( 'click', '.ps-pro-extension-outer', function(){
var placeholder = jQuery( this ).find( 'h4' ).text();
var imgSrc = jQuery( this ).find( 'img' ).attr( 'src' );
jQuery( '.ps-pro-for-img' ).attr( 'src', imgSrc );
jQuery( '.ps-pro-for' ).text( placeholder );
jQuery( '.ps-pro-popup-overlay' ).fadeIn();
} );
jQuery( document ).on( 'click', '.ps-pro-close-popup', function( e ){
e.preventDefault();
jQuery( '.ps-pro-popup-overlay' ).fadeOut();
} );
} );