Files
oai-symfony/fileadmin/templates/ext/cookie_control/res/js/cookie_control-plugin.js
2026-07-03 17:53:31 +02:00

48 lines
1.5 KiB
JavaScript

jQuery(document).ready(function(){
jQuery('#cctoggle').live('click',function(){
if(document.getElementById('cchide-popup').checked){
CookieControl.setCookie('civicShowCookieIcon', 'no');$('#ccc-icon').hide()
}
if(jQuery(this).attr('class') == 'cctoggle-on'){
jQuery.ajax({
url: 'index.php',
data: {
eID: 'cookieDelete',
tx_cookie_control_pi1: ({
'in':2
})
},
success: function(data) {
CookieControl.reset();
setTimeout(function(){window.location.reload()}, 500);
}
});
}else{
jQuery.ajax({
url: 'index.php',
data: {
eID: 'cookieDelete',
tx_cookie_control_pi1: ({
'in': 1
})
},
success: function(data) {
}
});
}
return false;
});
jQuery('#cookie_enable').bind('click',function(){
CookieControl.setCookie('civicShowCookieIcon', 'yes');
$('#cccwr').show();
$('#ccc-icon').show();
});
setTimeout(function(){
$('#cccwr').hide()
$('#ccc-icon').hide()
},300000) ;
});