PluginProbe ʕ •ᴥ•ʔ
CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice) / 1.3.2
CookieYes – Cookie Banner for Cookie Consent (Easy to setup GDPR/CCPA Compliant Cookie Notice) v1.3.2
3.5.1 3.5.0 3.4.2 trunk 1.0.1 1.0.3 1.2 1.2.1 1.2.2 1.3 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.10 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.2.0 3.2.1 3.2.10 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.3.9.1 3.4.0 3.4.1
cookie-law-info / js / admin-ui-controller.js
cookie-law-info / js Last commit date
admin-ui-controller.js 13 years ago cookielawinfo.js 11 years ago
admin-ui-controller.js
98 lines
1 jQuery(document).ready(function() {
2
3 // You can override the icon names here, in case you prefer your own or have URL issues:
4 // E.g. "http://mysite.com/cross.png/images/cross.png" would have "cross.png" replaced twice...
5 // Styling should be done in your custom CSS
6 var cookie_bar_on_icon = "tick.png";
7 var cookie_bar_off_icon = "cross.png";
8
9 // jQuery only CSS:
10 jQuery('HTML').addClass('JS');
11
12 /*
13 Work in progress... open same tab position between saves
14 If you are a web developer and fancy beating me to this, please get in touch... :)
15
16 DONE:
17 if 'cliopentab' GET param is set:
18 find out value of 'cliopentab'
19 call accordion with 'cliopentab' value
20
21 TO DO:
22 on accordion changing the active div:
23 update form action with &cliopentab= <div number>:
24 parse form action
25 if 'cliopentab' GET param is set:
26 update 'cliopentab' value with <div number>
27 else:
28 add &cliopentab= <div number>
29 */
30 function getURLParameter(name) {
31 return decodeURI(
32 (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
33 );
34 }
35 switch ( getURLParameter("cliopentab") ) {
36 case "0":
37 jQuery("#cookielawinfo-accordion").accordion( { autoHeight: false, active: 0 } );
38 break;
39 case "2":
40 jQuery("#cookielawinfo-accordion").accordion( { autoHeight: false, active: 2 } );
41 break;
42 case "3":
43 jQuery("#cookielawinfo-accordion").accordion( { autoHeight: false, active: 3 } );
44 break;
45 case "1":
46 default:
47 jQuery("#cookielawinfo-accordion").accordion( { autoHeight: false, active: 1 } );
48 }
49
50
51 // Cookie bar is on/off message handling:
52 var f = jQuery("#header_on_off_alert");
53 var t = jQuery("#header_on_off_field_warning");
54 var icon = jQuery("#cli-plugin-status-icon");
55
56 jQuery('#is_on_field_yes').click(function(){
57 // Cookie bar is on
58 f.text("Your Cookie Law Info bar is switched on");
59 t.text("Your Cookie Law Info bar is switched on");
60 t.removeClass('warning');
61 swap_icon( cookie_bar_on_icon );
62 });
63 jQuery('#is_on_field_no').click(function(){
64 // Cookie bar is off
65 f.text("Your Cookie Law Info bar is switched off");
66 t.text("Your Cookie Law Info bar is switched off");
67 t.addClass('warning');
68 swap_icon( cookie_bar_off_icon );
69 });
70 function swap_icon(new_icon) {
71 old_icon = ( new_icon == cookie_bar_off_icon ) ? cookie_bar_on_icon : cookie_bar_off_icon;
72 var original_src = icon.attr('src');
73 var new_src = original_src.replace(old_icon, new_icon);
74 icon.attr('src', new_src);
75 }
76
77
78 // Toggle admin display to show/hide action/URL fields
79 var rows = jQuery('.cli-plugin-row');
80 var combobox = jQuery('#cli-plugin-button-1-action');
81
82 toggle_combobox();
83
84 combobox.change(function() {
85 toggle_combobox();
86 });
87
88 function toggle_combobox() {
89 var selected = jQuery("#cli-plugin-button-1-action option:selected").val();
90 if ( selected == "CONSTANT_OPEN_URL" ) {
91 rows.show();
92 }
93 else {
94 rows.hide();
95 }
96 }
97
98 });