From 0adb016293f2e351ff46c72dab722a4d35858a48 Mon Sep 17 00:00:00 2001 From: Anton Ignatov Date: Wed, 18 Sep 2019 12:33:48 +0200 Subject: [PATCH] Fix missing expand all button --- app/assets/javascripts/protocols/steps.js.erb | 5 ++++- app/views/protocols/_steps.html.erb | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index 4f82724fd..ba994ba7f 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -267,7 +267,10 @@ if (show) { $("[data-action='new-step']:first").show(); $("[data-action='edit-step']").show(); - if ($('#steps .step').length > 0) $("[data-action='new-step']:last").show(); + if ($('#steps .step').length > 0) { + $("[data-action='new-step']:last").show(); + $(".expand-all-steps").show(); + } } else { $("[data-action='new-step']").hide(); $("[data-action='edit-step']").hide(); diff --git a/app/views/protocols/_steps.html.erb b/app/views/protocols/_steps.html.erb index 64874b4cf..8740fa4c6 100644 --- a/app/views/protocols/_steps.html.erb +++ b/app/views/protocols/_steps.html.erb @@ -10,8 +10,7 @@ - <% unless @protocol.steps.empty? %> -
+
@@ -19,7 +18,6 @@
- <% end %>
<% end %>