about summary refs log tree commit diff
path: root/app/javascript/core
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-08-26 13:52:12 +0200
committerThibaut Girka <thib@sitedethib.com>2018-08-26 14:23:24 +0200
commit36393e1d2b1ce82916bd43ca1068e34cea6f6e39 (patch)
treea18d7f5e7753ff40355d2a6d4ab9fb765ad4c263 /app/javascript/core
parent2903f8f36b7c41b77de4ad6c8c5b0a6c0b2a7ace (diff)
parentf37fafe30b5f6ff85ebf87fb622293a855877ee1 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
	app/views/layouts/application.html.haml

Edited:
        app/helpers/application_helper.rb
        app/views/admin/domain_blocks/new.html.haml

Conflict wasn't really one, just two changes too close to one another.
Edition was to adapt the class names for themes to class names for
skins and flavours.

Also edited app/views/admin/domain_blocks/new.html.haml to strip the
duplicate admin pack inclusion thing.
Diffstat (limited to 'app/javascript/core')
-rw-r--r--app/javascript/core/admin.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/javascript/core/admin.js b/app/javascript/core/admin.js
index 28f27fbc6..0c26dc18d 100644
--- a/app/javascript/core/admin.js
+++ b/app/javascript/core/admin.js
@@ -41,3 +41,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';
+  }
+});