Skip to content
Snippets Groups Projects

[issue 3419681] move caching to the hook_rebuild

Closed webroru requested to merge issue/csp-3419681:3419681-mysql-error-general into 2.x
3 unresolved threads
Files
3
+ 5
5
@@ -3,7 +3,7 @@
* Defines Javascript behaviors for the csp module admin form.
*/
(function ($, Drupal) {
(function setSummary($, Drupal) {
/**
* Sets summary of policy tabs.
*
@@ -16,14 +16,14 @@
attach(context) {
$(context)
.find('[data-drupal-selector="edit-policies"] > details')
.each(function () {
.each(function detailsEach() {
Please register or sign in to reply
const $details = $(this);
const elementPrefix = $details.data('drupal-selector');
const createPolicyElementSelector = function (name) {
const createPolicyElementSelector = function selector(name) {
return `[data-drupal-selector="${elementPrefix}-${name}"]`;
};
$details.drupalSetSummary(function () {
$details.drupalSetSummary(function summary() {
const directivesElementSelector =
createPolicyElementSelector('directives');
const directiveCount = $details.find(
@@ -67,7 +67,7 @@
.find(
'input[data-drupal-selector="edit-enforce-directives-upgrade-insecure-requests-enable"]',
)
.on('change', function () {
.on('change', function onChange() {
$mixedContent.prop('checked', false);
});
},
Loading