| Server IP : 52.25.153.185 / Your IP : 216.73.217.131 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-35-cloud-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/plugins/testify/js/ |
Upload File : |
( function($) {
window.testify = window.testify || {};
$( document ).ready( function() {
var testify = {};
testify = {
fonts_template: function() {
var template = $('#testify-google-fonts-options-items').html();
return template;
},
font_icon_list_template: function() {
var template = $('#testify-font-icon-list-items').html();
return template;
},
font_icon_list_active: function() {
setTimeout(function() {
$icon_font_list = $('body').find('.testify_font_icon');
if ( $icon_font_list.length ) {
$icon_font_list.each( function() {
var $this_icon_list = $( this ),
$icon_font_field = $this_icon_list.parent().find('input'),
current_symbol_val = $.trim( $icon_font_field.val() ),
$icon_font_symbols = $this_icon_list.find( 'li' ),
active_symbol_class = 'testify_active',
$current_symbol,
top_offset,
icon_index_number;
function testify_icon_font_init() {
if ( current_symbol_val !== '' ) {
// font icon index is used now in the following format: %%index_number%%
if ( current_symbol_val.search( /^%%/ ) !== -1 ) {
icon_index_number = parseInt( current_symbol_val.replace( /%/g, '' ) );
$current_symbol = $this_icon_list.find( 'li' ).eq( icon_index_number );
} else {
$current_symbol = $this_icon_list.find( 'li[data-icon="' + current_symbol_val + '"]' );
}
$current_symbol.addClass( active_symbol_class );
if ( $this_icon_list.is( ':visible' ) ) {
setTimeout( function() {
top_offset = $current_symbol.offset().top - $this_icon_list.offset().top;
if ( top_offset > 0 ) {
$this_icon_list.animate( { scrollTop : top_offset }, 0 );
}
}, 110 );
}
}
}
testify_icon_font_init();
});
}
}, 10);
},
render_qmark_styles: function() {
setTimeout(function() {
var qmark_styles = $('body').find('.testify-qmark-option');
if ( qmark_styles.length ) {
qmark_styles.each( function(index) {
var qmark = $(this),
qmark_divi_field = qmark.parent().parent().find('input'),
qmark_val = $.trim( qmark_divi_field.val() ),
qmarkId = qmark.data('qmarkid');
if ( qmark_val === qmarkId ) {
qmark.addClass('active');
}
$('body').on('click', '.testify-qmark-option[data-qmarkid=' + qmarkId + ']', function() {
console.log( qmark.data('qmarkid') );
qmark.addClass('active').siblings().removeClass('active');
qmark_divi_field.val( qmarkId ).change();
});
});
}
}, 10);
}
};
$.extend( window.testify, testify );
});
} )(jQuery);
jQuery(document).ready(function($) {
$('body').on('click', '.testify-settings .nav-tab', function() {
// Hide other panels and initialize this panel with color pickers
testifyColorControl($(this).closest('.testify-settings').find('.testify-settings-panel').addClass('testify-hidden')
.filter('.testify-settings-panel-' + $(this).attr('href').substr(1))
.removeClass('testify-hidden').find('.testify-widget-color-control'));
// Change the active tab
$(this).addClass('nav-tab-active').siblings().removeClass('nav-tab-active').closest('form').data('active-tab', $(this).attr('href').substr(1));
return false;
});
$(document).on('widget-updated', function(ev, widget) {
var activePanel = widget.find('form').data('active-panel');
if (activePanel) {
widget.find('.testify-settings-panels .testify-settings-panel[data-testify-panel-id="' + activePanel + '"]:first').show().prev('h4').click();
}
});
// Accordion panels
$('body').on('click', '.testify-accordion-panels > h4', function(ev) {
var thisHeading = $(ev.target);
var thisPanel = thisHeading.next('div');
if (thisPanel.is(':visible')) {
thisHeading.siblings('div').slideUp();
} else {
thisHeading.siblings('div').not(thisPanel).slideUp();
thisPanel.slideDown().parents('form').data('active-panel', thisPanel.data('testify-panel-id'));
testifyColorControl(thisPanel.find('.testify-widget-color-control'));
}
});
$( 'body' ).on( 'click', '.testify_font_icon li', function() {
var tIcon = $(this).data('icon'),
this_element = $(this),
this_symbol = this_element.index(),
active_symbol_class = 'testify_active';
if ( this_element.hasClass( active_symbol_class ) ) {
return false;
}
this_element.siblings( '.' + active_symbol_class ).removeClass( active_symbol_class ).end().addClass( active_symbol_class );
this_symbol = '%%' + this_symbol + '%%';
this_element.parent().parent().find('input').val( this_symbol ).change();
});
// Clear LocalStorage
debugMode = false;
if ( debugMode === true ) {
try {
var testLS = 'localStorage' in window && window.localStorage !== null;
} catch (e) {
return false;
}
var et_prefix = /et_pb_([\S]*)/i;
for ( var prop in localStorage ) {
if ( found = prop.match( et_prefix ) ) {
localStorage.removeItem( prop );
}
}
console.log( 'LocalStorage cleared.' );
}
});