Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): Failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/monara/public_html/test.athavaneng.com/themes.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 226
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 227
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 228
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 229
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 230
Warning: Cannot modify header information - headers already sent by (output started at /home/monara/public_html/test.athavaneng.com/themes.php:1) in /home/monara/public_html/test.athavaneng.com/themes.php on line 231
index.asset.php 0000644 00000000121 15073226623 0007502 0 ustar 00 array(),
'version' => WPCF7_VERSION,
);
index.js 0000644 00000030340 15073226623 0006217 0 ustar 00 (()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){if(this.formData={},this.tree={},!(t instanceof FormData))return this;this.formData=t;const e=()=>{const t=new Map;return t.largestIndex=0,t.set=function(e,i){""===e?e=t.largestIndex++:/^[0-9]+$/.test(e)&&(e=parseInt(e),t.largestIndex<=e&&(t.largestIndex=e+1)),Map.prototype.set.call(t,e,i)},t};this.tree=e();const i=/^(?[a-z][-a-z0-9_:]*)(?(?:\[(?:[a-z][-a-z0-9_:]*|[0-9]*)\])*)/i;for(const[t,s]of this.formData){const o=t.match(i);if(o)if(""===o.groups.array)this.tree.set(o.groups.name,s);else{const t=[...o.groups.array.matchAll(/\[([a-z][-a-z0-9_:]*|[0-9]*)\]/gi)].map((([t,e])=>e));t.unshift(o.groups.name);const i=t.pop();t.reduce(((t,i)=>{if(/^[0-9]+$/.test(i)&&(i=parseInt(i)),t.get(i)instanceof Map)return t.get(i);const s=e();return t.set(i,s),s}),this.tree).set(i,s)}}}t.r(e),t.d(e,{all:()=>D,any:()=>M,date:()=>m,dayofweek:()=>u,email:()=>r,enum:()=>h,file:()=>d,maxdate:()=>z,maxfilesize:()=>j,maxitems:()=>v,maxlength:()=>x,maxnumber:()=>y,mindate:()=>A,minfilesize:()=>$,minitems:()=>w,minlength:()=>g,minnumber:()=>b,number:()=>c,required:()=>n,requiredfile:()=>a,stepnumber:()=>I,tel:()=>l,time:()=>f,url:()=>p}),i.prototype.entries=function(){return this.tree.entries()},i.prototype.get=function(t){return this.tree.get(t)},i.prototype.getAll=function(t){if(!this.has(t))return[];const e=t=>{const i=[];if(t instanceof Map)for(const[s,o]of t)i.push(...e(o));else""!==t&&i.push(t);return i};return e(this.get(t))},i.prototype.has=function(t){return this.tree.has(t)},i.prototype.keys=function(){return this.tree.keys()},i.prototype.values=function(){return this.tree.values()};const s=i;function o({rule:t,field:e,error:i,...s}){this.rule=t,this.field=e,this.error=i,this.properties=s}const n=function(t){if(0===t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).length)throw new o(this)},a=function(t){if(0===t.getAll(this.field).length)throw new o(this)},r=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(t.length<6)return!1;if(-1===t.indexOf("@",1))return!1;if(t.indexOf("@")!==t.lastIndexOf("@"))return!1;const[e,i]=t.split("@",2);if(!/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/.test(e))return!1;if(/\.{2,}/.test(i))return!1;if(/(?:^[ \t\n\r\0\x0B.]|[ \t\n\r\0\x0B.]$)/.test(i))return!1;const s=i.split(".");if(s.length<2)return!1;for(const t of s){if(/(?:^[ \t\n\r\0\x0B-]|[ \t\n\r\0\x0B-]$)/.test(t))return!1;if(!/^[a-z0-9-]+$/i.test(t))return!1}return!0})))throw new o(this)},p=function(t){const e=t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t));if(!e.every((t=>{try{return(t=>-1!==["http","https","ftp","ftps","mailto","news","irc","irc6","ircs","gopher","nntp","feed","telnet","mms","rtsp","sms","svn","tel","fax","xmpp","webcal","urn"].indexOf(t))(new URL(t).protocol.replace(/:$/,""))}catch{return!1}})))throw new o(this)},l=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>(((t=(t=t.replace(/[#*].*$/,"")).replaceAll(/[()/.*#\s-]+/g,"")).startsWith("+")||t.startsWith("00"))&&(t=`+${t.replace(/^[+0]+/,"")}`),!!/^[+]?[0-9]+$/.test(t)&&5t.trim())).filter((t=>""!==t)).every((t=>!!/^[-]?[0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t)||!!/^[-]?(?:[0-9]+)?[.][0-9]+(?:[eE][+-]?[0-9]+)?$/.test(t))))throw new o(this)},m=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{if(!/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.valueOf())})))throw new o(this)},f=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=t.match(/^([0-9]{2})\:([0-9]{2})(?:\:([0-9]{2}))?$/);if(!e)return!1;const i=parseInt(e[1]),s=parseInt(e[2]),o=e[3]?parseInt(e[3]):0;return 0<=i&&i<=23&&0<=s&&s<=59&&0<=o&&o<=59})))throw new o(this)},d=function(t){if(!t.getAll(this.field).every((t=>t instanceof File&&this.accept?.some((e=>/^\.[a-z0-9]+$/i.test(e)?t.name.toLowerCase().endsWith(e.toLowerCase()):(t=>{const e=[],i=t.match(/^(?[a-z]+)\/(?[*]|[a-z0-9.+-]+)$/i);if(i){const t=i.groups.toplevel.toLowerCase(),s=i.groups.sub.toLowerCase();for(const[o,n]of(()=>{const t=new Map;return t.set("jpg|jpeg|jpe","image/jpeg"),t.set("gif","image/gif"),t.set("png","image/png"),t.set("bmp","image/bmp"),t.set("tiff|tif","image/tiff"),t.set("webp","image/webp"),t.set("ico","image/x-icon"),t.set("heic","image/heic"),t.set("asf|asx","video/x-ms-asf"),t.set("wmv","video/x-ms-wmv"),t.set("wmx","video/x-ms-wmx"),t.set("wm","video/x-ms-wm"),t.set("avi","video/avi"),t.set("divx","video/divx"),t.set("flv","video/x-flv"),t.set("mov|qt","video/quicktime"),t.set("mpeg|mpg|mpe","video/mpeg"),t.set("mp4|m4v","video/mp4"),t.set("ogv","video/ogg"),t.set("webm","video/webm"),t.set("mkv","video/x-matroska"),t.set("3gp|3gpp","video/3gpp"),t.set("3g2|3gp2","video/3gpp2"),t.set("txt|asc|c|cc|h|srt","text/plain"),t.set("csv","text/csv"),t.set("tsv","text/tab-separated-values"),t.set("ics","text/calendar"),t.set("rtx","text/richtext"),t.set("css","text/css"),t.set("htm|html","text/html"),t.set("vtt","text/vtt"),t.set("dfxp","application/ttaf+xml"),t.set("mp3|m4a|m4b","audio/mpeg"),t.set("aac","audio/aac"),t.set("ra|ram","audio/x-realaudio"),t.set("wav","audio/wav"),t.set("ogg|oga","audio/ogg"),t.set("flac","audio/flac"),t.set("mid|midi","audio/midi"),t.set("wma","audio/x-ms-wma"),t.set("wax","audio/x-ms-wax"),t.set("mka","audio/x-matroska"),t.set("rtf","application/rtf"),t.set("js","application/javascript"),t.set("pdf","application/pdf"),t.set("swf","application/x-shockwave-flash"),t.set("class","application/java"),t.set("tar","application/x-tar"),t.set("zip","application/zip"),t.set("gz|gzip","application/x-gzip"),t.set("rar","application/rar"),t.set("7z","application/x-7z-compressed"),t.set("exe","application/x-msdownload"),t.set("psd","application/octet-stream"),t.set("xcf","application/octet-stream"),t.set("doc","application/msword"),t.set("pot|pps|ppt","application/vnd.ms-powerpoint"),t.set("wri","application/vnd.ms-write"),t.set("xla|xls|xlt|xlw","application/vnd.ms-excel"),t.set("mdb","application/vnd.ms-access"),t.set("mpp","application/vnd.ms-project"),t.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t.set("docm","application/vnd.ms-word.document.macroEnabled.12"),t.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),t.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),t.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),t.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),t.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),t.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),t.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),t.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),t.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),t.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),t.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),t.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),t.set("potm","application/vnd.ms-powerpoint.template.macroEnabled.12"),t.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),t.set("sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"),t.set("sldm","application/vnd.ms-powerpoint.slide.macroEnabled.12"),t.set("onetoc|onetoc2|onetmp|onepkg","application/onenote"),t.set("oxps","application/oxps"),t.set("xps","application/vnd.ms-xpsdocument"),t.set("odt","application/vnd.oasis.opendocument.text"),t.set("odp","application/vnd.oasis.opendocument.presentation"),t.set("ods","application/vnd.oasis.opendocument.spreadsheet"),t.set("odg","application/vnd.oasis.opendocument.graphics"),t.set("odc","application/vnd.oasis.opendocument.chart"),t.set("odb","application/vnd.oasis.opendocument.database"),t.set("odf","application/vnd.oasis.opendocument.formula"),t.set("wp|wpd","application/wordperfect"),t.set("key","application/vnd.apple.keynote"),t.set("numbers","application/vnd.apple.numbers"),t.set("pages","application/vnd.apple.pages"),t})())("*"===s&&n.startsWith(t+"/")||n===i[0])&&e.push(...o.split("|"))}return e})(e).some((e=>(e="."+e.trim(),t.name.toLowerCase().endsWith(e.toLowerCase())))))))))throw new o(this)},h=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>this.accept?.some((e=>t===String(e))))))throw new o(this)},u=function(t){if(!t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).every((t=>{const e=0===(i=new Date(t).getDay())?7:i;var i;return this.accept?.some((t=>e===parseInt(t)))})))throw new o(this)},w=function(t){if(t.getAll(this.field).map((t=>t.trim())).filter((t=>""!==t)).lengtht.trim())).filter((t=>""!==t));if(parseInt(this.threshold)t.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),0!==i&&it.trim())).filter((t=>""!==t));let i=0;if(e.forEach((t=>{"string"==typeof t&&(i+=t.length)})),parseInt(this.threshold)t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(t)t.trim())).filter((t=>""!==t)).every((t=>!(parseFloat(this.threshold)t.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&tt.trim())).filter((t=>""!==t)).every((t=>!(/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(t)&&/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(this.threshold)&&this.threshold{t instanceof File&&(i+=t.size)})),i{t instanceof File&&(i+=t.size)})),parseInt(this.threshold)t.trim())).filter((t=>""!==t)),i=parseFloat(this.base),s=parseFloat(this.interval);if(!(0{const e=(parseFloat(t)-i)%s;return"0.000000"===Math.abs(e).toFixed(6)||"0.000000"===Math.abs(e-s).toFixed(6)})))throw new o(this)},O=({ruleObj:t,options:i})=>{const{rule:s,...o}=t;return"function"==typeof e[s]&&("function"!=typeof e[s].matches||e[s].matches(o,i))},E=({ruleObj:t,formDataTree:i,options:s})=>{const{rule:o}=t;e[o].call(t,i,s)},k=[],F=t=>[...k].reduce(((t,e)=>i=>e(i,t)),t),D=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.every((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;if(void 0!==t.error)throw t;return!1}return!0})))throw new o(this)},M=function(t,e={}){const i=(this.rules??[]).filter((t=>O({ruleObj:t,options:e}))),s=F(E);if(!i.some((i=>{try{s({ruleObj:i,formDataTree:t,options:e})}catch(t){if(!(t instanceof o))throw t;return!1}return!0})))throw new o(this)};var L;window.swv={validators:e,validate:(t,e,i={})=>{const n=(t.rules??[]).filter((t=>O({ruleObj:t,options:i})));if(!n.length)return new Map;const a=F(E),r=new s(e),p=n.reduce(((t,e)=>{try{a({ruleObj:e,formDataTree:r,options:i})}catch(e){if(!(e instanceof o))throw e;if(void 0!==e.field&&!t.has(e.field)&&void 0!==e.error)return t.set(e.field,e)}return t}),new Map);for(const t of r.keys())p.has(t)||p.set(t,{validInputs:r.getAll(t)});return p},use:t=>{k.push(t)},...null!==(L=window.swv)&&void 0!==L?L:{}}})(); cookie-law-info-admin.js 0000644 00000031760 15073226637 0011175 0 ustar 00 (function( $ ) {
'use strict';
/**
* All of the code for your admin-facing JavaScript source
* should reside in this file.
*
* Note: It has been assumed you will write jQuery code here, so the
* $ function reference has been prepared for usage within the scope
* of this function.
*
* This enables you to define handlers, for when the DOM is ready:
*
* $(function() {
*
* });
*
* When the window is loaded:
*
* $( window ).load(function() {
*
* });
*
* ...and/or other possibilities.
*
* Ideally, it is not considered best practise to attach more than a
* single DOM-ready or window-load handler for a particular page.
* Although scripts in the WordPress core, Plugins and Themes may be
* practising this, we should strive to set a better example in our own work.
*/
$(
function() {
$( '.my-color-field' ).wpColorPicker();
var cli_nav_tab = $( '.cookie-law-info-tab-head .nav-tab' );
if (cli_nav_tab.length > 0) {
cli_nav_tab.click(
function(){
var cli_tab_hash = $( this ).attr( 'href' );
cli_nav_tab.removeClass( 'nav-tab-active' );
$( this ).addClass( 'nav-tab-active' );
cli_tab_hash = cli_tab_hash.charAt( 0 ) == '#' ? cli_tab_hash.substring( 1 ) : cli_tab_hash;
var cli_tab_elm = $( 'div[data-id="' + cli_tab_hash + '"]' );
$( '.cookie-law-info-tab-content' ).hide();
if (cli_tab_elm.length > 0) {
cli_tab_elm.fadeIn();
}
}
);
var location_hash = window.location.hash;
if (location_hash != "") {
var cli_tab_hash = location_hash.charAt( 0 ) == '#' ? location_hash.substring( 1 ) : location_hash;
if (cli_tab_hash != "") {
$( 'div[data-id="' + cli_tab_hash + '"]' ).show();
$( 'a[href="#' + cli_tab_hash + '"]' ).addClass( 'nav-tab-active' );
}
} else {
cli_nav_tab.eq( 0 ).click();
}
}
$( '.cli_sub_tab li' ).click(
function(){
var trgt = $( this ).attr( 'data-target' );
var prnt = $( this ).parent( '.cli_sub_tab' );
var ctnr = prnt.siblings( '.cli_sub_tab_container' );
prnt.find( 'li a' ).css( {'color':'#0073aa','cursor':'pointer'} );
$( this ).find( 'a' ).css( {'color':'#000','cursor':'default','font-weight':'600'} );
ctnr.find( '.cli_sub_tab_content' ).hide();
ctnr.find( '.cli_sub_tab_content[data-id="' + trgt + '"]' ).fadeIn();
}
);
$( '.cli_sub_tab' ).each(
function(){
var elm = $( this ).children( 'li' ).eq( 0 );
elm.click();
}
);
$( '#cli_settings_form' ).submit(
function(e){
var submit_action = $( '#cli_update_action' ).val();
if (submit_action == 'delete_all_settings') {
// return;
}
e.preventDefault();
var data = $( this ).serialize();
var url = $( this ).attr( 'action' );
var spinner = $( this ).find( '.spinner' );
var submit_btn = $( this ).find( 'input[type="submit"]' );
spinner.css( {'visibility':'visible'} );
submit_btn.css( {'opacity':'.5','cursor':'default'} ).prop( 'disabled',true );
$.ajax(
{
url:url,
type:'POST',
data:data + '&cli_settings_ajax_update=' + submit_action,
success:function(data)
{
spinner.css( {'visibility':'hidden'} );
submit_btn.css( {'opacity':'1','cursor':'pointer'} ).prop( 'disabled',false );
if (submit_action == 'delete_all_settings') {
cli_notify_msg.success( cli_reset_settings_success_message );
setTimeout(
function(){
if( !!ckyConfigs.redirectUrl ) {
window.location.href = ckyConfigs.redirectUrl;
}
},
1000
);
} else {
cli_notify_msg.success( cli_settings_success_message );
}
cli_bar_active_msg();
},
error:function ()
{
spinner.css( {'visibility':'hidden'} );
submit_btn.css( {'opacity':'1','cursor':'pointer'} ).prop( 'disabled',false );
if (submit_action == 'delete_all_settings') {
cli_notify_msg.error( cli_reset_settings_error_message );
} else {
cli_notify_msg.error( cli_settings_error_message );
}
}
}
);
}
);
// =====================
function cli_scroll_accept_er()
{
if ($( '[name="cookie_bar_as_field"] option:selected' ).val() == 'popup' && $( '[name="popup_overlay_field"]:checked' ).val() == 'true' && $( '[name="scroll_close_field"]:checked' ).val() == 'true') {
$( '.cli_scroll_accept_er' ).show();
// $('label[for="scroll_close_field"]').css({'color':'red'});
} else {
$( '.cli_scroll_accept_er' ).hide();
// $('label[for="scroll_close_field"]').css({'color':'#23282d'});
}
}
cli_scroll_accept_er();
$( '[name="cookie_bar_as_field"]' ).change(
function(){
cli_scroll_accept_er();
}
);
$( '[name="popup_overlay_field"], [name="scroll_close_field"]' ).click(
function(){
cli_scroll_accept_er();
}
);
// =====================
function cli_bar_active_msg()
{
$( '.cli_bar_state tr' ).hide();
if ($( 'input[type="radio"].cli_bar_on' ).is( ':checked' )) {
$( '.cli_bar_state tr.cli_bar_on' ).show();
} else {
$( '.cli_bar_state tr.cli_bar_off' ).show();
}
}
var cli_form_toggler =
{
set:function()
{
$( 'select.cli_form_toggle' ).each(
function(){
cli_form_toggler.toggle( $( this ) );
}
);
$( 'input[type="radio"].cli_form_toggle' ).each(
function(){
if ($( this ).is( ':checked' )) {
cli_form_toggler.toggle( $( this ) );
}
}
);
$( 'select.cli_form_toggle' ).change(
function(){
cli_form_toggler.toggle( $( this ) );
}
);
$( 'input[type="radio"].cli_form_toggle' ).click(
function(){
if ($( this ).is( ':checked' )) {
cli_form_toggler.toggle( $( this ) );
}
}
);
},
toggle:function(elm)
{
var vl = elm.val();
var trgt = elm.attr( 'cli_frm_tgl-target' );
$( '[cli_frm_tgl-id="' + trgt + '"]' ).hide();
var selected_target = $( '[cli_frm_tgl-id="' + trgt + '"]' ).filter(
function(){
return $( this ).attr( 'cli_frm_tgl-val' ) == vl;
}
);
selected_target.show();
selected_target.find( 'th' ).each(
function(){
var prnt = $( this ).parent( 'tr' );
var sub_lvl = 1;
if (typeof prnt.attr( 'cli_frm_tgl-lvl' ) !== typeof undefined && prnt.attr( 'cli_frm_tgl-lvl' ) !== false) {
sub_lvl = prnt.attr( 'cli_frm_tgl-lvl' );
}
var lft_margin = sub_lvl * 15;
$( this ).find( 'label' ).css( {'margin-left':'0px'} ).stop( true,true ).animate( {'margin-left':lft_margin + 'px'} );
}
);
}
}
$( '#button_2_page_field' ).on(
'change',
function(){
if ($( '.cli_privacy_page_not_exists_er' ).length > 0) {
$( '.cli_privacy_page_not_exists_er' ).remove();
}
}
);
cli_form_toggler.set();
}
);
$( document ).ready(
function () {
wtCliAdminFunctions.set();
}
);
})( jQuery );
var wtCliAdminFunctions = {
set : function() {
this.CLIAccordion();
this.checkboxTogglerHandler();
this.revisitConsentPositionEvent();
this.revisitConsentPosition();
this.modalEvents();
},
CLIAccordion : function() {
if (jQuery( '.wt-cli-accordion-tab' ).hasClass( 'active' )) {
jQuery( '.wt-cli-accordion-tab.active' ).find( '.wt-cli-accordion-content' ).slideDown( 0 );
}
jQuery( document ).on(
'click',
'.wt-cli-accordion-tab a',
function (e) {
e.preventDefault();
var $this = jQuery( this );
if ($this.next().hasClass( 'active' )) {
$this.removeClass( 'active' );
$this.next().removeClass( 'active' );
$this.closest( '.wt-cli-accordion-tab' ).removeClass( 'active' );
$this.next().slideUp( 350 );
} else {
$this.parent().parent().find( '.wt-cli-accordion-content' ).removeClass( 'active' );
$this.parent().parent().find( '.wt-cli-accordion-content' ).slideUp( 350 );
$this.parent().parent().find( '.wt-cli-accordion-tab a' ).removeClass( 'active' );
$this.parent().parent().find( '.wt-cli-accordion-tab' ).removeClass( 'active' );
$this.toggleClass( 'active' );
$this.closest( '.wt-cli-accordion-tab' ).toggleClass( 'active' );
$this.next().toggleClass( 'active' );
$this.next().slideToggle( 350 );
}
}
);
},
checkboxTogglerHandler: function(){
jQuery( 'input[name="showagain_tab_field"],.wt-cli-input-toggle-checkbox' ).each(
function(){
wtCliAdminFunctions.checkboxToggler( jQuery( this ) );
}
);
jQuery( document ).on(
'click',
'.wt-cli-input-toggle-checkbox',
function(){
wtCliAdminFunctions.checkboxToggler( jQuery( this ) );
}
);
},
checkboxToggler: function( element ) {
var currentElement = element;
var toggleTarget = currentElement.attr( 'data-cli-toggle-target' );
var targetElement = jQuery( '[data-cli-toggle-id=' + toggleTarget + ']' );
if ( currentElement.is( ':checked' ) ) {
targetElement.slideDown( 200 );
targetElement.addClass( 'wt-cli-toggle-active' );
} else {
targetElement.slideUp( 100 );
targetElement.removeClass( 'wt-cli-toggle-active' );
}
},
revisitConsentPositionEvent: function(){
jQuery( document ).on(
'change',
'input[type="radio"][name="notify_position_horizontal_field"],select[name="popup_showagain_position_field"],input[name="cookie_bar_as_field"],select[name="widget_position_field"]',
function(){
wtCliAdminFunctions.revisitConsentPosition();
}
);
},
revisitConsentPosition: function(){
var barType = jQuery( 'input[type="radio"][name="cookie_bar_as_field"]:checked' ).val();
var position = jQuery( 'input[type="radio"][name="notify_position_horizontal_field"]:checked' ).val();
var revisitConsentMarginLabel = jQuery( '#wt-cli-revisit-consent-margin-label' );
var currentText = jQuery( '#wt-cli-revisit-consent-margin-label' ).val();
if ( barType === "popup" ) {
position = jQuery( 'select[name="popup_showagain_position_field"] option:selected' ).val();
} else if ( barType === "widget") {
position = jQuery( 'select[name="widget_position_field"] option:selected' ).val();
}
if ( position === 'bottom-right' || position === 'top-right' || position === 'right' ) {
currentText = revisitConsentMarginLabel.attr( 'data-cli-right-text' );
} else {
currentText = revisitConsentMarginLabel.attr( 'data-cli-left-text' );
}
if (typeof(currentText) != "undefined" && currentText !== null) {
revisitConsentMarginLabel.html( currentText );
}
},
modalEvents: function(){
jQuery( document ).on(
'click',
'.wt-cli-modal-js-close',
function(){
wtCliAdminFunctions.closeModal();
}
);
},
showModal: function(id) {
this.closeModal();
let el = jQuery( '#' + id );
el.find( '.wt-cli-inline-notice' ).remove();
el.addClass( 'on' );
this.addOverlay();
},
createModal: function( heading,content ){
this.closeModal();
var headingHtml = '';
if ( heading !== '') {
headingHtml = '
' + heading + '
';
}
html = '
';
html += '×';
html += headingHtml;
html += '
';
html += '
' + content + '
';
html += '
';
html += '
';
jQuery( 'body' ).append( html );
this.addOverlay();
},
addOverlay: function(){
html = '';
jQuery( 'body' ).append( html );
},
closeOverlay: function(){
jQuery( '.wt-cli-modal-js-overlay' ).remove();
},
closeModal: function(){
jQuery( '.wt-cli-modal' ).removeClass( 'on' );
this.closeOverlay();
},
addInlineMessage:function( message, type='notice', element ) {
element.find( '.wt-cli-inline-notice' ).remove();
var error_message = '
' + message + '
';
jQuery( element ).append( error_message );
},
loadSpinner( element ){
var spinner = jQuery( '' );
spinner.insertBefore( element );
spinner.css( {'visibility' : 'visible'} );
},
removeSpinner: function( element ){
var spinner = element.prev( '.spinner' );
spinner.remove();
},
}
var cli_notify_msg =
{
error:function(message)
{
var er_elm = jQuery( '