gutenberg
3 years ago
account-static.js
10 months ago
account.js
10 months ago
amplitude.js
1 year ago
consent-mapping.js
1 year ago
cookiebot-admin-script.js
1 year ago
dashboard.js
1 year ago
jquery.tipTip.js
3 years ago
multiple-page.js
3 years ago
network-settings-page.js
10 months ago
prior-consent-settings.js
3 years ago
settings-page.js
10 months ago
support-page.js
1 year ago
consent-mapping.js
23 lines
| 1 | 'use strict'; |
| 2 | (window => { |
| 3 | jQuery('#cb-consent-api-reset-defaults').on('click',resetConsentMapping); |
| 4 | function resetConsentMapping() { |
| 5 | if ( confirm( 'Are you sure you want to reset to default consent mapping?' ) ) { |
| 6 | const resetButton = jQuery(this); |
| 7 | if(resetButton.hasClass('uc-consent')){ |
| 8 | const categorySelectors = jQuery('.cb-category-selectors'); |
| 9 | categorySelectors.each(function(){ |
| 10 | const defaultCategory = jQuery(this).attr('data-default'); |
| 11 | jQuery(this).val(defaultCategory).change(); |
| 12 | }); |
| 13 | } else { |
| 14 | jQuery('.cb-settings__consent__mapping-table input[type=checkbox]').each(function () { |
| 15 | if (!jQuery(this).prop('disabled')) { |
| 16 | jQuery(this).prop('checked', jQuery(this).data('default-value')); |
| 17 | } |
| 18 | }) |
| 19 | } |
| 20 | jQuery('p.submit #submit').addClass('enabled'); |
| 21 | } |
| 22 | } |
| 23 | })(window); |