From 29da56cf75c1381b31a8b26738a94eff482f8099 Mon Sep 17 00:00:00 2001 From: M Somerville Date: Sat, 25 Aug 2018 12:26:17 +0100 Subject: Hide reject media checkbox when not relevant. (#8426) --- app/javascript/packs/admin.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/javascript/packs') diff --git a/app/javascript/packs/admin.js b/app/javascript/packs/admin.js index 5dbcc03d3..ce5f70ee7 100644 --- a/app/javascript/packs/admin.js +++ b/app/javascript/packs/admin.js @@ -39,3 +39,10 @@ delegate(document, '.media-spoiler-hide-button', 'click', () => { element.click(); }); }); + +delegate(document, '#domain_block_severity', 'change', ({ target }) => { + const rejectMediaDiv = document.querySelector('.input.with_label.domain_block_reject_media'); + if (rejectMediaDiv) { + rejectMediaDiv.style.display = (target.value === 'suspend') ? 'none' : 'block'; + } +}); -- cgit From 5c42e8b51bec4bed32326989037fd519ba58dbe6 Mon Sep 17 00:00:00 2001 From: PatrickRWells <32802366+PatrickRWells@users.noreply.github.com> Date: Sat, 25 Aug 2018 16:19:13 -0700 Subject: Fix CW issues in static view on Safari (Fixes #8354) (#8446) * Fix CW issues in static view on Safari (8354) * Fixed formatting issues * Trailing space --- app/javascript/packs/public.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/javascript/packs') diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index dc18da853..c83e2889a 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -79,7 +79,10 @@ function main() { .catch(error => console.error(error)); } - new Rellax('.parallax', { speed: -1 }); + const parallaxComponents = document.querySelectorAll('.parallax'); + if (parallaxComponents.length > 0 ) { + new Rellax('.parallax', { speed: -1 }); + } const history = createHistory(); const detailedStatuses = document.querySelectorAll('.public-layout .detailed-status'); -- cgit