| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/script.js.tar |
lebauwcentre/wp-content/plugins/themeisle-companion/obfx_modules/google-analytics/js/script.js 0000644 00000003253 15111763425 0032166 0 ustar 00 home/xbodynamge /* global obfxAnalyticsObj, console */
/**
* Analytics Module Admin Script
*
* This handles the analytics interaction.
*
* @since 1.0.0
* @package obfx_modules/google-analytics/js
*
* @author ThemeIsle
*/
var obfx_analytics = function ( $ ) {
'use strict';
$(
function () {
$( '#refresh-analytics-accounts' ).on(
'click', function ( event ) {
event.preventDefault();
$.ajax(
{
url: obfxAnalyticsObj.url,
beforeSend: function ( xhr ) {
$( '#refresh-analytics-accounts' ).addClass( 'loading' );
xhr.setRequestHeader( 'X-WP-Nonce', obfxAnalyticsObj.nonce );
},
data: {},
type: 'POST',
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '#refresh-analytics-accounts' ).removeClass( 'loading' );
location.reload();
}
}, 'json'
);
return false;
}
);
$( '#unregister-analytics' ).on(
'click', function ( event ) {
event.preventDefault();
$.ajax(
{
url: obfxAnalyticsObj.url,
beforeSend: function ( xhr ) {
$( '#unregister-analytics' ).addClass( 'loading' );
xhr.setRequestHeader( 'X-WP-Nonce', obfxAnalyticsObj.nonce );
},
data: {
deactivate: 'unregister'
},
type: 'POST',
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '#unregister-analytics' ).removeClass( 'loading' );
location.reload();
}
}, 'json'
);
return false;
}
);
}
);
};
obfx_analytics( jQuery );
crosstraining/wp-content/plugins/themeisle-companion/obfx_modules/google-analytics/js/script.js 0000604 00000003253 15112760560 0032365 0 ustar 00 home/xbodynamge /* global obfxAnalyticsObj, console */
/**
* Analytics Module Admin Script
*
* This handles the analytics interaction.
*
* @since 1.0.0
* @package obfx_modules/google-analytics/js
*
* @author ThemeIsle
*/
var obfx_analytics = function ( $ ) {
'use strict';
$(
function () {
$( '#refresh-analytics-accounts' ).on(
'click', function ( event ) {
event.preventDefault();
$.ajax(
{
url: obfxAnalyticsObj.url,
beforeSend: function ( xhr ) {
$( '#refresh-analytics-accounts' ).addClass( 'loading' );
xhr.setRequestHeader( 'X-WP-Nonce', obfxAnalyticsObj.nonce );
},
data: {},
type: 'POST',
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '#refresh-analytics-accounts' ).removeClass( 'loading' );
location.reload();
}
}, 'json'
);
return false;
}
);
$( '#unregister-analytics' ).on(
'click', function ( event ) {
event.preventDefault();
$.ajax(
{
url: obfxAnalyticsObj.url,
beforeSend: function ( xhr ) {
$( '#unregister-analytics' ).addClass( 'loading' );
xhr.setRequestHeader( 'X-WP-Nonce', obfxAnalyticsObj.nonce );
},
data: {
deactivate: 'unregister'
},
type: 'POST',
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '#unregister-analytics' ).removeClass( 'loading' );
location.reload();
}
}, 'json'
);
return false;
}
);
}
);
};
obfx_analytics( jQuery );
www/wp-content/plugins/themeisle-companion/vendor/codeinwp/templates-directory/js/script.js 0000644 00000021154 15113650473 0031510 0 ustar 00 home/xbodynamge /* global importer_endpoint, console */
/**
* Template Directory Customizer Admin Dashboard Script
*
* This handles the template directory.
*
* @since 1.0.0
* @package obfx_modules/template-directory/js
*
* @author ThemeIsle
*/
var obfx_template_directory = function ( $ ) {
'use strict';
$(
function () {
// Handle import click.
$( '.wp-full-overlay-header' ).on(
'click', '.obfx-import-template', function () {
$( this ).addClass( 'obfx-import-queue updating-message obfx-updating' ).html( '' );
$( '.obfx-template-preview .close-full-overlay, .obfx-next-prev' ).remove();
var template_url = $( this ).data( 'template-file' );
var template_name = $( this ).data( 'template-title' );
if ( $( '.active .obfx-installable' ).length || $( '.active .obfx-activate' ).length ) {
checkAndInstallPlugins();
} else {
$.ajax(
{
url: importer_endpoint.url,
beforeSend: function ( xhr ) {
$( '.obfx-import-queue' ).addClass( 'obfx-updating' ).html( '' );
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
},
data: {
template_url: template_url,
template_name: template_name
},
type: 'POST',
success: function ( data ) {
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
location.href = data;
},
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
}
}, 'json'
);
}
}
);
$( '#obfx-template-dir-fetch-templates' ).on( 'click', function ( e ) {
e.preventDefault();
$.ajax(
{
url: importer_endpoint.fetch_templates_url,
beforeSend: function ( xhr ) {
$( '#obfx-template-dir-fetch-templates .dashicons' ).hide();
$( '#obfx-template-dir-fetch-templates' ).addClass( 'updating-message' );
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
},
data: {
plugin_slug: importer_endpoint.plugin_slug,
},
type: 'POST',
success: function () {
$( '#obfx-template-dir-fetch-templates' ).removeClass( 'updating-message' ).attr('disabled', 'true').empty().html('<i class="dashicons-yes dashicons" style="margin-right:0"></i>');
location.reload();
},
error: function( error ) {
console.log(error);
}
}, 'json'
);
} );
function checkAndInstallPlugins() {
var installable = $( '.active .obfx-installable' );
var toActivate = $( '.active .obfx-activate' );
if ( installable.length || toActivate.length ) {
$( installable ).each(
function () {
var plugin = $( this );
$( plugin ).removeClass( 'obfx-installable' ).addClass( 'obfx-installing' );
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
var slug = $( this ).find( '.obfx-install-plugin' ).attr( 'data-slug' );
wp.updates.installPlugin(
{
slug: slug,
success: function ( response ) {
activatePlugin( response.activateUrl, plugin );
}
}
);
}
);
$( toActivate ).each(
function () {
var plugin = $( this );
var activateUrl = $( plugin ).find( '.activate-now' ).attr( 'href' );
if ( typeof activateUrl !== 'undefined' ) {
activatePlugin( activateUrl, plugin );
}
}
);
}
}
function activatePlugin( activationUrl, plugin ) {
$.ajax(
{
type: 'GET',
url: activationUrl,
beforeSend: function () {
$( plugin ).removeClass( 'obfx-activate' ).addClass( 'obfx-installing' );
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
},
success: function () {
$( plugin ).find( '.dashicons' ).replaceWith( '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>' );
$( plugin ).removeClass( 'obfx-installing' );
},
complete: function () {
if ( $( '.active .obfx-installing' ).length === 0 ) {
$( '.obfx-import-queue' ).trigger( 'click' );
}
}
}
);
}
// Handle sidebar collapse in preview.
$( '.obfx-template-preview' ).on(
'click', '.collapse-sidebar', function (event) {
event.preventDefault();
var overlay = $( '.obfx-template-preview' );
if ( overlay.hasClass( 'expanded' ) ) {
overlay.removeClass( 'expanded' );
overlay.addClass( 'collapsed' );
return false;
}
if ( overlay.hasClass( 'collapsed' ) ) {
overlay.removeClass( 'collapsed' );
overlay.addClass( 'expanded' );
return false;
}
}
);
// Handle responsive buttons.
$( '.obfx-responsive-preview' ).on(
'click', 'button', function () {
$( '.obfx-template-preview' ).removeClass( 'preview-mobile preview-tablet preview-desktop' );
var deviceClass = 'preview-' + $( this ).data( 'device' );
$( '.obfx-responsive-preview button' ).each(
function () {
$( this ).attr( 'aria-pressed', 'false' );
$( this ).removeClass( 'active' );
}
);
$( '.obfx-responsive-preview' ).removeClass( $( this ).attr( 'class' ).split( ' ' ).pop() );
$( '.obfx-template-preview' ).addClass( deviceClass );
$( this ).addClass( 'active' );
}
);
// Hide preview.
$( '.close-full-overlay' ).on(
'click', function () {
$( '.obfx-template-preview .obfx-theme-info.active' ).removeClass( 'active' );
$( '.obfx-template-preview' ).hide();
$( '.obfx-template-frame' ).attr( 'src', '' );
}
);
// Open preview routine.
$( '.obfx-preview-template' ).on(
'click', function () {
var templateSlug = $( this ).data( 'template-slug' );
var previewUrl = $( this ).data( 'demo-url' );
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
$( '.obfx-theme-info.' + templateSlug ).addClass( 'active' );
setupImportButton();
$( '.obfx-template-preview' ).fadeIn();
}
);
// Handle left-right navigation between templates.
$( '.obfx-next-prev .next-theme' ).on(
'click', function () {
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
if ( active.next() && active.next().length ) {
active.next().addClass( 'active' );
} else {
active.siblings( ':first' ).addClass( 'active' );
}
changePreviewSource();
setupImportButton();
}
);
$( '.obfx-next-prev .previous-theme' ).on(
'click', function () {
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
if ( active.prev() && active.prev().length ) {
active.prev().addClass( 'active' );
} else {
active.siblings( ':last' ).addClass( 'active' );
}
changePreviewSource();
setupImportButton();
}
);
// Change preview source.
function changePreviewSource() {
var previewUrl = $( '.obfx-theme-info.active' ).data( 'demo-url' );
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
}
function setupImportButton() {
var button = $( '.wp-full-overlay-header .obfx-import-template' );
var dataUpsell = $( '.active' ).data( 'upsell' );
var upsellButton = $( '.obfx-upsell-button' );
if ( dataUpsell === 'yes' ) {
$( button ).hide();
$( upsellButton ).show();
return false;
}
$( button ).show();
$( upsellButton ).hide();
var installable = $( '.active .obfx-installable' );
if ( installable.length > 0 ) {
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Install and Import' );
} else {
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Import' );
}
var activeTheme = $( '.obfx-theme-info.active' );
$( button ).attr( 'data-template-file', $( activeTheme ).data( 'template-file' ) );
$( button ).attr( 'data-template-title', $( activeTheme ).data( 'template-title' ) );
}
}
);
};
obfx_template_directory( jQuery );
home/xbodynamge/www/wp-content/themes/hestia/inc/customizer/controls/ui/customizer-tabs/script.js 0000644 00000014345 15113722035 0027555 0 ustar 00 /**
* Script for the customizer tabs control interactions.
*
* @since 1.1.43
* @package Hestia
*
* @author ThemeIsle
*/
/* global wp */
wp.customize.controlConstructor['interface-tabs'] = wp.customize.Control.extend({
ready: function() {
// Switch tab based on customizer partial edit links.
wp.customize.previewer.bind(
'tab-previewer-edit', function( data ) {
jQuery( data.selector ).trigger( 'click' );
}
);
wp.customize.previewer.bind(
'focus-control', function( data ) {
/**
* This timeout is here because in firefox this happens before customizer animation of changing panels.
* After it change panels with the input focused, the customizer was moved to right 12px. We have to make sure
* that the customizer animation of changing panels in customizer is done before focusing the input.
*/
setTimeout( function(){
var control = wp.customize.control(data);
if( typeof control !== 'undefined'){
wp.customize.control(data).focus();
}
} , 100 );
}
);
wp.customize.previewer.bind(
'focus-section', function( data ) {
/**
* This timeout is here because in firefox this happens before customizer animation of changing panels.
* After it change panels with the input focused, the customizer was moved to right 12px. We have to make sure
* that the customizer animation of changing panels in customizer is done before focusing the input.
*/
setTimeout( function(){
wp.customize.section(data).focus();
} , 100 );
}
);
wp.customize.previewer.bind( 'ready', function () {
var parts = window.location.search.substr(1).split('&');
var $_GET = {};
for (var i = 0; i < parts.length; i++) {
var temp = parts[i].split('=');
$_GET[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]);
}
if( typeof $_GET['autofocus[control]'] !== 'undefined' && $_GET['autofocus[control]'] !== ''){
jQuery( 'li[id^="customize-control-widget"] ,#customize-control-sidebars_widgets-sidebar-big-title, #customize-control-sidebars_widgets-sidebar-top-bar, #customize-control-sidebars_widgets-subscribe-widgets' ).live(
'DOMNodeInserted', function () {
jQuery('.hestia-customizer-tab > label.' + $_GET['autofocus[control]']).trigger('click');
});
}
} );
this.init();
this.handleClick();
},
init: function () {
var control = this;
var section = control.section();
wp.customize.bind('ready',function () {
control.hideAllControls(section);
var tab = Object.keys(control.params.controls)[0];
var controlsToShow = control.params.controls[tab];
var allControls = [];
for (var controlName in controlsToShow ){
if( controlsToShow.hasOwnProperty(controlName)) {
if (jQuery.isEmptyObject(controlsToShow[controlName]) === false &&
typeof wp.customize.control(controlName) !== 'undefined') {
var subTabValue = wp.customize.control(controlName).setting._value;
allControls = allControls.concat(controlsToShow[controlName][subTabValue]);
}
allControls.push(controlName);
}
}
control.showControls(allControls, section);
var once = 0;
jQuery( 'li[id^="customize-control-widget"] ,#customize-control-sidebars_widgets-sidebar-big-title, #customize-control-sidebars_widgets-sidebar-top-bar, #customize-control-sidebars_widgets-subscribe-widgets' ).live(
'DOMNodeInserted', function (e) {
if ( once > 0 ){
return false;
}
if( typeof e.currentTarget.previousSibling === 'undefined' ) {
return false;
}
if( jQuery(e.currentTarget.previousSibling).hasClass( 'widget-rendered' ) ) {
return false;
}
control.showControls(allControls, section);
once = 1;
});
});
},
hideAllControls: function ( section ) {
var controls = wp.customize.section(section).controls();
var tabControl = this.id;
for( var i in controls ){
var controlId = controls[i].id;
if( controlId === 'widgets' ){
var sectionContainer = wp.customize.section(section).container;
jQuery( sectionContainer ).children( 'li[class*="widget"]' ).css( 'display', 'none' );
} else {
if( controlId !== tabControl ){
var selector = wp.customize.control(controlId).selector;
jQuery(selector).hide();
}
}
}
},
handleClick: function () {
var control = this;
var section = control.section();
var container = control.container;
jQuery(container).find('.hestia-customizer-tab').on( 'click', function () {
jQuery( this ).parent().find('.hestia-customizer-tab').removeClass('active');
jQuery( this ).addClass('active');
control.hideAllControls(section);
var tab = jQuery(this).data('tab');
var controlsToShow = control.params.controls[tab];
var allControls = [];
for (var controlName in controlsToShow ){
if( jQuery.isEmptyObject(controlsToShow[controlName]) === false &&
typeof wp.customize.control(controlName) !== 'undefined' ){
var subTabValue = wp.customize.control(controlName).setting._value;
allControls = allControls.concat(controlsToShow[controlName][subTabValue]);
}
allControls.push(controlName);
}
control.showControls(allControls, section);
} );
},
showControls: function (controls, section) {
for(var i in controls ){
var controlName = controls[i];
if( controlName === 'widgets' ) {
var sectionContainer = wp.customize.section(section).container;
jQuery( sectionContainer ).children( 'li[class*="widget"]' ).css( 'display', 'list-item' );
} else {
if( typeof wp.customize.control(controlName) !== 'undefined' ) {
var selector = wp.customize.control(controlName).selector;
jQuery(selector).show();
}
}
}
}
}); lebauwcentre/wp-content/plugins/themeisle-companion/vendor/codeinwp/templates-directory/js/script.js0000644 00000021154 15114235212 0033333 0 ustar 00 home/xbodynamge /* global importer_endpoint, console */
/**
* Template Directory Customizer Admin Dashboard Script
*
* This handles the template directory.
*
* @since 1.0.0
* @package obfx_modules/template-directory/js
*
* @author ThemeIsle
*/
var obfx_template_directory = function ( $ ) {
'use strict';
$(
function () {
// Handle import click.
$( '.wp-full-overlay-header' ).on(
'click', '.obfx-import-template', function () {
$( this ).addClass( 'obfx-import-queue updating-message obfx-updating' ).html( '' );
$( '.obfx-template-preview .close-full-overlay, .obfx-next-prev' ).remove();
var template_url = $( this ).data( 'template-file' );
var template_name = $( this ).data( 'template-title' );
if ( $( '.active .obfx-installable' ).length || $( '.active .obfx-activate' ).length ) {
checkAndInstallPlugins();
} else {
$.ajax(
{
url: importer_endpoint.url,
beforeSend: function ( xhr ) {
$( '.obfx-import-queue' ).addClass( 'obfx-updating' ).html( '' );
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
},
data: {
template_url: template_url,
template_name: template_name
},
type: 'POST',
success: function ( data ) {
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
location.href = data;
},
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
}
}, 'json'
);
}
}
);
$( '#obfx-template-dir-fetch-templates' ).on( 'click', function ( e ) {
e.preventDefault();
$.ajax(
{
url: importer_endpoint.fetch_templates_url,
beforeSend: function ( xhr ) {
$( '#obfx-template-dir-fetch-templates .dashicons' ).hide();
$( '#obfx-template-dir-fetch-templates' ).addClass( 'updating-message' );
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
},
data: {
plugin_slug: importer_endpoint.plugin_slug,
},
type: 'POST',
success: function () {
$( '#obfx-template-dir-fetch-templates' ).removeClass( 'updating-message' ).attr('disabled', 'true').empty().html('<i class="dashicons-yes dashicons" style="margin-right:0"></i>');
location.reload();
},
error: function( error ) {
console.log(error);
}
}, 'json'
);
} );
function checkAndInstallPlugins() {
var installable = $( '.active .obfx-installable' );
var toActivate = $( '.active .obfx-activate' );
if ( installable.length || toActivate.length ) {
$( installable ).each(
function () {
var plugin = $( this );
$( plugin ).removeClass( 'obfx-installable' ).addClass( 'obfx-installing' );
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
var slug = $( this ).find( '.obfx-install-plugin' ).attr( 'data-slug' );
wp.updates.installPlugin(
{
slug: slug,
success: function ( response ) {
activatePlugin( response.activateUrl, plugin );
}
}
);
}
);
$( toActivate ).each(
function () {
var plugin = $( this );
var activateUrl = $( plugin ).find( '.activate-now' ).attr( 'href' );
if ( typeof activateUrl !== 'undefined' ) {
activatePlugin( activateUrl, plugin );
}
}
);
}
}
function activatePlugin( activationUrl, plugin ) {
$.ajax(
{
type: 'GET',
url: activationUrl,
beforeSend: function () {
$( plugin ).removeClass( 'obfx-activate' ).addClass( 'obfx-installing' );
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
},
success: function () {
$( plugin ).find( '.dashicons' ).replaceWith( '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>' );
$( plugin ).removeClass( 'obfx-installing' );
},
complete: function () {
if ( $( '.active .obfx-installing' ).length === 0 ) {
$( '.obfx-import-queue' ).trigger( 'click' );
}
}
}
);
}
// Handle sidebar collapse in preview.
$( '.obfx-template-preview' ).on(
'click', '.collapse-sidebar', function (event) {
event.preventDefault();
var overlay = $( '.obfx-template-preview' );
if ( overlay.hasClass( 'expanded' ) ) {
overlay.removeClass( 'expanded' );
overlay.addClass( 'collapsed' );
return false;
}
if ( overlay.hasClass( 'collapsed' ) ) {
overlay.removeClass( 'collapsed' );
overlay.addClass( 'expanded' );
return false;
}
}
);
// Handle responsive buttons.
$( '.obfx-responsive-preview' ).on(
'click', 'button', function () {
$( '.obfx-template-preview' ).removeClass( 'preview-mobile preview-tablet preview-desktop' );
var deviceClass = 'preview-' + $( this ).data( 'device' );
$( '.obfx-responsive-preview button' ).each(
function () {
$( this ).attr( 'aria-pressed', 'false' );
$( this ).removeClass( 'active' );
}
);
$( '.obfx-responsive-preview' ).removeClass( $( this ).attr( 'class' ).split( ' ' ).pop() );
$( '.obfx-template-preview' ).addClass( deviceClass );
$( this ).addClass( 'active' );
}
);
// Hide preview.
$( '.close-full-overlay' ).on(
'click', function () {
$( '.obfx-template-preview .obfx-theme-info.active' ).removeClass( 'active' );
$( '.obfx-template-preview' ).hide();
$( '.obfx-template-frame' ).attr( 'src', '' );
}
);
// Open preview routine.
$( '.obfx-preview-template' ).on(
'click', function () {
var templateSlug = $( this ).data( 'template-slug' );
var previewUrl = $( this ).data( 'demo-url' );
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
$( '.obfx-theme-info.' + templateSlug ).addClass( 'active' );
setupImportButton();
$( '.obfx-template-preview' ).fadeIn();
}
);
// Handle left-right navigation between templates.
$( '.obfx-next-prev .next-theme' ).on(
'click', function () {
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
if ( active.next() && active.next().length ) {
active.next().addClass( 'active' );
} else {
active.siblings( ':first' ).addClass( 'active' );
}
changePreviewSource();
setupImportButton();
}
);
$( '.obfx-next-prev .previous-theme' ).on(
'click', function () {
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
if ( active.prev() && active.prev().length ) {
active.prev().addClass( 'active' );
} else {
active.siblings( ':last' ).addClass( 'active' );
}
changePreviewSource();
setupImportButton();
}
);
// Change preview source.
function changePreviewSource() {
var previewUrl = $( '.obfx-theme-info.active' ).data( 'demo-url' );
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
}
function setupImportButton() {
var button = $( '.wp-full-overlay-header .obfx-import-template' );
var dataUpsell = $( '.active' ).data( 'upsell' );
var upsellButton = $( '.obfx-upsell-button' );
if ( dataUpsell === 'yes' ) {
$( button ).hide();
$( upsellButton ).show();
return false;
}
$( button ).show();
$( upsellButton ).hide();
var installable = $( '.active .obfx-installable' );
if ( installable.length > 0 ) {
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Install and Import' );
} else {
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Import' );
}
var activeTheme = $( '.obfx-theme-info.active' );
$( button ).attr( 'data-template-file', $( activeTheme ).data( 'template-file' ) );
$( button ).attr( 'data-template-title', $( activeTheme ).data( 'template-title' ) );
}
}
);
};
obfx_template_directory( jQuery );
dev/wp-content/plugins/themeisle-companion/vendor/codeinwp/templates-directory/js/script.js 0000644 00000021154 15114245713 0031440 0 ustar 00 home/xbodynamge /* global importer_endpoint, console */
/**
* Template Directory Customizer Admin Dashboard Script
*
* This handles the template directory.
*
* @since 1.0.0
* @package obfx_modules/template-directory/js
*
* @author ThemeIsle
*/
var obfx_template_directory = function ( $ ) {
'use strict';
$(
function () {
// Handle import click.
$( '.wp-full-overlay-header' ).on(
'click', '.obfx-import-template', function () {
$( this ).addClass( 'obfx-import-queue updating-message obfx-updating' ).html( '' );
$( '.obfx-template-preview .close-full-overlay, .obfx-next-prev' ).remove();
var template_url = $( this ).data( 'template-file' );
var template_name = $( this ).data( 'template-title' );
if ( $( '.active .obfx-installable' ).length || $( '.active .obfx-activate' ).length ) {
checkAndInstallPlugins();
} else {
$.ajax(
{
url: importer_endpoint.url,
beforeSend: function ( xhr ) {
$( '.obfx-import-queue' ).addClass( 'obfx-updating' ).html( '' );
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
},
data: {
template_url: template_url,
template_name: template_name
},
type: 'POST',
success: function ( data ) {
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
location.href = data;
},
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
}
}, 'json'
);
}
}
);
$( '#obfx-template-dir-fetch-templates' ).on( 'click', function ( e ) {
e.preventDefault();
$.ajax(
{
url: importer_endpoint.fetch_templates_url,
beforeSend: function ( xhr ) {
$( '#obfx-template-dir-fetch-templates .dashicons' ).hide();
$( '#obfx-template-dir-fetch-templates' ).addClass( 'updating-message' );
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
},
data: {
plugin_slug: importer_endpoint.plugin_slug,
},
type: 'POST',
success: function () {
$( '#obfx-template-dir-fetch-templates' ).removeClass( 'updating-message' ).attr('disabled', 'true').empty().html('<i class="dashicons-yes dashicons" style="margin-right:0"></i>');
location.reload();
},
error: function( error ) {
console.log(error);
}
}, 'json'
);
} );
function checkAndInstallPlugins() {
var installable = $( '.active .obfx-installable' );
var toActivate = $( '.active .obfx-activate' );
if ( installable.length || toActivate.length ) {
$( installable ).each(
function () {
var plugin = $( this );
$( plugin ).removeClass( 'obfx-installable' ).addClass( 'obfx-installing' );
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
var slug = $( this ).find( '.obfx-install-plugin' ).attr( 'data-slug' );
wp.updates.installPlugin(
{
slug: slug,
success: function ( response ) {
activatePlugin( response.activateUrl, plugin );
}
}
);
}
);
$( toActivate ).each(
function () {
var plugin = $( this );
var activateUrl = $( plugin ).find( '.activate-now' ).attr( 'href' );
if ( typeof activateUrl !== 'undefined' ) {
activatePlugin( activateUrl, plugin );
}
}
);
}
}
function activatePlugin( activationUrl, plugin ) {
$.ajax(
{
type: 'GET',
url: activationUrl,
beforeSend: function () {
$( plugin ).removeClass( 'obfx-activate' ).addClass( 'obfx-installing' );
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
},
success: function () {
$( plugin ).find( '.dashicons' ).replaceWith( '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>' );
$( plugin ).removeClass( 'obfx-installing' );
},
complete: function () {
if ( $( '.active .obfx-installing' ).length === 0 ) {
$( '.obfx-import-queue' ).trigger( 'click' );
}
}
}
);
}
// Handle sidebar collapse in preview.
$( '.obfx-template-preview' ).on(
'click', '.collapse-sidebar', function (event) {
event.preventDefault();
var overlay = $( '.obfx-template-preview' );
if ( overlay.hasClass( 'expanded' ) ) {
overlay.removeClass( 'expanded' );
overlay.addClass( 'collapsed' );
return false;
}
if ( overlay.hasClass( 'collapsed' ) ) {
overlay.removeClass( 'collapsed' );
overlay.addClass( 'expanded' );
return false;
}
}
);
// Handle responsive buttons.
$( '.obfx-responsive-preview' ).on(
'click', 'button', function () {
$( '.obfx-template-preview' ).removeClass( 'preview-mobile preview-tablet preview-desktop' );
var deviceClass = 'preview-' + $( this ).data( 'device' );
$( '.obfx-responsive-preview button' ).each(
function () {
$( this ).attr( 'aria-pressed', 'false' );
$( this ).removeClass( 'active' );
}
);
$( '.obfx-responsive-preview' ).removeClass( $( this ).attr( 'class' ).split( ' ' ).pop() );
$( '.obfx-template-preview' ).addClass( deviceClass );
$( this ).addClass( 'active' );
}
);
// Hide preview.
$( '.close-full-overlay' ).on(
'click', function () {
$( '.obfx-template-preview .obfx-theme-info.active' ).removeClass( 'active' );
$( '.obfx-template-preview' ).hide();
$( '.obfx-template-frame' ).attr( 'src', '' );
}
);
// Open preview routine.
$( '.obfx-preview-template' ).on(
'click', function () {
var templateSlug = $( this ).data( 'template-slug' );
var previewUrl = $( this ).data( 'demo-url' );
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
$( '.obfx-theme-info.' + templateSlug ).addClass( 'active' );
setupImportButton();
$( '.obfx-template-preview' ).fadeIn();
}
);
// Handle left-right navigation between templates.
$( '.obfx-next-prev .next-theme' ).on(
'click', function () {
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
if ( active.next() && active.next().length ) {
active.next().addClass( 'active' );
} else {
active.siblings( ':first' ).addClass( 'active' );
}
changePreviewSource();
setupImportButton();
}
);
$( '.obfx-next-prev .previous-theme' ).on(
'click', function () {
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
if ( active.prev() && active.prev().length ) {
active.prev().addClass( 'active' );
} else {
active.siblings( ':last' ).addClass( 'active' );
}
changePreviewSource();
setupImportButton();
}
);
// Change preview source.
function changePreviewSource() {
var previewUrl = $( '.obfx-theme-info.active' ).data( 'demo-url' );
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
}
function setupImportButton() {
var button = $( '.wp-full-overlay-header .obfx-import-template' );
var dataUpsell = $( '.active' ).data( 'upsell' );
var upsellButton = $( '.obfx-upsell-button' );
if ( dataUpsell === 'yes' ) {
$( button ).hide();
$( upsellButton ).show();
return false;
}
$( button ).show();
$( upsellButton ).hide();
var installable = $( '.active .obfx-installable' );
if ( installable.length > 0 ) {
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Install and Import' );
} else {
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Import' );
}
var activeTheme = $( '.obfx-theme-info.active' );
$( button ).attr( 'data-template-file', $( activeTheme ).data( 'template-file' ) );
$( button ).attr( 'data-template-title', $( activeTheme ).data( 'template-title' ) );
}
}
);
};
obfx_template_directory( jQuery );
xbodynamge/www/wp-content/themes/hestia/inc/customizer/controls/ui/helper-plugin-install/script.js 0000644 00000007302 15114324062 0030554 0 ustar 00 home /**
* Remove activate button and replace with activation in progress button.
*
* @package Hestia
*/
/* global hestia_plugin_helper */
/* global console */
jQuery( document ).ready(
function ( $ ) {
$.pluginInstall = {
'init': function () {
this.handleInstall();
this.handleActivate();
},
'handleInstall': function () {
var self = this;
$( 'body' ).on( 'click', '.hestia-install-plugin', function (e) {
e.preventDefault();
var button = $( this );
var slug = button.attr( 'data-slug' );
var url = button.attr( 'href' );
var redirect = $( button ).attr( 'data-redirect' );
button.text( wp.updates.l10n.installing );
button.addClass('updating-message');
wp.updates.installPlugin(
{
slug: slug,
success: function(){
button.text(hestia_plugin_helper.activating + '...');
self.activatePlugin(url, redirect);
}
}
);
});
},
'activatePlugin': function (url, redirect) {
if (typeof url === 'undefined' || !url) {
return;
}
jQuery.ajax(
{
async: true,
type: 'GET',
url: url,
success: function () {
// Reload the page.
if (typeof(redirect) !== 'undefined' && redirect !== '') {
window.location.replace(redirect);
} else {
location.reload();
}
},
error: function (jqXHR, exception) {
var msg = '';
if (jqXHR.status === 0) {
msg = 'Not connect.\n Verify Network.';
} else if (jqXHR.status === 404) {
msg = 'Requested page not found. [404]';
} else if (jqXHR.status === 500) {
msg = 'Internal Server Error [500].';
} else if (exception === 'parsererror') {
msg = 'Requested JSON parse failed.';
} else if (exception === 'timeout') {
msg = 'Time out error.';
} else if (exception === 'abort') {
msg = 'Ajax request aborted.';
} else {
msg = 'Uncaught Error.\n' + jqXHR.responseText;
}
console.log(msg);
},
}
);
},
'handleActivate': function () {
var self = this;
$( 'body' ).on( 'click', '.activate-now', function (e) {
e.preventDefault();
var button = $( this );
var url = button.attr( 'href' );
var redirect = button.attr( 'data-redirect' );
button.addClass('updating-message');
button.text(hestia_plugin_helper.activating + '...');
self.activatePlugin(url,redirect);
});
},
};
$.pluginInstall.init();
}
); home/xbodynamge/www/wp-content/themes/hestia/inc/customizer/controls/ui/customizer-scroll/script.js 0000644 00000001266 15115040174 0030117 0 ustar 00 /**
* Script for the customizer auto scrolling.
*
* Sends the section name to the preview.
*
* @since 1.1.50
* @package Hestia
*
* @author ThemeIsle
*/
/* global wp */
var hestia_customize_scroller = function ( $ ) {
'use strict';
$(
function () {
var customize = wp.customize;
$( 'ul[id*="hestia_frontpage_sections"] .accordion-section' ).not( '.panel-meta' ).each(
function () {
$( this ).on(
'click', function() {
var section = $( this ).attr( 'aria-owns' ).split( '_' ).pop();
customize.previewer.send( 'clicked-customizer-section', section );
}
);
}
);
}
);
};
hestia_customize_scroller( jQuery );
xbodynamge/dev/wp-content/plugins/themeisle-companion/obfx_modules/google-analytics/js/script.js 0000644 00000003253 15115040551 0030254 0 ustar 00 home /* global obfxAnalyticsObj, console */
/**
* Analytics Module Admin Script
*
* This handles the analytics interaction.
*
* @since 1.0.0
* @package obfx_modules/google-analytics/js
*
* @author ThemeIsle
*/
var obfx_analytics = function ( $ ) {
'use strict';
$(
function () {
$( '#refresh-analytics-accounts' ).on(
'click', function ( event ) {
event.preventDefault();
$.ajax(
{
url: obfxAnalyticsObj.url,
beforeSend: function ( xhr ) {
$( '#refresh-analytics-accounts' ).addClass( 'loading' );
xhr.setRequestHeader( 'X-WP-Nonce', obfxAnalyticsObj.nonce );
},
data: {},
type: 'POST',
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '#refresh-analytics-accounts' ).removeClass( 'loading' );
location.reload();
}
}, 'json'
);
return false;
}
);
$( '#unregister-analytics' ).on(
'click', function ( event ) {
event.preventDefault();
$.ajax(
{
url: obfxAnalyticsObj.url,
beforeSend: function ( xhr ) {
$( '#unregister-analytics' ).addClass( 'loading' );
xhr.setRequestHeader( 'X-WP-Nonce', obfxAnalyticsObj.nonce );
},
data: {
deactivate: 'unregister'
},
type: 'POST',
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '#unregister-analytics' ).removeClass( 'loading' );
location.reload();
}
}, 'json'
);
return false;
}
);
}
);
};
obfx_analytics( jQuery );
wp-content/plugins/themeisle-companion/vendor/codeinwp/templates-directory/js/script.js 0000604 00000021154 15115046617 0033546 0 ustar 00 home/xbodynamge/crosstraining /* global importer_endpoint, console */
/**
* Template Directory Customizer Admin Dashboard Script
*
* This handles the template directory.
*
* @since 1.0.0
* @package obfx_modules/template-directory/js
*
* @author ThemeIsle
*/
var obfx_template_directory = function ( $ ) {
'use strict';
$(
function () {
// Handle import click.
$( '.wp-full-overlay-header' ).on(
'click', '.obfx-import-template', function () {
$( this ).addClass( 'obfx-import-queue updating-message obfx-updating' ).html( '' );
$( '.obfx-template-preview .close-full-overlay, .obfx-next-prev' ).remove();
var template_url = $( this ).data( 'template-file' );
var template_name = $( this ).data( 'template-title' );
if ( $( '.active .obfx-installable' ).length || $( '.active .obfx-activate' ).length ) {
checkAndInstallPlugins();
} else {
$.ajax(
{
url: importer_endpoint.url,
beforeSend: function ( xhr ) {
$( '.obfx-import-queue' ).addClass( 'obfx-updating' ).html( '' );
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
},
data: {
template_url: template_url,
template_name: template_name
},
type: 'POST',
success: function ( data ) {
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
location.href = data;
},
error: function ( error ) {
console.error( error );
},
complete: function () {
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
}
}, 'json'
);
}
}
);
$( '#obfx-template-dir-fetch-templates' ).on( 'click', function ( e ) {
e.preventDefault();
$.ajax(
{
url: importer_endpoint.fetch_templates_url,
beforeSend: function ( xhr ) {
$( '#obfx-template-dir-fetch-templates .dashicons' ).hide();
$( '#obfx-template-dir-fetch-templates' ).addClass( 'updating-message' );
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
},
data: {
plugin_slug: importer_endpoint.plugin_slug,
},
type: 'POST',
success: function () {
$( '#obfx-template-dir-fetch-templates' ).removeClass( 'updating-message' ).attr('disabled', 'true').empty().html('<i class="dashicons-yes dashicons" style="margin-right:0"></i>');
location.reload();
},
error: function( error ) {
console.log(error);
}
}, 'json'
);
} );
function checkAndInstallPlugins() {
var installable = $( '.active .obfx-installable' );
var toActivate = $( '.active .obfx-activate' );
if ( installable.length || toActivate.length ) {
$( installable ).each(
function () {
var plugin = $( this );
$( plugin ).removeClass( 'obfx-installable' ).addClass( 'obfx-installing' );
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
var slug = $( this ).find( '.obfx-install-plugin' ).attr( 'data-slug' );
wp.updates.installPlugin(
{
slug: slug,
success: function ( response ) {
activatePlugin( response.activateUrl, plugin );
}
}
);
}
);
$( toActivate ).each(
function () {
var plugin = $( this );
var activateUrl = $( plugin ).find( '.activate-now' ).attr( 'href' );
if ( typeof activateUrl !== 'undefined' ) {
activatePlugin( activateUrl, plugin );
}
}
);
}
}
function activatePlugin( activationUrl, plugin ) {
$.ajax(
{
type: 'GET',
url: activationUrl,
beforeSend: function () {
$( plugin ).removeClass( 'obfx-activate' ).addClass( 'obfx-installing' );
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
},
success: function () {
$( plugin ).find( '.dashicons' ).replaceWith( '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>' );
$( plugin ).removeClass( 'obfx-installing' );
},
complete: function () {
if ( $( '.active .obfx-installing' ).length === 0 ) {
$( '.obfx-import-queue' ).trigger( 'click' );
}
}
}
);
}
// Handle sidebar collapse in preview.
$( '.obfx-template-preview' ).on(
'click', '.collapse-sidebar', function (event) {
event.preventDefault();
var overlay = $( '.obfx-template-preview' );
if ( overlay.hasClass( 'expanded' ) ) {
overlay.removeClass( 'expanded' );
overlay.addClass( 'collapsed' );
return false;
}
if ( overlay.hasClass( 'collapsed' ) ) {
overlay.removeClass( 'collapsed' );
overlay.addClass( 'expanded' );
return false;
}
}
);
// Handle responsive buttons.
$( '.obfx-responsive-preview' ).on(
'click', 'button', function () {
$( '.obfx-template-preview' ).removeClass( 'preview-mobile preview-tablet preview-desktop' );
var deviceClass = 'preview-' + $( this ).data( 'device' );
$( '.obfx-responsive-preview button' ).each(
function () {
$( this ).attr( 'aria-pressed', 'false' );
$( this ).removeClass( 'active' );
}
);
$( '.obfx-responsive-preview' ).removeClass( $( this ).attr( 'class' ).split( ' ' ).pop() );
$( '.obfx-template-preview' ).addClass( deviceClass );
$( this ).addClass( 'active' );
}
);
// Hide preview.
$( '.close-full-overlay' ).on(
'click', function () {
$( '.obfx-template-preview .obfx-theme-info.active' ).removeClass( 'active' );
$( '.obfx-template-preview' ).hide();
$( '.obfx-template-frame' ).attr( 'src', '' );
}
);
// Open preview routine.
$( '.obfx-preview-template' ).on(
'click', function () {
var templateSlug = $( this ).data( 'template-slug' );
var previewUrl = $( this ).data( 'demo-url' );
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
$( '.obfx-theme-info.' + templateSlug ).addClass( 'active' );
setupImportButton();
$( '.obfx-template-preview' ).fadeIn();
}
);
// Handle left-right navigation between templates.
$( '.obfx-next-prev .next-theme' ).on(
'click', function () {
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
if ( active.next() && active.next().length ) {
active.next().addClass( 'active' );
} else {
active.siblings( ':first' ).addClass( 'active' );
}
changePreviewSource();
setupImportButton();
}
);
$( '.obfx-next-prev .previous-theme' ).on(
'click', function () {
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
if ( active.prev() && active.prev().length ) {
active.prev().addClass( 'active' );
} else {
active.siblings( ':last' ).addClass( 'active' );
}
changePreviewSource();
setupImportButton();
}
);
// Change preview source.
function changePreviewSource() {
var previewUrl = $( '.obfx-theme-info.active' ).data( 'demo-url' );
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
}
function setupImportButton() {
var button = $( '.wp-full-overlay-header .obfx-import-template' );
var dataUpsell = $( '.active' ).data( 'upsell' );
var upsellButton = $( '.obfx-upsell-button' );
if ( dataUpsell === 'yes' ) {
$( button ).hide();
$( upsellButton ).show();
return false;
}
$( button ).show();
$( upsellButton ).hide();
var installable = $( '.active .obfx-installable' );
if ( installable.length > 0 ) {
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Install and Import' );
} else {
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Import' );
}
var activeTheme = $( '.obfx-theme-info.active' );
$( button ).attr( 'data-template-file', $( activeTheme ).data( 'template-file' ) );
$( button ).attr( 'data-template-title', $( activeTheme ).data( 'template-title' ) );
}
}
);
};
obfx_template_directory( jQuery );