Changeset 2237219
- Timestamp:
- 02/02/2020 03:13:17 PM (6 years ago)
- Location:
- xcoobee/trunk
- Files:
-
- 10 edited
-
CHANGELOG (modified) (1 diff)
-
assets/dist/js/admin/scripts.js (modified) (1 diff)
-
assets/dist/js/admin/scripts.min.js (modified) (1 diff)
-
includes/class-xcoobee-api.php (modified) (2 diffs)
-
includes/sdk/API.md (modified) (3 diffs)
-
includes/sdk/src/XcooBee/Core/Api/Consents.php (modified) (2 diffs)
-
includes/sdk/test/src/XcooBee/Core/Api/ConsentsTest.php (modified) (1 diff)
-
languages/xcoobee.pot (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
xcoobee.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
xcoobee/trunk/CHANGELOG
r2212575 r2237219 24 24 * autodetect security and make cache optional 25 25 26 = 1.7.0 - 2020-01-29 = 27 * tweaks to html 28 -
xcoobee/trunk/assets/dist/js/admin/scripts.js
r2126380 r2237219 120 120 var el = $(this); 121 121 xbeeInputDisallowChars(el, chars); 122 }); 123 $('[data-xbee-show-if-checked]').each(function () { 124 var checked = $(this).data('xbee-show-if-checked'); 125 var checkedEl = $('#' + checked); 126 var el = $(this); 127 checkedEl.on('change', function () { 128 if ($(this).is(':checked')) { 129 el.show(); 130 } else { 131 el.hide(); 132 } 133 }).trigger('change'); 122 134 }); 123 135 /** -
xcoobee/trunk/assets/dist/js/admin/scripts.min.js
r2107025 r2237219 1 "use strict";!function(o,e,a){e.xbeeShowSpinner=function(e){o('.xbee-spinner[data-spinner="'+e+'"]').css("display","inline-block")},e.xbeeHideSpinner=function(e){o('.xbee-spinner[data-spinner="'+e+'"').css("display","none")},e.xbeeLoadOverlay=function(){if(0===o("#xbee-overlay").length){var e=o("<div></div>").attr("id","xbee-overlay"),a=o("<div></div>").attr("class","loader"),t=o('<img class="icon-xcoobee" />').attr("src",xbeeAdminParams.images.iconXcooBee),s=o('<img class="loader" />').attr("src",xbeeAdminParams.images.loader);o(t).appendTo(a),o(s).appendTo(a),o(a).appendTo(e),o("body").append(e)}},e.xbeeShowOverlay=function(){o("#xbee-overlay").css("display","table").animate({opacity:1},200)},e.xbeeHideOverlay=function(){o("#xbee-overlay").animate({opacity:0},200,function(){return o("#xbee-overlay").css("display","none")})},e.xbeeNotification=function(e,a,t){(e=o('.xbee-notification[data-notification="'+e+'"]')).attr("class","xbee-notification");var s="xbee-"+a;e.addClass(s),e.html('<span class="message">'+t+"</span>"),e.slideDown(500)},e.xbeeInputDisallowChars=function(e,t){e.on("paste",function(e){e.preventDefault()}),e.on("keypress",function(a){t.forEach(function(e){a.which===e.charCodeAt(0)&&a.preventDefault()})})},o(a).ready(function(){o(".xbee-notification").on("click",function(){o(this).slideUp(500)}),o("[data-xbee-disallow-chars]").each(function(){var e=o(this).data("xbee-disallow-chars").split(""),a=o(this);xbeeInputDisallowChars(a,e)}),o(" .radio-buttons-group input").each(function(){if(o(this).is(":checked")){var e=o(this).attr("id");o('.radio-buttons-group label[for="'+e+'"]').addClass("checked")}}),o(".radio-buttons-group label").on("click",function(){o(this).closest(".radio-buttons-group").find("input").prop("checked",!1),o(this).closest(".radio-buttons-group").find("label").removeClass("checked"),o(this).find("input").prop("checked",!0),o(this).addClass("checked")}),o(".xbee .tabs .tabs-nav .nav").on("click",function(e){e.preventDefault();var a=o(this).closest(".tabs"),t=o(this);if(!t.hasClass("active")){var s=t.data("nav");a.find(".tabs-nav .nav").removeClass("active"),a.find(".tabs-content .content").removeClass("active"),t.addClass("active"),o('.tabs-content .content[data-nav="'+s+'"]').addClass("active")}}),xbeeLoadOverlay(),o("#xbee-clear-message-logs").on("click",function(e){e.preventDefault();var a={action:"xbee_clear_message_logs",userId:o(e.target).data("userId")},t="";o.ajax({url:xbeeAdminParams.ajaxUrl,method:"post",data:a,success:function(e){e=JSON.parse(e),t=e.result?xbeeAdminParams.messages.successClearMessageLogs:e.errors?e.errors.join(" "):xbeeAdminParams.messages.errorClearMessageLogs,o("#xbee-message-logs tbody tr").css("background-color","#e1615f").fadeOut(500,function(){o("#xbee-message-logs tbody tr").remove(),o("#xbee-message-logs tbody").append("<tr><td>"+t+"</td></tr>")}),o(".xbee-information .xbee-clear-message-logs").remove()},error:function(){xbeeHideOverlay()}})}),o("#xbee-settings-general #test-keys").on("click",function(e){e.preventDefault();var a={action:"xbee_test_keys",apiKey:o('#xbee-settings-general [name="xbee_api_key"]').val(),apiSecret:o('#xbee-settings-general [name="xbee_api_secret"]').val()},t="";o.ajax({url:xbeeAdminParams.ajaxUrl,method:"post",data:a,beforeSend:function(){xbeeShowOverlay()},success:function(e){xbeeHideOverlay(),e=JSON.parse(e),t=e.result?xbeeAdminParams.messages.successValidKeys:e.errors?e.errors.join(" "):xbeeAdminParams.messages.errorTestKeys,xbeeNotification("test-api-keys",e.status,t)},error:function(){xbeeHideOverlay(),xbeeNotification("test-api-keys",response.status,xbeeAdminParams.messages.errorTestKeys.message)}})}),o("textarea, input").each(function(){var a=o(this),t=a.attr("maxlength");t&&a.on("keyup change paste",function(e){"1"==a.data("xbee-maxlen")&&e.target.value.length>=t?(a.css("border-color","#f00"),a.css("box-shadow","0 0 5px #ff7e7e"),setTimeout(function(){a.css("border-color",""),a.css("box-shadow","")},100)):e.target.value.length>=t?a.data("xbee-maxlen","1"):a.data("xbee-maxlen","0")})}),o('input[type="number"]').each(function(){var t=o(this),s=Number(t.attr("max")),n=Number(t.attr("min"));t.on("keyup keydown change paste",function(e){var a=Number(e.target.value);console.log(s),"number"==typeof s&&s<a&&(t.val(s),e.preventDefault()),"number"==typeof n&&a<n&&(t.val(n),e.preventDefault())})}),o(".xbee-tooltip").on("mouseover",function(){0===o(this).children(".tt").length&&o(this).append('<span class="tt">'.concat(o(this).data("tooltip"),"</span>")),o(this).find(".tt").show()}),o(".xbee-tooltip").on("mouseout",function(){o(this).find(".tt").hide()})})}(jQuery,window,document);1 "use strict";!function(o,e,a){e.xbeeShowSpinner=function(e){o('.xbee-spinner[data-spinner="'+e+'"]').css("display","inline-block")},e.xbeeHideSpinner=function(e){o('.xbee-spinner[data-spinner="'+e+'"').css("display","none")},e.xbeeLoadOverlay=function(){if(0===o("#xbee-overlay").length){var e=o("<div></div>").attr("id","xbee-overlay"),a=o("<div></div>").attr("class","loader"),t=o('<img class="icon-xcoobee" />').attr("src",xbeeAdminParams.images.iconXcooBee),s=o('<img class="loader" />').attr("src",xbeeAdminParams.images.loader);o(t).appendTo(a),o(s).appendTo(a),o(a).appendTo(e),o("body").append(e)}},e.xbeeShowOverlay=function(){o("#xbee-overlay").css("display","table").animate({opacity:1},200)},e.xbeeHideOverlay=function(){o("#xbee-overlay").animate({opacity:0},200,function(){return o("#xbee-overlay").css("display","none")})},e.xbeeNotification=function(e,a,t){(e=o('.xbee-notification[data-notification="'+e+'"]')).attr("class","xbee-notification");var s="xbee-"+a;e.addClass(s),e.html('<span class="message">'+t+"</span>"),e.slideDown(500)},e.xbeeInputDisallowChars=function(e,t){e.on("paste",function(e){e.preventDefault()}),e.on("keypress",function(a){t.forEach(function(e){a.which===e.charCodeAt(0)&&a.preventDefault()})})},o(a).ready(function(){o(".xbee-notification").on("click",function(){o(this).slideUp(500)}),o("[data-xbee-disallow-chars]").each(function(){var e=o(this).data("xbee-disallow-chars").split(""),a=o(this);xbeeInputDisallowChars(a,e)}),o("[data-xbee-show-if-checked]").each(function(){var e=o(this).data("xbee-show-if-checked"),a=o("#"+e),t=o(this);a.on("change",function(){o(this).is(":checked")?t.show():t.hide()}).trigger("change")}),o(".radio-buttons-group input").each(function(){if(o(this).is(":checked")){var e=o(this).attr("id");o('.radio-buttons-group label[for="'+e+'"]').addClass("checked")}}),o(".radio-buttons-group label").on("click",function(){o(this).closest(".radio-buttons-group").find("input").prop("checked",!1),o(this).closest(".radio-buttons-group").find("label").removeClass("checked"),o(this).find("input").prop("checked",!0),o(this).addClass("checked")}),o(".xbee .tabs .tabs-nav .nav").on("click",function(e){e.preventDefault();var a=o(this).closest(".tabs"),t=o(this);if(!t.hasClass("active")){var s=t.data("nav");a.find(".tabs-nav .nav").removeClass("active"),a.find(".tabs-content .content").removeClass("active"),t.addClass("active"),o('.tabs-content .content[data-nav="'+s+'"]').addClass("active")}}),xbeeLoadOverlay(),o("#xbee-clear-message-logs").on("click",function(e){e.preventDefault();var a={action:"xbee_clear_message_logs",userId:o(e.target).data("userId")},t="";o.ajax({url:xbeeAdminParams.ajaxUrl,method:"post",data:a,success:function(e){e=JSON.parse(e),t=e.result?xbeeAdminParams.messages.successClearMessageLogs:e.errors?e.errors.join(" "):xbeeAdminParams.messages.errorClearMessageLogs,o("#xbee-message-logs tbody tr").css("background-color","#e1615f").fadeOut(500,function(){o("#xbee-message-logs tbody tr").remove(),o("#xbee-message-logs tbody").append("<tr><td>"+t+"</td></tr>")}),o(".xbee-information .xbee-clear-message-logs").remove()},error:function(){xbeeHideOverlay()}})}),o("#xbee-settings-general #test-keys").on("click",function(e){e.preventDefault();var a={action:"xbee_test_keys",apiKey:o('#xbee-settings-general [name="xbee_api_key"]').val(),apiSecret:o('#xbee-settings-general [name="xbee_api_secret"]').val()},t="";o.ajax({url:xbeeAdminParams.ajaxUrl,method:"post",data:a,beforeSend:function(){xbeeShowOverlay()},success:function(e){xbeeHideOverlay(),e=JSON.parse(e),t=e.result?xbeeAdminParams.messages.successValidKeys:e.errors?e.errors.join(" "):xbeeAdminParams.messages.errorTestKeys,xbeeNotification("test-api-keys",e.status,t)},error:function(){xbeeHideOverlay(),xbeeNotification("test-api-keys",response.status,xbeeAdminParams.messages.errorTestKeys.message)}})}),o("textarea, input").each(function(){var a=o(this),t=a.attr("maxlength");t&&a.on("keyup change paste",function(e){"1"==a.data("xbee-maxlen")&&e.target.value.length>=t?(a.css("border-color","#f00"),a.css("box-shadow","0 0 5px #ff7e7e"),setTimeout(function(){a.css("border-color",""),a.css("box-shadow","")},100)):e.target.value.length>=t?a.data("xbee-maxlen","1"):a.data("xbee-maxlen","0")})}),o('input[type="number"]').each(function(){var t=o(this),s=Number(t.attr("max")),n=Number(t.attr("min"));t.on("keyup keydown change paste",function(e){var a=Number(e.target.value);console.log(s),"number"==typeof s&&s<a&&(t.val(s),e.preventDefault()),"number"==typeof n&&a<n&&(t.val(n),e.preventDefault())})}),o(".xbee-tooltip").on("mouseover",function(){0===o(this).children(".tt").length&&o(this).append('<span class="tt">'.concat(o(this).data("tooltip"),"</span>")),o(this).find(".tt").show()}),o(".xbee-tooltip").on("mouseout",function(){o(this).find(".tt").hide()})})}(jQuery,window,document); -
xcoobee/trunk/includes/class-xcoobee-api.php
r2126380 r2237219 95 95 remove_after_n_sec 96 96 do_not_show_outside_eu 97 detect_country 97 98 check_by_default_types 98 99 send_data_requests_by_email … … 100 101 hide_on_complete 101 102 response_wait_time 103 theme 104 hide_brand_tag 102 105 } 103 106 targets { -
xcoobee/trunk/includes/sdk/API.md
r2212575 r2237219 54 54 - [getCampaignIdByRef](#getcampaignidbyrefcampaignref-config) 55 55 - [shareConsents](#shareconsentscampaignref-campaignid-consentids-config) 56 - [dontSellData](#dontselldataemail- config)56 - [dontSellData](#dontselldataemail-dontsell-config) 57 57 - [User API](#user-api) 58 58 - [getUsePublicKey](#getuserpublickeyxid-config) … … 900 900 - status 400 if error 901 901 902 ## dontSellData(email[, config])902 ## dontSellData(email[, dontSell, config]) 903 903 904 904 Set `Do Not Sell` flag for user. Consents for this user won't be shared between campaigns for 1 year. After expiration, it should be extended. … … 906 906 options: 907 907 ``` 908 email => the email of user, that flag should be set for 909 config => optional: the config object 908 email => the email of user, that flag should be set for 909 dontSell => optional: flag state, `true` by default. 910 config => optional: the config object 910 911 ``` 911 912 -
xcoobee/trunk/includes/sdk/src/XcooBee/Core/Api/Consents.php
r2212575 r2237219 630 630 * 631 631 * @param string $email 632 * @param array $config 633 * 634 * @return Response 635 * @throws XcooBeeException 636 */ 637 public function dontSellData($email, $config = []) 632 * @param boolean $dontSell 633 * @param array $config 634 * 635 * @return Response 636 * @throws XcooBeeException 637 */ 638 public function dontSellData($email, $dontSell = true, $config = []) 638 639 { 639 640 if (!$email) { … … 641 642 } 642 643 643 $query = 'mutation dontSellData($email: String !){644 do_not_sell_data(email: $email ){645 user_email646 } 647 }'; 648 649 $response = $this->_request($query, ['email' => $email ], $config);644 $query = 'mutation dontSellData($email: String, $dontSell: Boolean){ 645 do_not_sell_data(email: $email, dont_sell: $dontSell){ 646 user_email 647 } 648 }'; 649 650 $response = $this->_request($query, ['email' => $email, 'dontSell' => $dontSell], $config); 650 651 if ($response->code !== 200) { 651 652 return $response; -
xcoobee/trunk/includes/sdk/test/src/XcooBee/Core/Api/ConsentsTest.php
r2212575 r2237219 845 845 ->method('_request') 846 846 ->will($this->returnCallback(function ($query, $params) { 847 $this->assertEquals(['email' => 'test@test.email' ], $params);847 $this->assertEquals(['email' => 'test@test.email', 'dontSell' => true], $params); 848 848 })); 849 849 -
xcoobee/trunk/languages/xcoobee.pot
r2126380 r2237219 1 # Copyright (C) 20 19XcooBee1 # Copyright (C) 2020 XcooBee 2 2 # This file is distributed under the same license as the XcooBee package. 3 3 msgid "" -
xcoobee/trunk/readme.txt
r2212575 r2237219 3 3 Tags: xcoobee, privacy, cookie, gdpr, ccpa, consent, security 4 4 Requires at least: 4.4.0 5 Tested up to: 5.3. 06 Stable tag: 1. 6.55 Tested up to: 5.3.2 6 Stable tag: 1.7.0 7 7 License: GPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
xcoobee/trunk/xcoobee.php
r2212575 r2237219 5 5 * Author URI: https://www.xcoobee.com/ 6 6 * Description: Connects your website to the XcooBee privacy network and enables secure password recovery and login. Base library for XcooBee GDPR and CCPA Add-ons. 7 * Version: 1. 6.57 * Version: 1.7.0 8 8 * Author: XcooBee 9 9 * License: GPLv3 … … 14 14 * 15 15 * Requires at least: 4.4.0 16 * Tested up to: 5.3. 016 * Tested up to: 5.3.2 17 17 * 18 18 * @package XcooBee
Note: See TracChangeset
for help on using the changeset viewer.