Version Description
- Cookie notice as
Widget
option added
Download this release
Release Info
Developer | webtoffee |
Plugin | Cookie Law / GDPR Info |
Version | 1.7.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.9 to 1.7.1
- README.txt +37 -27
- admin/class-cookie-law-info-admin.php +20 -11
- admin/js/cookie-law-info-admin.js +15 -2
- admin/views/admin-settings-general.php +98 -40
- admin/views/goto-pro.php +3 -3
- cookie-law-info.php +3 -3
- includes/class-cookie-law-info-activator.php +2 -0
- includes/class-cookie-law-info.php +26 -8
- public/class-cookie-law-info-public.php +1 -2
- public/css/cookie-law-info-public.css +4 -2
- public/js/cookie-law-info-public.js +122 -38
- public/views/cookie-law-info_bar.php +2 -2
README.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== GDPR Cookie Consent ===
|
2 |
-
Contributors: webtoffee,
|
3 |
Donate link: https://www.webtoffee.com/plugins/
|
4 |
Tags: eu cookie law, GDPR, cookie law, cookie consent, eu privacy directive, privacy directive, cookies, privacy, compliance
|
5 |
Requires at least: 3.3.1
|
6 |
Tested up to: 4.9.8
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -53,27 +53,26 @@ Features:
|
|
53 |
<blockquote>
|
54 |
|
55 |
= GDPR Cookie Consent Premium Version Features =
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
</ul>
|
77 |
|
78 |
For complete list of features and details, Please visit <a rel="nofollow" href="https://www.webtoffee.com/product/gdpr-cookie-consent/">GDPR Cookie Consent Premium Plugin</a> for more details
|
79 |
|
@@ -173,6 +172,18 @@ See http://cookielawinfo.com for more information on what is required.
|
|
173 |
|
174 |
== Changelog ==
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
|
177 |
= 1.6.9 =
|
178 |
|
@@ -331,7 +342,6 @@ See http://cookielawinfo.com for more information on what is required.
|
|
331 |
|
332 |
== Upgrade Notice ==
|
333 |
|
334 |
-
= 1.
|
335 |
-
|
336 |
-
*
|
337 |
-
* Option to choose from the built-in pages for 'Read More' link.
|
1 |
=== GDPR Cookie Consent ===
|
2 |
+
Contributors: webtoffee,markwt
|
3 |
Donate link: https://www.webtoffee.com/plugins/
|
4 |
Tags: eu cookie law, GDPR, cookie law, cookie consent, eu privacy directive, privacy directive, cookies, privacy, compliance
|
5 |
Requires at least: 3.3.1
|
6 |
Tested up to: 4.9.8
|
7 |
+
Stable tag: 1.7.1
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
53 |
<blockquote>
|
54 |
|
55 |
= GDPR Cookie Consent Premium Version Features =
|
56 |
+
✅ Manage list of cookies ( Name, CookieID, Description, Duration, Type, Category, Header Script, Footer Script).
|
57 |
+
✅ Manage Cookie Categories.
|
58 |
+
✅ Scan and auto block scripts - Google Analytics, FB Pixel, Google tag manager.
|
59 |
+
✅ Location based exclusion of cookie notice for EU countries.
|
60 |
+
✅ Provide the users with the granular control over the cookies/scipts used by the website.
|
61 |
+
✅ Optionally log users' consent and export into a CSV file.
|
62 |
+
✅ Customize the privacy overview in the cookie settings popup.
|
63 |
+
✅ Export/import cookies and related information via CSV file.
|
64 |
+
✅ Scan and import/export the cookies
|
65 |
+
✅ Allow to display cookie cettings popup where site visitors can opt-in or give consent to cookie categories.
|
66 |
+
✅ Customisable to look just like your own website’s style: customise the colours, styles and fonts.
|
67 |
+
✅ Put the cookie bar in either the header or the footer.
|
68 |
+
✅ Cookie bar preview in admin settings
|
69 |
+
✅ (Optional) accept cookie policy if the user scrolls.
|
70 |
+
✅ (Optional) automatically close the cookie bar after a delay (delay is configurable).
|
71 |
+
✅ (Optional) cookie bar can be permanently dismissed or accessible through a “show again” tab.
|
72 |
+
✅ (Optional) “show again” tab is fully customisable including position shown on page and styles.
|
73 |
+
✅ “Cookie Audit” shortcode to construct a nicely-styled ‘Privacy & Cookie Policy’.
|
74 |
+
✅ WPML compatible
|
75 |
+
✅ qTranslate support
|
|
|
76 |
|
77 |
For complete list of features and details, Please visit <a rel="nofollow" href="https://www.webtoffee.com/product/gdpr-cookie-consent/">GDPR Cookie Consent Premium Plugin</a> for more details
|
78 |
|
172 |
|
173 |
== Changelog ==
|
174 |
|
175 |
+
= 1.7.1 =
|
176 |
+
|
177 |
+
* Cookie notice as `Widget` option added
|
178 |
+
|
179 |
+
= 1.7.0 =
|
180 |
+
|
181 |
+
* Bug: Submenu sorting issue for custom user roles
|
182 |
+
|
183 |
+
= 1.6.10 =
|
184 |
+
|
185 |
+
* Bug: submenu sorting issue for non administrator accounts
|
186 |
+
* Bug: Flashing the cookie bar on page load.
|
187 |
|
188 |
= 1.6.9 =
|
189 |
|
342 |
|
343 |
== Upgrade Notice ==
|
344 |
|
345 |
+
= 1.7.1 =
|
346 |
+
|
347 |
+
* Cookie notice as `Widget` option added
|
|
admin/class-cookie-law-info-admin.php
CHANGED
@@ -154,20 +154,26 @@ class Cookie_Law_Info_Admin {
|
|
154 |
array($this,'admin_non_necessary_cookie_page')
|
155 |
);
|
156 |
//rearrange settings menu
|
157 |
-
$
|
158 |
-
$back_up_settings_menu=array();
|
159 |
-
foreach ($submenu['edit.php?post_type='.CLI_POST_TYPE] as $key => $value)
|
160 |
{
|
161 |
-
|
|
|
|
|
162 |
{
|
163 |
-
$
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
}
|
169 |
-
array_unshift($out,$back_up_settings_menu);
|
170 |
-
$submenu['edit.php?post_type='.CLI_POST_TYPE]=$out;
|
171 |
}
|
172 |
|
173 |
public function plugin_action_links( $links )
|
@@ -428,7 +434,10 @@ class Cookie_Law_Info_Admin {
|
|
428 |
function remove_cli_addnew_link()
|
429 |
{
|
430 |
global $submenu;
|
431 |
-
|
|
|
|
|
|
|
432 |
}
|
433 |
|
434 |
|
154 |
array($this,'admin_non_necessary_cookie_page')
|
155 |
);
|
156 |
//rearrange settings menu
|
157 |
+
if(isset($submenu) && !empty($submenu) && is_array($submenu))
|
|
|
|
|
158 |
{
|
159 |
+
$out=array();
|
160 |
+
$back_up_settings_menu=array();
|
161 |
+
if(isset($submenu['edit.php?post_type='.CLI_POST_TYPE]) && is_array($submenu['edit.php?post_type='.CLI_POST_TYPE]))
|
162 |
{
|
163 |
+
foreach ($submenu['edit.php?post_type='.CLI_POST_TYPE] as $key => $value)
|
164 |
+
{
|
165 |
+
if($value[2]=='cookie-law-info')
|
166 |
+
{
|
167 |
+
$back_up_settings_menu=$value;
|
168 |
+
}else
|
169 |
+
{
|
170 |
+
$out[$key]=$value;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
array_unshift($out,$back_up_settings_menu);
|
174 |
+
$submenu['edit.php?post_type='.CLI_POST_TYPE]=$out;
|
175 |
}
|
176 |
}
|
|
|
|
|
177 |
}
|
178 |
|
179 |
public function plugin_action_links( $links )
|
434 |
function remove_cli_addnew_link()
|
435 |
{
|
436 |
global $submenu;
|
437 |
+
if(isset($submenu) && !empty($submenu) && is_array($submenu))
|
438 |
+
{
|
439 |
+
unset($submenu['edit.php?post_type='.CLI_POST_TYPE][10]);
|
440 |
+
}
|
441 |
}
|
442 |
|
443 |
|
admin/js/cookie-law-info-admin.js
CHANGED
@@ -205,9 +205,22 @@
|
|
205 |
var vl=elm.val();
|
206 |
var trgt=elm.attr('cli_frm_tgl-target');
|
207 |
$('[cli_frm_tgl-id="'+trgt+'"]').hide();
|
208 |
-
|
209 |
return $(this).attr('cli_frm_tgl-val')==vl;
|
210 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
}
|
212 |
}
|
213 |
$('#button_2_page_field').on('change',function(){
|
205 |
var vl=elm.val();
|
206 |
var trgt=elm.attr('cli_frm_tgl-target');
|
207 |
$('[cli_frm_tgl-id="'+trgt+'"]').hide();
|
208 |
+
var selcted_trget=$('[cli_frm_tgl-id="'+trgt+'"]').filter(function(){
|
209 |
return $(this).attr('cli_frm_tgl-val')==vl;
|
210 |
+
});
|
211 |
+
selcted_trget.show();
|
212 |
+
selcted_trget.find('th').each(function(){
|
213 |
+
var prnt=$(this).parent('tr');
|
214 |
+
var sub_lvl=1;
|
215 |
+
if(typeof prnt.attr('cli_frm_tgl-lvl') !== typeof undefined && prnt.attr('cli_frm_tgl-lvl') !== false)
|
216 |
+
{
|
217 |
+
sub_lvl=prnt.attr('cli_frm_tgl-lvl');
|
218 |
+
}
|
219 |
+
var lft_margin=sub_lvl*15;
|
220 |
+
$(this).find('label').css({'margin-left':'0px'}).stop(true,true).animate({'margin-left':lft_margin+'px'});
|
221 |
+
});
|
222 |
+
|
223 |
+
|
224 |
}
|
225 |
}
|
226 |
$('#button_2_page_field').on('change',function(){
|
admin/views/admin-settings-general.php
CHANGED
@@ -13,59 +13,89 @@ if ( ! defined( 'WPINC' ) ) {
|
|
13 |
<div class="cli_sub_tab_container">
|
14 |
<div class="cli_sub_tab_content" data-id="cookie-bar" style="display:block;">
|
15 |
<h3><?php _e('Cookie Bar','cookie-law-info');?></h3>
|
|
|
16 |
<table class="form-table">
|
17 |
<tr valign="top">
|
18 |
-
<th scope="row"><label for="is_on_field"><?php _e('Cookie Bar is currently:', 'cookie-law-info'); ?></label></th>
|
19 |
<td>
|
20 |
<input type="radio" id="is_on_field_yes" name="is_on_field" class="styled cli_bar_on" value="true" <?php echo ( $the_options['is_on'] == true ) ? ' checked="checked"' : ''; ?> /><?php _e('On', 'cookie-law-info'); ?>
|
21 |
<input type="radio" id="is_on_field_no" name="is_on_field" class="styled" value="false" <?php echo ( $the_options['is_on'] == false ) ? ' checked="checked" ' : ''; ?> /><?php _e('Off', 'cookie-law-info'); ?>
|
22 |
</td>
|
23 |
</tr>
|
24 |
<tr valign="top">
|
25 |
-
<th scope="row"><label for="
|
26 |
<td>
|
27 |
-
<select name="
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
38 |
</select>
|
39 |
</td>
|
40 |
</tr>
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
<!-- /header_fix -->
|
51 |
|
52 |
-
<tr valign="top">
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
<tr valign="top" cli_frm_tgl-id="cli_bar_popup" cli_frm_tgl-val="true">
|
61 |
-
<th scope="row"><label for="popup_overlay_field"><?php _e('Add overlay?', 'cookie-law-info'); ?></label></th>
|
62 |
-
<td>
|
63 |
-
<input type="radio" id="popup_overlay_field_yes" name="popup_overlay_field" class="styled" value="true" <?php echo ( $the_options['popup_overlay'] == true ) ? ' checked="checked"' : ''; ?> /> <?php _e('Yes', 'cookie-law-info'); ?>
|
64 |
-
<input type="radio" id="popup_overlay_field_no" name="popup_overlay_field" class="styled" value="false" <?php echo ( $the_options['popup_overlay'] == false ) ? ' checked="checked"' : ''; ?> /> <?php _e('No', 'cookie-law-info'); ?>
|
65 |
-
<span class="cli_form_help"><?php _e('When the popup is active, an overlay will block the user from browsing the site.', 'cookie-law-info'); ?></span>
|
66 |
-
<span class="cli_form_er cli_scroll_accept_er"><?php _e('`Accept on scroll` will not work along with this option.', 'cookie-law-info'); ?></span>
|
67 |
-
</td>
|
68 |
-
</tr>
|
69 |
<tr valign="top">
|
70 |
<th scope="row"><label for="notify_animate_show_field"><?php _e('On load', 'cookie-law-info'); ?></label></th>
|
71 |
<td>
|
@@ -126,6 +156,9 @@ if ( ! defined( 'WPINC' ) ) {
|
|
126 |
</td>
|
127 |
</tr>
|
128 |
</table>
|
|
|
|
|
|
|
129 |
</div>
|
130 |
<div class="cli_sub_tab_content" data-id="show-again">
|
131 |
<h3><?php _e('Show Again Tab','cookie-law-info');?></h3>
|
@@ -137,7 +170,8 @@ if ( ! defined( 'WPINC' ) ) {
|
|
137 |
<input type="radio" id="showagain_tab_field_no" name="showagain_tab_field" class="styled" value="false" <?php echo ( $the_options['showagain_tab'] == false ) ? ' checked="checked" ' : ''; ?> /> <?php _e('No', 'cookie-law-info'); ?>
|
138 |
</td>
|
139 |
</tr>
|
140 |
-
|
|
|
141 |
<th scope="row"><label for="notify_position_horizontal_field"><?php _e('Tab Position', 'cookie-law-info'); ?></label></th>
|
142 |
<td>
|
143 |
<select name="notify_position_horizontal_field" class="vvv_combobox">
|
@@ -153,6 +187,30 @@ if ( ! defined( 'WPINC' ) ) {
|
|
153 |
</select>
|
154 |
</td>
|
155 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
<tr valign="top">
|
157 |
<th scope="row"><label for="showagain_x_position_field"><?php _e('From Left Margin', 'cookie-law-info'); ?></label></th>
|
158 |
<td>
|
13 |
<div class="cli_sub_tab_container">
|
14 |
<div class="cli_sub_tab_content" data-id="cookie-bar" style="display:block;">
|
15 |
<h3><?php _e('Cookie Bar','cookie-law-info');?></h3>
|
16 |
+
|
17 |
<table class="form-table">
|
18 |
<tr valign="top">
|
19 |
+
<th scope="row" style="width:250px;"><label for="is_on_field"><?php _e('Cookie Bar is currently:', 'cookie-law-info'); ?></label></th>
|
20 |
<td>
|
21 |
<input type="radio" id="is_on_field_yes" name="is_on_field" class="styled cli_bar_on" value="true" <?php echo ( $the_options['is_on'] == true ) ? ' checked="checked"' : ''; ?> /><?php _e('On', 'cookie-law-info'); ?>
|
22 |
<input type="radio" id="is_on_field_no" name="is_on_field" class="styled" value="false" <?php echo ( $the_options['is_on'] == false ) ? ' checked="checked" ' : ''; ?> /><?php _e('Off', 'cookie-law-info'); ?>
|
23 |
</td>
|
24 |
</tr>
|
25 |
<tr valign="top">
|
26 |
+
<th scope="row"><label for="cookie_bar_as_field"><?php _e('Cookie bar as', 'cookie-law-info'); ?></label></th>
|
27 |
<td>
|
28 |
+
<select name="cookie_bar_as_field" class="vvv_combobox cli_form_toggle" cli_frm_tgl-target="cli_bar_type">
|
29 |
+
<?php
|
30 |
+
$cookie_bar_as=$the_options['cookie_bar_as'];
|
31 |
+
?>
|
32 |
+
<option value="banner" <?php echo $cookie_bar_as=='banner' ? 'selected' : ''; ?>>
|
33 |
+
<?php _e('Banner', 'cookie-law-info'); ?>
|
34 |
+
</option>
|
35 |
+
<option value="popup" <?php echo $cookie_bar_as=='popup' ? 'selected' : ''; ?>>
|
36 |
+
<?php _e('Popup', 'cookie-law-info'); ?>
|
37 |
+
</option>
|
38 |
+
<option value="widget" <?php echo $cookie_bar_as=='widget' ? 'selected' : ''; ?>>
|
39 |
+
<?php _e('Widget', 'cookie-law-info'); ?>
|
40 |
+
</option>
|
41 |
</select>
|
42 |
</td>
|
43 |
</tr>
|
44 |
+
<tr valign="top" cli_frm_tgl-id="cli_bar_type" cli_frm_tgl-val="widget">
|
45 |
+
<th scope="row"><label for="widget_position_field"><?php _e('Position', 'cookie-law-info'); ?></label></th>
|
46 |
+
<td>
|
47 |
+
<select name="widget_position_field" id="widget_position_field" class="vvv_combobox">
|
48 |
+
<option value="left">Left</option>
|
49 |
+
<option value="right">Right</option>
|
50 |
+
</select>
|
51 |
+
</td>
|
52 |
+
</tr>
|
|
|
53 |
|
54 |
+
<tr valign="top" cli_frm_tgl-id="cli_bar_type" cli_frm_tgl-val="popup">
|
55 |
+
<th scope="row"><label for="popup_overlay_field"><?php _e('Add overlay?', 'cookie-law-info'); ?></label></th>
|
56 |
+
<td>
|
57 |
+
<input type="radio" id="popup_overlay_field_yes" name="popup_overlay_field" class="styled" value="true" <?php echo ( $the_options['popup_overlay'] == true ) ? ' checked="checked"' : ''; ?> /> <?php _e('Yes', 'cookie-law-info'); ?>
|
58 |
+
<input type="radio" id="popup_overlay_field_no" name="popup_overlay_field" class="styled" value="false" <?php echo ( $the_options['popup_overlay'] == false ) ? ' checked="checked"' : ''; ?> /> <?php _e('No', 'cookie-law-info'); ?>
|
59 |
+
<span class="cli_form_help"><?php _e('When the popup is active, an overlay will block the user from browsing the site.', 'cookie-law-info'); ?></span>
|
60 |
+
<span class="cli_form_er cli_scroll_accept_er"><?php _e('`Accept on scroll` will not work along with this option.', 'cookie-law-info'); ?></span>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
|
64 |
+
<tr valign="top" cli_frm_tgl-id="cli_bar_type" cli_frm_tgl-val="banner" cli_frm_tgl-lvl="1">
|
65 |
+
<th scope="row"><label for="notify_position_vertical_field"><?php _e('Cookie Bar will be shown in:', 'cookie-law-info'); ?></label></th>
|
66 |
+
<td>
|
67 |
+
<select name="notify_position_vertical_field" class="vvv_combobox cli_form_toggle" cli_frm_tgl-target="cli_bar_pos">
|
68 |
+
<?php
|
69 |
+
if ($the_options['notify_position_vertical'] == "top")
|
70 |
+
{
|
71 |
+
echo '<option value="top" selected="selected">' . __('Header', 'cookie-law-info') . '</option>';
|
72 |
+
echo '<option value="bottom">' . __('Footer', 'cookie-law-info') . '</option>';
|
73 |
+
} else {
|
74 |
+
echo '<option value="top">' . __('Header', 'cookie-law-info') . '</option>';
|
75 |
+
echo '<option value="bottom" selected="selected">' . __('Footer', 'cookie-law-info') . '</option>';
|
76 |
+
}
|
77 |
+
?>
|
78 |
+
</select>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
<!-- header_fix code here -->
|
82 |
+
<tr valign="top" cli_frm_tgl-id="cli_bar_type" cli_frm_tgl-val="banner" cli_frm_tgl-lvl="1">
|
83 |
+
<td colspan="2" style="padding: 0px;">
|
84 |
+
<table>
|
85 |
+
<tr valign="top" cli_frm_tgl-id="cli_bar_pos" cli_frm_tgl-val="top" cli_frm_tgl-lvl="2">
|
86 |
+
<th scope="row" style="width:250px;">
|
87 |
+
<label for="header_fix_field"><?php _e('Fix Cookie Bar to Header?', 'cookie-law-info'); ?></label></th>
|
88 |
+
<td>
|
89 |
+
<input type="radio" id="header_fix_field_yes" name="header_fix_field" class="styled" value="true" <?php echo ( $the_options['header_fix'] == true ) ? ' checked="checked"' : ''; ?> /> <?php _e('Yes', 'cookie-law-info'); ?>
|
90 |
+
<input type="radio" id="iheader_fix_field_no" name="header_fix_field" class="styled" value="false" <?php echo ( $the_options['header_fix'] == false ) ? ' checked="checked"' : ''; ?> /> <?php _e('No', 'cookie-law-info'); ?>
|
91 |
+
<span class="cli_form_help"><?php _e('If you select "Header" then you can optionally stick the cookie bar to the header. Will not have any effect if you select "Footer".', 'cookie-law-info'); ?></span>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
</table>
|
95 |
+
</td>
|
96 |
+
</tr>
|
97 |
+
<!-- /header_fix -->
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
<tr valign="top">
|
100 |
<th scope="row"><label for="notify_animate_show_field"><?php _e('On load', 'cookie-law-info'); ?></label></th>
|
101 |
<td>
|
156 |
</td>
|
157 |
</tr>
|
158 |
</table>
|
159 |
+
|
160 |
+
|
161 |
+
|
162 |
</div>
|
163 |
<div class="cli_sub_tab_content" data-id="show-again">
|
164 |
<h3><?php _e('Show Again Tab','cookie-law-info');?></h3>
|
170 |
<input type="radio" id="showagain_tab_field_no" name="showagain_tab_field" class="styled" value="false" <?php echo ( $the_options['showagain_tab'] == false ) ? ' checked="checked" ' : ''; ?> /> <?php _e('No', 'cookie-law-info'); ?>
|
171 |
</td>
|
172 |
</tr>
|
173 |
+
|
174 |
+
<tr valign="top" cli_frm_tgl-id="cli_bar_type" cli_frm_tgl-val="banner" cli_frm_tgl-lvl="0">
|
175 |
<th scope="row"><label for="notify_position_horizontal_field"><?php _e('Tab Position', 'cookie-law-info'); ?></label></th>
|
176 |
<td>
|
177 |
<select name="notify_position_horizontal_field" class="vvv_combobox">
|
187 |
</select>
|
188 |
</td>
|
189 |
</tr>
|
190 |
+
|
191 |
+
<tr valign="top" cli_frm_tgl-id="cli_bar_type" cli_frm_tgl-val="popup" cli_frm_tgl-lvl="0">
|
192 |
+
<th scope="row"><label for="popup_showagain_position_field"><?php _e('Tab Position', 'cookie-law-info'); ?></label></th>
|
193 |
+
<td>
|
194 |
+
<select name="popup_showagain_position_field" class="vvv_combobox">
|
195 |
+
<?php
|
196 |
+
$pp_sa_pos=$the_options['popup_showagain_position'];
|
197 |
+
?>
|
198 |
+
<option value="bottom-right" <?php echo $pp_sa_pos=='bottom-right' ? 'selected' : ''; ?>>
|
199 |
+
<?php _e('Bottom Right', 'cookie-law-info') ?>
|
200 |
+
</option>
|
201 |
+
<option value="bottom-left" <?php echo $pp_sa_pos=='bottom-left' ? 'selected' : ''; ?>>
|
202 |
+
<?php _e('Bottom Left', 'cookie-law-info') ?>
|
203 |
+
</option>
|
204 |
+
<option value="top-right" <?php echo $pp_sa_pos=='top-right' ? 'selected' : ''; ?>>
|
205 |
+
<?php _e('Top Right', 'cookie-law-info') ?>
|
206 |
+
</option>
|
207 |
+
<option value="top-left" <?php echo $pp_sa_pos=='top-left' ? 'selected' : ''; ?>>
|
208 |
+
<?php _e('Top Left', 'cookie-law-info') ?>
|
209 |
+
</option>
|
210 |
+
</select>
|
211 |
+
</td>
|
212 |
+
</tr>
|
213 |
+
|
214 |
<tr valign="top">
|
215 |
<th scope="row"><label for="showagain_x_position_field"><?php _e('From Left Margin', 'cookie-law-info'); ?></label></th>
|
216 |
<td>
|
admin/views/goto-pro.php
CHANGED
@@ -82,15 +82,15 @@
|
|
82 |
<li><?php echo __("Optionally log users' consent and export into a CSV file.","cookie-law-info"); ?></li>
|
83 |
<li><?php echo __("Customize the privacy overview in the cookie settings popup.","cookie-law-info"); ?></li>
|
84 |
<li><?php echo __("Export/import cookies and related information via CSV file.","cookie-law-info"); ?></li>
|
85 |
-
<li><?php echo __("Scan and import/export the cookies in the
|
86 |
<li><?php echo __('Allow to display cookie settings popup where site visitors can opt-in or give consent to cookie categories.','cookie-law-info'); ?></li>
|
87 |
-
<li><?php echo __('
|
88 |
<li><?php echo __('Put the cookie bar in either the header or the footer.','cookie-law-info'); ?></li>
|
89 |
</ul>
|
90 |
<br/>
|
91 |
</p>
|
92 |
<p style="text-align: center;">
|
93 |
-
<a href="
|
94 |
</p>
|
95 |
</div>
|
96 |
|
82 |
<li><?php echo __("Optionally log users' consent and export into a CSV file.","cookie-law-info"); ?></li>
|
83 |
<li><?php echo __("Customize the privacy overview in the cookie settings popup.","cookie-law-info"); ?></li>
|
84 |
<li><?php echo __("Export/import cookies and related information via CSV file.","cookie-law-info"); ?></li>
|
85 |
+
<li><?php echo __("Scan and import/export the cookies in the website.","cookie-law-info"); ?></li>
|
86 |
<li><?php echo __('Allow to display cookie settings popup where site visitors can opt-in or give consent to cookie categories.','cookie-law-info'); ?></li>
|
87 |
+
<li><?php echo __('Cookie bar preview in admin settings page.','cookie-law-info'); ?></li>
|
88 |
<li><?php echo __('Put the cookie bar in either the header or the footer.','cookie-law-info'); ?></li>
|
89 |
</ul>
|
90 |
<br/>
|
91 |
</p>
|
92 |
<p style="text-align: center;">
|
93 |
+
<a href="https://www.webtoffee.com/category/documentation/gdpr-cookie-consent/" target="_blank" class="cli-button cli-button-documentation" style=" color: #555 !important;"><?php echo __('Documentation','cookie-law-info'); ?></a>
|
94 |
</p>
|
95 |
</div>
|
96 |
|
cookie-law-info.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: GDPR Cookie Consent
|
17 |
* Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
|
18 |
* Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
|
19 |
-
* Version: 1.
|
20 |
* Author: WebToffee
|
21 |
* Author URI: http://cookielawinfo.com/
|
22 |
* License: GPLv3
|
@@ -63,7 +63,7 @@ define ( 'CLI_POST_TYPE','cookielawinfo');
|
|
63 |
* Currently plugin version.
|
64 |
* Rename this for your plugin and update it as you release new versions.
|
65 |
*/
|
66 |
-
define( 'CLI_VERSION', '1.
|
67 |
|
68 |
|
69 |
/**
|
@@ -120,7 +120,7 @@ function uninstall_cookie_law_info()
|
|
120 |
{
|
121 |
delete_post_meta( $post->ID, "_cli_cookie_type", $custom["_cli_cookie_type"][0] );
|
122 |
}
|
123 |
-
if
|
124 |
{
|
125 |
delete_post_meta( $post->ID, "_cli_cookie_duration", $custom["_cli_cookie_duration"][0] );
|
126 |
}
|
16 |
* Plugin Name: GDPR Cookie Consent
|
17 |
* Plugin URI: https://www.webtoffee.com/product/gdpr-cookie-consent/
|
18 |
* Description: A simple way to show your website complies with the EU Cookie Law / GDPR.
|
19 |
+
* Version: 1.7.1
|
20 |
* Author: WebToffee
|
21 |
* Author URI: http://cookielawinfo.com/
|
22 |
* License: GPLv3
|
63 |
* Currently plugin version.
|
64 |
* Rename this for your plugin and update it as you release new versions.
|
65 |
*/
|
66 |
+
define( 'CLI_VERSION', '1.7.1' );
|
67 |
|
68 |
|
69 |
/**
|
120 |
{
|
121 |
delete_post_meta( $post->ID, "_cli_cookie_type", $custom["_cli_cookie_type"][0] );
|
122 |
}
|
123 |
+
if(isset( $custom["_cli_cookie_duration"][0] ) )
|
124 |
{
|
125 |
delete_post_meta( $post->ID, "_cli_cookie_duration", $custom["_cli_cookie_duration"][0] );
|
126 |
}
|
includes/class-cookie-law-info-activator.php
CHANGED
@@ -41,12 +41,14 @@ class Cookie_Law_Info_Activator {
|
|
41 |
{
|
42 |
switch_to_blog( $blog_id );
|
43 |
self::install_tables();
|
|
|
44 |
restore_current_blog();
|
45 |
}
|
46 |
}
|
47 |
else
|
48 |
{
|
49 |
self::install_tables();
|
|
|
50 |
}
|
51 |
|
52 |
}
|
41 |
{
|
42 |
switch_to_blog( $blog_id );
|
43 |
self::install_tables();
|
44 |
+
Cookie_Law_Info::cli_patches();
|
45 |
restore_current_blog();
|
46 |
}
|
47 |
}
|
48 |
else
|
49 |
{
|
50 |
self::install_tables();
|
51 |
+
Cookie_Law_Info::cli_patches();
|
52 |
}
|
53 |
|
54 |
}
|
includes/class-cookie-law-info.php
CHANGED
@@ -76,7 +76,7 @@ class Cookie_Law_Info {
|
|
76 |
}
|
77 |
else
|
78 |
{
|
79 |
-
$this->version = '1.
|
80 |
}
|
81 |
$this->plugin_name = 'cookie-law-info';
|
82 |
|
@@ -84,7 +84,7 @@ class Cookie_Law_Info {
|
|
84 |
$this->set_locale();
|
85 |
$this->define_admin_hooks();
|
86 |
$this->define_public_hooks();
|
87 |
-
|
88 |
}
|
89 |
|
90 |
/**
|
@@ -376,9 +376,9 @@ class Cookie_Law_Info {
|
|
376 |
|
377 |
'font_family' => 'inherit', // Pick the family, not the easy name (see helper function below)
|
378 |
'header_fix' => false,
|
379 |
-
'is_on'
|
380 |
-
|
381 |
-
'logging_on'
|
382 |
'notify_animate_hide' => true,
|
383 |
'notify_animate_show' => false,
|
384 |
'notify_div_id' => '#cookie-law-info-bar',
|
@@ -400,9 +400,12 @@ class Cookie_Law_Info {
|
|
400 |
'show_once_yn' => false, // this is a new feature so default = switched off
|
401 |
'show_once' => '10000', // 8 seconds
|
402 |
'is_GMT_on' => true,
|
403 |
-
'as_popup' => false,
|
404 |
-
'popup_overlay' => true,
|
405 |
'bar_heading_text' =>'',
|
|
|
|
|
|
|
406 |
);
|
407 |
return $key!="" ? $settings_v0_9[$key] : $settings_v0_9;
|
408 |
}
|
@@ -468,6 +471,9 @@ class Cookie_Law_Info {
|
|
468 |
'as_popup'=>$settings['as_popup'],
|
469 |
'popup_overlay'=>$settings['popup_overlay'],
|
470 |
'bar_heading_text'=>$settings['bar_heading_text'],
|
|
|
|
|
|
|
471 |
);
|
472 |
$str = json_encode( $slim_settings );
|
473 |
/*
|
@@ -801,7 +807,18 @@ class Cookie_Law_Info {
|
|
801 |
{
|
802 |
$options=self::get_settings();
|
803 |
|
804 |
-
//========
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
805 |
$message_bar_text=$options['notify_message'];
|
806 |
//user turned on the reject button with his previous settings
|
807 |
if(isset($options['is_reject_on']) && $options['is_reject_on']==true)
|
@@ -832,6 +849,7 @@ class Cookie_Law_Info {
|
|
832 |
}
|
833 |
//---------reject button missing issue------------
|
834 |
|
|
|
835 |
$bar_version='1.6.6';
|
836 |
$bar_heading_version = get_option('cli_heading_version');
|
837 |
if($bar_heading_version!=$bar_version)
|
76 |
}
|
77 |
else
|
78 |
{
|
79 |
+
$this->version = '1.7.1';
|
80 |
}
|
81 |
$this->plugin_name = 'cookie-law-info';
|
82 |
|
84 |
$this->set_locale();
|
85 |
$this->define_admin_hooks();
|
86 |
$this->define_public_hooks();
|
87 |
+
//$this->cli_patches();
|
88 |
}
|
89 |
|
90 |
/**
|
376 |
|
377 |
'font_family' => 'inherit', // Pick the family, not the easy name (see helper function below)
|
378 |
'header_fix' => false,
|
379 |
+
'is_on' => true,
|
380 |
+
'is_eu_on' => false,
|
381 |
+
'logging_on' => false,
|
382 |
'notify_animate_hide' => true,
|
383 |
'notify_animate_show' => false,
|
384 |
'notify_div_id' => '#cookie-law-info-bar',
|
400 |
'show_once_yn' => false, // this is a new feature so default = switched off
|
401 |
'show_once' => '10000', // 8 seconds
|
402 |
'is_GMT_on' => true,
|
403 |
+
'as_popup' => false, // version 1.7.1 onwards this option is merged with `cookie_bar_as`
|
404 |
+
'popup_overlay' => true, //
|
405 |
'bar_heading_text' =>'',
|
406 |
+
'cookie_bar_as' =>'banner',
|
407 |
+
'popup_showagain_position' =>'bottom-right', //bottom-right | bottom-left | top-right | top-left
|
408 |
+
'widget_position' =>'left', //left | right
|
409 |
);
|
410 |
return $key!="" ? $settings_v0_9[$key] : $settings_v0_9;
|
411 |
}
|
471 |
'as_popup'=>$settings['as_popup'],
|
472 |
'popup_overlay'=>$settings['popup_overlay'],
|
473 |
'bar_heading_text'=>$settings['bar_heading_text'],
|
474 |
+
'cookie_bar_as'=>$settings['cookie_bar_as'],
|
475 |
+
'popup_showagain_position'=>$settings['popup_showagain_position'],
|
476 |
+
'widget_position'=>$settings['widget_position'],
|
477 |
);
|
478 |
$str = json_encode( $slim_settings );
|
479 |
/*
|
807 |
{
|
808 |
$options=self::get_settings();
|
809 |
|
810 |
+
//========bar as widget=========@since 1.7.1
|
811 |
+
if($options['cookie_bar_as']=='banner' && $options['as_popup']==true) //the site in popup mode
|
812 |
+
{
|
813 |
+
$options['cookie_bar_as']='popup';
|
814 |
+
$options['as_popup']=false;
|
815 |
+
$options['popup_showagain_position']=$options['notify_position_vertical'].'-'.$options['notify_position_horizontal'];
|
816 |
+
update_option( CLI_SETTINGS_FIELD,$options);
|
817 |
+
}
|
818 |
+
|
819 |
+
|
820 |
+
|
821 |
+
//========reject button missing issue=========@since 1.6.7
|
822 |
$message_bar_text=$options['notify_message'];
|
823 |
//user turned on the reject button with his previous settings
|
824 |
if(isset($options['is_reject_on']) && $options['is_reject_on']==true)
|
849 |
}
|
850 |
//---------reject button missing issue------------
|
851 |
|
852 |
+
//bar heading text issue @since 1.6.7
|
853 |
$bar_version='1.6.6';
|
854 |
$bar_heading_version = get_option('cli_heading_version');
|
855 |
if($bar_heading_version!=$bar_version)
|
public/class-cookie-law-info-public.php
CHANGED
@@ -218,8 +218,7 @@ class Cookie_Law_Info_Public {
|
|
218 |
*/
|
219 |
public function cookielawinfo_inject_cli_script()
|
220 |
{
|
221 |
-
$the_options = Cookie_Law_Info::get_settings()
|
222 |
-
|
223 |
if ( $the_options['is_on'] == true )
|
224 |
{
|
225 |
// Output the HTML in the footer:
|
218 |
*/
|
219 |
public function cookielawinfo_inject_cli_script()
|
220 |
{
|
221 |
+
$the_options = Cookie_Law_Info::get_settings();
|
|
|
222 |
if ( $the_options['is_on'] == true )
|
223 |
{
|
224 |
// Output the HTML in the footer:
|
public/css/cookie-law-info-public.css
CHANGED
@@ -2,12 +2,14 @@
|
|
2 |
/*border: 0; */
|
3 |
font-size: 10pt;
|
4 |
margin: 0 auto;
|
5 |
-
padding: 10px
|
6 |
position: absolute;
|
7 |
text-align: center;
|
8 |
-
|
|
|
9 |
z-index: 9999;
|
10 |
box-shadow:rgba(0,0,0,.5) 0px 5px 50px;
|
|
|
11 |
}
|
12 |
#cookie-law-info-again {
|
13 |
font-size: 10pt;
|
2 |
/*border: 0; */
|
3 |
font-size: 10pt;
|
4 |
margin: 0 auto;
|
5 |
+
padding: 10px 10px;
|
6 |
position: absolute;
|
7 |
text-align: center;
|
8 |
+
box-sizing: border-box;
|
9 |
+
width:100%;
|
10 |
z-index: 9999;
|
11 |
box-shadow:rgba(0,0,0,.5) 0px 5px 50px;
|
12 |
+
display: none;
|
13 |
}
|
14 |
#cookie-law-info-again {
|
15 |
font-size: 10pt;
|
public/js/cookie-law-info-public.js
CHANGED
@@ -70,13 +70,11 @@ var CLI=
|
|
70 |
this.reject_link = jQuery('.cookie_action_close_header_reject');
|
71 |
this.delete_link=jQuery(".cookielawinfo-cookie-delete");
|
72 |
|
73 |
-
if(this.settings.
|
74 |
{
|
75 |
CLI_COOKIEBAR_AS_POPUP=true;
|
76 |
}
|
77 |
-
this.configShowAgain();
|
78 |
this.configBar();
|
79 |
-
this.attachStyles();
|
80 |
this.toggleBar();
|
81 |
this.attachDelete();
|
82 |
this.attachEvents();
|
@@ -190,7 +188,11 @@ var CLI=
|
|
190 |
{
|
191 |
if(CLI_COOKIEBAR_AS_POPUP)
|
192 |
{
|
193 |
-
this.barAsPopUp();
|
|
|
|
|
|
|
|
|
194 |
}
|
195 |
if(!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME))
|
196 |
{
|
@@ -217,11 +219,6 @@ var CLI=
|
|
217 |
});
|
218 |
});
|
219 |
},
|
220 |
-
attachStyles:function()
|
221 |
-
{
|
222 |
-
this.bar_elm.css(this.bar_config).hide();
|
223 |
-
this.showagain_elm.css(this.showagain_config);
|
224 |
-
},
|
225 |
configShowAgain:function()
|
226 |
{
|
227 |
this.showagain_config = {
|
@@ -236,13 +233,71 @@ var CLI=
|
|
236 |
this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border);
|
237 |
this.showagain_config[border_to_hide] = 'none';
|
238 |
}
|
239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
{
|
241 |
-
|
242 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
{
|
244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
245 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
},
|
247 |
configBar:function()
|
248 |
{
|
@@ -262,24 +317,8 @@ var CLI=
|
|
262 |
{
|
263 |
this.bar_config['bottom'] = '0';
|
264 |
}
|
265 |
-
|
266 |
-
|
267 |
-
if(this.settings.border_on)
|
268 |
-
{
|
269 |
-
this.bar_config['border-bottom'] = '2px solid ' +this.l1hs(this.settings.border);
|
270 |
-
}
|
271 |
-
this.showagain_config.top = '0';
|
272 |
-
}
|
273 |
-
else if(this.settings.notify_position_vertical == "bottom")
|
274 |
-
{
|
275 |
-
if(this.settings.border_on)
|
276 |
-
{
|
277 |
-
this.bar_config['border-top'] = '2px solid ' + this.l1hs(this.settings.border);
|
278 |
-
}
|
279 |
-
this.bar_config['position'] = 'fixed';
|
280 |
-
this.bar_config['bottom'] = '0';
|
281 |
-
this.showagain_config.bottom = '0';
|
282 |
-
}
|
283 |
},
|
284 |
l1hs:function(str)
|
285 |
{
|
@@ -430,7 +469,33 @@ var CLI=
|
|
430 |
jQuery(".cli-popupbar-overlay").addClass("cli-show");
|
431 |
}
|
432 |
},
|
433 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
{
|
435 |
if(typeof cookie_law_info_bar_as_popup==='function')
|
436 |
{
|
@@ -441,15 +506,11 @@ var CLI=
|
|
441 |
var cli_winh=cli_win.height()-40;
|
442 |
var cli_winw=cli_win.width();
|
443 |
var cli_defw=cli_winw>700 ? 500 : cli_winw-20;
|
444 |
-
//var cli_defw=cli_defw<500 ? 500 : cli_defw;
|
445 |
|
446 |
cli_elm.css({
|
447 |
'width':cli_defw,'height':'auto','max-height':cli_winh,'bottom':'','top':'50%','left':'50%','margin-left':(cli_defw/2)*-1,'margin-top':'-100px','padding':'25px 15px','overflow':'auto'
|
448 |
}).addClass('cli-bar-popup cli-modal-content');
|
449 |
-
|
450 |
-
cli_elm.find('a').appendTo('.cli_pop_btn_container');
|
451 |
-
cli_elm.find('a').css({'margin-top':'10px','margin-left':'5px'});
|
452 |
-
cli_elm.find('span').css({'float':'left','display':'block','width':'100%','height':'auto','max-height':(cli_winh-100),'overflow':'auto','text-align':'left'});
|
453 |
|
454 |
cli_h=cli_elm.height();
|
455 |
li_h=cli_h<200 ? 200 : cli_h;
|
@@ -459,7 +520,30 @@ var CLI=
|
|
459 |
'bottom':''
|
460 |
});
|
461 |
},100);
|
462 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
463 |
}
|
464 |
jQuery(document).ready(function() {
|
465 |
if(typeof cli_cookiebar_settings!='undefined')
|
70 |
this.reject_link = jQuery('.cookie_action_close_header_reject');
|
71 |
this.delete_link=jQuery(".cookielawinfo-cookie-delete");
|
72 |
|
73 |
+
if(this.settings.cookie_bar_as=='popup')
|
74 |
{
|
75 |
CLI_COOKIEBAR_AS_POPUP=true;
|
76 |
}
|
|
|
77 |
this.configBar();
|
|
|
78 |
this.toggleBar();
|
79 |
this.attachDelete();
|
80 |
this.attachEvents();
|
188 |
{
|
189 |
if(CLI_COOKIEBAR_AS_POPUP)
|
190 |
{
|
191 |
+
this.barAsPopUp(1);
|
192 |
+
}
|
193 |
+
if(CLI.settings.cookie_bar_as=='widget')
|
194 |
+
{
|
195 |
+
this.barAsWidget(1);
|
196 |
}
|
197 |
if(!CLI_Cookie.exists(CLI_ACCEPT_COOKIE_NAME))
|
198 |
{
|
219 |
});
|
220 |
});
|
221 |
},
|
|
|
|
|
|
|
|
|
|
|
222 |
configShowAgain:function()
|
223 |
{
|
224 |
this.showagain_config = {
|
233 |
this.showagain_config['border'] = '1px solid ' + this.l1hs(this.settings.border);
|
234 |
this.showagain_config[border_to_hide] = 'none';
|
235 |
}
|
236 |
+
var cli_win=jQuery(window);
|
237 |
+
var cli_winw=cli_win.width();
|
238 |
+
var showagain_x_pos=this.settings.showagain_x_position;
|
239 |
+
if(cli_winw<300)
|
240 |
+
{
|
241 |
+
showagain_x_pos=10;
|
242 |
+
this.showagain_config.width=cli_winw-20;
|
243 |
+
}else
|
244 |
+
{
|
245 |
+
this.showagain_config.width='auto';
|
246 |
+
}
|
247 |
+
var cli_defw=cli_winw>400 ? 500 : cli_winw-20;
|
248 |
+
if(CLI_COOKIEBAR_AS_POPUP) //cookie bar as popup
|
249 |
{
|
250 |
+
var sa_pos=this.settings.popup_showagain_position;
|
251 |
+
var sa_pos_arr=sa_pos.split('-');
|
252 |
+
if(sa_pos_arr[1]=='left')
|
253 |
+
{
|
254 |
+
this.showagain_config.left=showagain_x_pos;
|
255 |
+
}else if(sa_pos_arr[1]=='right')
|
256 |
+
{
|
257 |
+
this.showagain_config.right=showagain_x_pos;
|
258 |
+
}
|
259 |
+
if(sa_pos_arr[0]=='top')
|
260 |
+
{
|
261 |
+
this.showagain_config.top=0;
|
262 |
+
|
263 |
+
}else if(sa_pos_arr[0]=='bottom')
|
264 |
+
{
|
265 |
+
this.showagain_config.bottom=0;
|
266 |
+
}
|
267 |
+
this.bar_config['position'] = 'fixed';
|
268 |
+
|
269 |
+
}else if(this.settings.cookie_bar_as=='widget')
|
270 |
{
|
271 |
+
this.showagain_config.bottom=0;
|
272 |
+
if(this.settings.widget_position=='left')
|
273 |
+
{
|
274 |
+
this.showagain_config.left=showagain_x_pos;
|
275 |
+
}else if(this.settings.widget_position=='right')
|
276 |
+
{
|
277 |
+
this.showagain_config.right=showagain_x_pos;
|
278 |
+
}
|
279 |
}
|
280 |
+
else
|
281 |
+
{
|
282 |
+
if(this.settings.notify_position_vertical == "top")
|
283 |
+
{
|
284 |
+
this.showagain_config.top = '0';
|
285 |
+
}
|
286 |
+
else if(this.settings.notify_position_vertical == "bottom")
|
287 |
+
{
|
288 |
+
this.bar_config['position'] = 'fixed';
|
289 |
+
this.bar_config['bottom'] = '0';
|
290 |
+
this.showagain_config.bottom = '0';
|
291 |
+
}
|
292 |
+
if(this.settings.notify_position_horizontal == "left")
|
293 |
+
{
|
294 |
+
this.showagain_config.left =showagain_x_pos;
|
295 |
+
}else if(this.settings.notify_position_horizontal == "right")
|
296 |
+
{
|
297 |
+
this.showagain_config.right =showagain_x_pos;
|
298 |
+
}
|
299 |
+
}
|
300 |
+
this.showagain_elm.css(this.showagain_config);
|
301 |
},
|
302 |
configBar:function()
|
303 |
{
|
317 |
{
|
318 |
this.bar_config['bottom'] = '0';
|
319 |
}
|
320 |
+
this.configShowAgain();
|
321 |
+
this.bar_elm.css(this.bar_config).hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
322 |
},
|
323 |
l1hs:function(str)
|
324 |
{
|
469 |
jQuery(".cli-popupbar-overlay").addClass("cli-show");
|
470 |
}
|
471 |
},
|
472 |
+
barAsWidget:function(a)
|
473 |
+
{
|
474 |
+
var cli_elm=this.bar_elm;
|
475 |
+
var cli_win=jQuery(window);
|
476 |
+
var cli_winh=cli_win.height()-40;
|
477 |
+
var cli_winw=cli_win.width();
|
478 |
+
var cli_defw=cli_winw>400 ? 300 : cli_winw-30;
|
479 |
+
cli_elm.css({
|
480 |
+
'width':cli_defw,'height':'auto','max-height':cli_winh,'padding':'25px 15px','overflow':'auto','position':'fixed'
|
481 |
+
});
|
482 |
+
if(this.settings.widget_position=='left')
|
483 |
+
{
|
484 |
+
cli_elm.css({
|
485 |
+
'left':'15px','bottom':'15px','top':'auto'
|
486 |
+
});
|
487 |
+
}else
|
488 |
+
{
|
489 |
+
cli_elm.css({
|
490 |
+
'right':'15px','bottom':'15px','top':'auto'
|
491 |
+
});
|
492 |
+
}
|
493 |
+
if(a)
|
494 |
+
{
|
495 |
+
this.setResize();
|
496 |
+
}
|
497 |
+
},
|
498 |
+
barAsPopUp:function(a)
|
499 |
{
|
500 |
if(typeof cookie_law_info_bar_as_popup==='function')
|
501 |
{
|
506 |
var cli_winh=cli_win.height()-40;
|
507 |
var cli_winw=cli_win.width();
|
508 |
var cli_defw=cli_winw>700 ? 500 : cli_winw-20;
|
|
|
509 |
|
510 |
cli_elm.css({
|
511 |
'width':cli_defw,'height':'auto','max-height':cli_winh,'bottom':'','top':'50%','left':'50%','margin-left':(cli_defw/2)*-1,'margin-top':'-100px','padding':'25px 15px','overflow':'auto'
|
512 |
}).addClass('cli-bar-popup cli-modal-content');
|
513 |
+
|
|
|
|
|
|
|
514 |
|
515 |
cli_h=cli_elm.height();
|
516 |
li_h=cli_h<200 ? 200 : cli_h;
|
520 |
'bottom':''
|
521 |
});
|
522 |
},100);
|
523 |
+
if(a)
|
524 |
+
{
|
525 |
+
this.setResize();
|
526 |
+
}
|
527 |
+
},
|
528 |
+
setResize:function()
|
529 |
+
{
|
530 |
+
var resizeTmr=null;
|
531 |
+
jQuery(window).resize(function() {
|
532 |
+
clearTimeout(resizeTmr);
|
533 |
+
resizeTmr=setTimeout(function()
|
534 |
+
{
|
535 |
+
if(CLI_COOKIEBAR_AS_POPUP)
|
536 |
+
{
|
537 |
+
CLI.barAsPopUp();
|
538 |
+
}
|
539 |
+
if(CLI.settings.cookie_bar_as=='widget')
|
540 |
+
{
|
541 |
+
CLI.barAsWidget();
|
542 |
+
}
|
543 |
+
CLI.configShowAgain();
|
544 |
+
},500);
|
545 |
+
});
|
546 |
+
}
|
547 |
}
|
548 |
jQuery(document).ready(function() {
|
549 |
if(typeof cli_cookiebar_settings!='undefined')
|
public/views/cookie-law-info_bar.php
CHANGED
@@ -10,7 +10,7 @@ echo $notify_html;
|
|
10 |
<div class="cli-modal-backdrop cli-fade cli-settings-overlay"></div>
|
11 |
<div class="cli-modal-backdrop cli-fade cli-popupbar-overlay"></div>
|
12 |
<script type="text/javascript">
|
13 |
-
|
14 |
cli_cookiebar_settings='<?php echo Cookie_Law_Info::get_json_settings(); ?>';
|
15 |
-
|
16 |
</script>
|
10 |
<div class="cli-modal-backdrop cli-fade cli-settings-overlay"></div>
|
11 |
<div class="cli-modal-backdrop cli-fade cli-popupbar-overlay"></div>
|
12 |
<script type="text/javascript">
|
13 |
+
/* <![CDATA[ */
|
14 |
cli_cookiebar_settings='<?php echo Cookie_Law_Info::get_json_settings(); ?>';
|
15 |
+
/* ]]> */
|
16 |
</script>
|