/* jshint browser: true */
/* global bp, bpZoomMeetingCommonVars */
/* @version 1.0.0 */
window.bp = window.bp || {};
( function( exports, $ ) {
/**
* [Zoom description]
*
* @type {Object}
*/
bp.Zoom_Common = {
/**
* [start description]
*
* @return {[type]} [description]
*/
start: function () {
this.setupGlobals();
// Listen to events ("Add hooks!").
this.addListeners();
},
/**
* [setupGlobals description]
*
* @return {[type]} [description]
*/
setupGlobals: function () {
this.account_email_xhr = null;
this.secret_token_xhr = null;
this.credential_xhr = null;
},
/**
* [addListeners description]
*/
addListeners: function () {
$( document ).on( 'change', '#bp-edit-group-zoom', this.toggleGroupSettings.bind( this ) );
$( document ).on( 'click', '.bp-step-nav li > a, .bp-step-actions > span', this.bpStepsNavigate.bind( this ) );
$( window ).on( 'keyup', this.zoomInstructionNavigate.bind( this ) );
if ( $( document ).find( '.bb-group-zoom-settings-container' ).length ) {
$( document ).on( 'click', 'form#group-settings-form button.bb-save-settings', this.zoomSettingsSave.bind( this ) );
}
if (typeof jQuery.fn.magnificPopup !== 'undefined') {
jQuery( '.show-zoom-instructions' ).magnificPopup(
{
type: 'inline',
midClick: true
}
);
}
// Block settings.
$( document ).on( 'click', '.bb-zoom-setting-tab .bb-zoom-setting-tabs a', this.switchedTab.bind( this ) );
// Group zoom settings.
$( document ).on( 'change', '#bb-group-zoom-s2s-account-id, #bb-group-zoom-s2s-client-id, #bb-group-zoom-s2s-client-secret', this.fetchZoomAccounts.bind( this ) );
$( document ).on( 'click', '.bb-pro-tabs-list li', this.switchedTab.bind( this ) );
// Admin group zoom settings.
$( document ).on( 'change', '#s2s-account-id, #s2s-client-id, #s2s-client-secret', this.fetchZoomAccounts.bind( this ) );
$( document ).on( 'change', '.postbox-container #bp-edit-group-zoom', this.toggleAdminGroupSettings.bind( this ) );
// Group wizard popup.
$( document ).on( 'change', '#bb-group-zoom-s2s-secret-token-popup', this.updateGroupSecretToken.bind( this ) );
$( document ).on( 'change', '#bb-group-zoom-s2s-account-id-popup, #bb-group-zoom-s2s-client-id-popup, #bb-group-zoom-s2s-client-secret-popup', this.fetchZoomAccounts.bind( this ) );
$( document ).on( 'click', '.bp-zoom-group-show-instructions .save-settings', this.submitGroupZoomWizard.bind( this ) );
$( document ).on( 'keyup change', '.zoom-group-instructions-cloned-input', this.copyInputData.bind( this ) );
$( document ).on( 'keyup change', '.zoom-group-instructions-main-input', this.copyMainInputData.bind( this ) );
$( window ).on( 'load', function() {
if ( '' !== window.location.hash ) {
if ( 0 < $( 'a[href="' + window.location.hash + '"]' ).length && 'undefined' !== typeof jQuery.fn.magnificPopup ) {
$( 'a[href="' + window.location.hash + '"]' ).trigger( 'click' );
window.location.hash = '';
}
}
});
},
switchedTab: function ( e ) {
var $clickedTab = $( e.currentTarget ),
tab_val = $clickedTab.data( 'value' );
$( 'input[name="bb-zoom-tab"]' ).val( tab_val );
},
toggleGroupSettings: function( e ) {
var target = $( e.target );
e.preventDefault();
if ( target.is( ':checked' ) ) {
$( 'form[name="group-settings-form"] .bb-zoom-setting-tab' ).removeClass( 'bp-hide' );
} else {
$( 'form[name="group-settings-form"] .bb-zoom-setting-tab' ).addClass( 'bp-hide' );
}
},
bpStepsNavigate: function( e ) {
e.preventDefault();
var target = $( e.currentTarget );
if ( target.closest( '.bp-step-nav' ).length ) {
target.closest( 'li' ).addClass( 'selected' ).siblings().removeClass( 'selected' );
target.closest( '.bp-step-nav-main' ).find( '.bp-step-block' + target.attr( 'href' ) ).addClass( 'selected' ).siblings().removeClass( 'selected' );
} else if ( target.closest( '.bp-step-actions' ).length ) {
var activeBlock = target.closest( '.bp-step-nav-main' ).find( '.bp-step-block.selected' );
var activeTab = target.closest( '.bp-step-nav-main' ).find( '.bp-step-nav li.selected' );
if ( target.hasClass( 'bp-step-prev' ) ) {
activeBlock.removeClass( 'selected' ).prev().addClass( 'selected' );
activeTab.removeClass( 'selected' ).prev().addClass( 'selected' );
} else if ( target.hasClass( 'bp-step-next' ) ) {
activeBlock.removeClass( 'selected' ).next().addClass( 'selected' );
activeTab.removeClass( 'selected' ).next().addClass( 'selected' );
}
}
// Hide Next/Prev Buttons if first or last tab is active.
var bpStepsLength = target.closest( '.bp-step-nav-main' ).find( '.bp-step-nav li' ).length;
if ( target.closest( '.bp-step-nav-main' ).find( '.bp-step-nav li.selected' ).index() === 0 ) {
target.closest( '.bp-step-nav-main' ).find( '.bp-step-actions .bp-step-prev' ).hide();
} else {
target.closest( '.bp-step-nav-main' ).find( '.bp-step-actions .bp-step-prev' ).show();
}
if ( target.closest( '.bp-step-nav-main' ).find( '.bp-step-nav li.selected' ).index() === bpStepsLength - 1 ) {
target.closest( '.bp-step-nav-main' ).addClass( 'last-tab' ).find( '.bp-step-actions .bp-step-next' ).hide();
} else {
target.closest( '.bp-step-nav-main' ).removeClass( 'last-tab' ).find( '.bp-step-actions .bp-step-next' ).show();
}
},
zoomSettingsSave: function( e ) {
$( e.target ).addClass( 'loading' );
},
zoomInstructionNavigate: function( e ) {
if ( $( '.bp-zoom-group-show-instructions' ).length ) {
if ( e.keyCode === 39 ) {
$( '.bp-zoom-group-show-instructions .bp-step-actions .bp-step-next:visible' ).trigger( 'click' );
} else if ( e.keyCode === 37 ) {
$( '.bp-zoom-group-show-instructions .bp-step-actions .bp-step-prev:visible' ).trigger( 'click' );
}
}
},
fetchZoomAccounts: function ( e ) {
var account_id = $( '#s2s-account-id' ).val(),
client_id = $( '#s2s-client-id' ).val(),
client_secret = $( '#s2s-client-secret' ).val(),
$body = $( 'body' ),
$account_field = $( document ).find( '.bb-zoom_account-email #account-email' ),
group_id = 0;
if ( $body.hasClass( 'groups' ) && $body.hasClass( 'zoom' ) ) {
var is_wizard = '';
if ( 0 < $( e.target ).closest( '.bb-group-zoom-wizard-credentials' ).length ) {
is_wizard = '-popup';
}
group_id = $( '#group-id' ).val();
$account_field = $( '#bb-group-zoom-s2s-api-email' );
account_id = $( '#bb-group-zoom-s2s-account-id' + is_wizard ).val();
client_id = $( '#bb-group-zoom-s2s-client-id' + is_wizard ).val();
client_secret = $( '#bb-group-zoom-s2s-client-secret' + is_wizard ).val();
}
e.preventDefault();
if ( '' === account_id || '' === client_id || '' === client_secret ) {
return false;
}
$( document ).find( '.bb-zoom_account-email' ).addClass( 'loading' );
if ( bp.Zoom_Common.account_email_xhr ) {
bp.Zoom_Common.account_email_xhr.abort();
}
bp.Zoom_Common.account_email_xhr = $.ajax(
{
type: 'POST',
url: bpZoomMeetingCommonVars.ajax_url,
data: {
action: 'zoom_api_get_account_emails',
account_id: account_id,
client_id: client_id,
client_secret: client_secret,
group_id: group_id,
_nonce: bpZoomMeetingCommonVars.fetch_account_nonce
},
success: function ( response ) {
if ( typeof response.data !== 'undefined' && response.data.email_accounts ) {
$( document ).find( '.bb-zoom_account-email' ).removeClass( 'loading' );
$account_field.html( response.data.email_accounts );
var $wizard_account_email = '';
if ( 0 < group_id ) {
$wizard_account_email = $( '#bb-group-zoom-s2s-api-email-popup' );
$wizard_account_email.html( response.data.email_accounts );
}
if ( '' !== response.data.field_disabled ) {
$account_field.addClass( response.data.field_disabled );
if ( '' !== $wizard_account_email ) {
$wizard_account_email.addClass( response.data.field_disabled );
}
} else {
$account_field.removeClass( 'is-disabled' );
if ( '' !== $wizard_account_email ) {
$wizard_account_email.removeClass( 'is-disabled' );
}
}
}
}
}
);
},
toggleAdminGroupSettings: function( e ) {
var target = $( e.target );
e.preventDefault();
if ( target.is( ':checked' ) ) {
$( '#bp-group-zoom-settings-connection-type, #bp-group-zoom-settings-additional' ).removeClass( 'bp-hide' );
} else {
$( '#bp-group-zoom-settings-connection-type, #bp-group-zoom-settings-additional' ).addClass( 'bp-hide' );
}
},
updateGroupSecretToken: function( e ) {
var target = $( e.target ),
group_id = $( '#group-id' ).val(),
secret_token = target.val();
e.preventDefault();
if ( '' === secret_token || '' === group_id ) {
return false;
}
if ( bp.Zoom_Common.secret_token_xhr ) {
bp.Zoom_Common.secret_token_xhr.abort();
}
bp.Zoom_Common.secret_token_xhr = $.ajax(
{
type: 'POST',
url: bpZoomMeetingCommonVars.ajax_url,
data: {
action: 'zoom_group_update_secret_token',
secret_token: secret_token,
group_id: group_id,
_nonce: bpZoomMeetingCommonVars.update_secret_token_nonce
},
success: function () {}
}
);
},
submitGroupZoomWizard: function ( e ) {
var account_id = $( '#bb-group-zoom-s2s-account-id-popup' ).val(),
client_id = $( '#bb-group-zoom-s2s-client-id-popup' ).val(),
client_secret = $( '#bb-group-zoom-s2s-client-secret-popup' ).val(),
account_email = $( '#bb-group-zoom-s2s-api-email-popup' ).val(),
target = $( e.target ),
group_id = $( '#group-id' ).val();
e.preventDefault();
if ( bp.Zoom_Common.credential_xhr ) {
bp.Zoom_Common.credential_xhr.abort();
}
target.addClass( 'loading' ).css( 'pointer-events', 'none' );
bp.Zoom_Common.credential_xhr = $.ajax(
{
type: 'POST',
url: bpZoomMeetingCommonVars.ajax_url,
data: {
action: 'zoom_api_submit_group_zoom_credentials',
account_id: account_id,
client_id: client_id,
client_secret: client_secret,
account_email: account_email,
group_id: group_id,
_nonce: bpZoomMeetingCommonVars.submit_zoom_wizard_nonce
},
success: function ( response ) {
target.removeClass( 'loading' ).css( 'pointer-events', '' );
if ( typeof response.data !== 'undefined' ) {
if ( 'success' === response.data.type ) {
// Enabled the group zoom and show fields.
if ( ! $( '#bp-edit-group-zoom' ).is( ':checked' ) ) {
$( '#bp-edit-group-zoom' ).prop( 'checked', true );
$( '.bb-zoom-setting-tab' ).removeClass( 'bp-hide' );
}
// Hide side-wide notice.
$( '.group-zoom-sidewide-deprecated-notice' ).remove();
// Close wizard.
if ( 'undefined' !== typeof jQuery.fn.magnificPopup ) {
$.magnificPopup.close();
$( 'body' ).css( 'overflow', '' );
}
}
if ( response.data.notice ) {
$( '.bb-group-zoom-s2s-notice' ).html( response.data.notice );
}
}
}
}
);
},
copyInputData: function( e ) {
if ( 'SELECT' === $( e.currentTarget ).prop( 'tagName' ) ) {
$( document ).find( 'select[name=' + $( e.currentTarget ).attr( 'name' ).replace( '-popup','' ) + ']' ).val( $( e.currentTarget ).val() ).change();
} else {
$( document ).find( 'input[name=' + $( e.currentTarget ).attr( 'name' ).replace( '-popup','' ) + ']' ).val( $( e.currentTarget ).val() );
}
},
copyMainInputData: function( e ) {
if ( 'SELECT' === $( e.currentTarget ).prop( 'tagName' ) ) {
$( document ).find( 'select[name=' + $( e.currentTarget ).attr( 'name' ) + '-popup]' ).val( $( e.currentTarget ).val() ).change();
} else {
$( document ).find( 'input[name=' + $( e.currentTarget ).attr( 'name' ) + '-popup]' ).val( $( e.currentTarget ).val() );
}
},
};
// Launch BP Zoom.
bp.Zoom_Common.start();
} )( bp, jQuery );
{"id":24972,"date":"2018-11-19T19:50:38","date_gmt":"2018-11-19T19:50:38","guid":{"rendered":"https:\/\/securedocumentllc.com\/index.php\/home\/"},"modified":"2022-07-30T13:49:13","modified_gmt":"2022-07-30T13:49:13","slug":"home","status":"publish","type":"page","link":"https:\/\/securedocumentllc.com\/","title":{"rendered":"Home"},"content":{"rendered":"\n\n\t\n\t\t\t\t\tSECURE DOCUMENT SERVICES\n\t\t\t\t<\/h1>\n\t\t\t
PREPARED BY PROFESSIONALS<\/p>\n
WE TAKE THE PRESSURE OFF YOU<\/p>\n\t\t\t\n\t\t\t\t\t\tGet Started\n\t\t<\/a>\n\t
WHO WE ARE<\/p>\n
\n\t\tHow Does Document Preparation Work?\n\t<\/h2>\n\t
\n\t\t\t\t\tConsult with an Expert\n\t\t\t\t<\/h3>\n
Send us a message using the “Contact Us” page; one of our experts will contact you to discuss your situation and assist you in choosing a solution that will best fit your needs!<\/h5>\n\u00a0\n\t
\n\t\t\t\t\tSubmit Your Files\n\t\t\t\t<\/h3>\n
Send us your applicable information. If you have any questions, one of our Document Management Resources Specialists will be available to assist you.<\/h5>\n\u00a0\n\t
\n\t\t\t\t\tSee Your Results\n\t\t\t\t<\/h3>\n
Relax and allow us to get all your documentation in line! We will provide you with updates regarding your account and help you prepare any further documentation, as necessary.<\/h5>\n\u00a0\n\t\t\t\t
\n\t
\n\t\t\t\t\tOur Document Preparation Service is Affordable, Easy, and Saves You Time!\n\t\t\t\t<\/h2>\nWe specialize in working “hands-on” with our clients in a patient, professional manner to prepare accurate\u00a0paperwork that allows you to challenge the validity of third party collection agencies to collect alleged debts.\n\u00a0\n\t\t\t\n\t\t\t\t\t\t\tGet Started\n\t\t\t\t\t<\/a>\n\t\n\t\t\t\t\tLIFE IS STRESSFUL ENOUGH\n\t\t\t\t<\/h2>\n\t\t\t
LET US HANDLE THE PAPERWORK<\/p>\n\t\t\t\n\t\t\t\t\t\t\tGet Started\n\t\t\t\t\t<\/a>\n\n","protected":false},"excerpt":{"rendered":"
SECURE DOCUMENT SERVICES PREPARED BY PROFESSIONALS WE TAKE THE PRESSURE OFF YOU Get Started WHO WE ARE PROFESSIONALS We are Secure Document Services. We are a company dedicated to empowering consumers by offering document preparation. We are passionate about making the often intimidating and complex world of regulations and documentation approachable and accessible. Our documents, …<\/p>\n
Home<\/span> Read More »<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"enabled","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"class_list":["post-24972","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/securedocumentllc.com\/index.php\/wp-json\/wp\/v2\/pages\/24972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/securedocumentllc.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/securedocumentllc.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/securedocumentllc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/securedocumentllc.com\/index.php\/wp-json\/wp\/v2\/comments?post=24972"}],"version-history":[{"count":6,"href":"https:\/\/securedocumentllc.com\/index.php\/wp-json\/wp\/v2\/pages\/24972\/revisions"}],"predecessor-version":[{"id":25063,"href":"https:\/\/securedocumentllc.com\/index.php\/wp-json\/wp\/v2\/pages\/24972\/revisions\/25063"}],"wp:attachment":[{"href":"https:\/\/securedocumentllc.com\/index.php\/wp-json\/wp\/v2\/media?parent=24972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}