PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.3
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.3
3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 All 196 releases
← All changes | resources/backend/js/settings-conditional-display.js +25 -1 3.3.13.4.3 View file →
@@ -64,9 +64,33 @@
64 64 });
65 65 break;
66 66
67 67 default:
68 - // Iterate through the table rows, hiding any settings.
68 + // Group pattern: source has data-conditional-class-prefix; rows opt
69 + // into the group by declaring a CSS class of the form
70 + // "<prefix><value>". Rows in the group whose class matches the
71 + // source's current value are shown; other rows in the group are
72 + // hidden. Rows without any matching prefix class are left alone.
73 + if (input.dataset.conditionalClassPrefix) {
74 + const prefix = input.dataset.conditionalClassPrefix;
75 + const expectedClass = prefix + input.value;
76 + rows.forEach(function (row) {
77 + const inGroup = Array.from(row.classList).some((c) =>
78 + c.startsWith(prefix)
79 + );
80 + if (!inGroup) {
81 + return;
82 + }
83 + row.style.display = row.classList.contains(expectedClass)
84 + ? ''
85 + : 'none';
86 + });
87 + break;
88 + }
89 +
90 + // Single-target pattern: source has data-conditional-element (id)
91 + // and data-conditional-value; the matching row is shown when the
92 + // source value equals the expected value and hidden otherwise.
69 93 rows.forEach(function (row) {
70 94 // Skip if this table row is for the setting we've just changed.
71 95 if (row.querySelector(`[id = "${input.id}"]`)) {
72 96 return;