From 84477cad43a5a971297e918b881b9e34e7604dd5 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 10 Oct 2023 14:22:48 +0200 Subject: [PATCH] Update css for shared protocol [SCI-9476] --- .../shareable_links/my_module_results_show.js | 10 +++ .../stylesheets/my_modules/protocol.scss | 11 ---- app/assets/stylesheets/shared/assets.scss | 3 - .../stylesheets/shared/content/checklist.scss | 18 ----- .../my_module_protocol_show.html.erb | 6 +- .../my_module_results_show.html.erb | 23 ++++--- .../my_modules/_attachments.html.erb | 1 + .../my_modules/_comments_list.html.erb | 2 +- .../my_modules/_header_actions.html.erb | 12 ++-- .../my_modules/_protocol.html.erb | 64 +++++++++--------- .../_result_comments_sidebar.html.erb | 26 ++++++++ .../shareable_links/my_modules/_step.html.erb | 18 +++-- ...ml.erb => _step_comments_sidebar.html.erb} | 0 .../my_modules/results/_comments.html.erb | 14 ---- .../results/_comments_list.html.erb | 18 ----- .../my_modules/results/_result.html.erb | 65 ++++++++++--------- .../step_attachments/_context_menu.html.erb | 5 +- .../step_attachments/_thumbnail.html.erb | 47 +++++++++----- .../step_elements/_checklist.html.erb | 8 +-- .../step_elements/_checklist_item.html.erb | 12 ++-- .../my_modules/step_elements/_table.html.erb | 9 +-- .../my_modules/step_elements/_text.html.erb | 13 ++-- 22 files changed, 186 insertions(+), 199 deletions(-) create mode 100644 app/views/shareable_links/my_modules/_result_comments_sidebar.html.erb rename app/views/shareable_links/my_modules/{_comments_sidebar.html.erb => _step_comments_sidebar.html.erb} (100%) delete mode 100644 app/views/shareable_links/my_modules/results/_comments.html.erb delete mode 100644 app/views/shareable_links/my_modules/results/_comments_list.html.erb diff --git a/app/assets/javascripts/shareable_links/my_module_results_show.js b/app/assets/javascripts/shareable_links/my_module_results_show.js index a17af4da5..52394fa67 100644 --- a/app/assets/javascripts/shareable_links/my_module_results_show.js +++ b/app/assets/javascripts/shareable_links/my_module_results_show.js @@ -31,6 +31,15 @@ }); } + function initResultComments() { + $(document).on('click', '.shareable-link-open-comments-sidebar', function(e) { + e.preventDefault(); + $('.comments-sidebar').removeClass('open'); + + $($(this).data('objectTarget')).addClass('open'); + }); + } + function initResultsExpandCollapse() { $(document).on('click', '#results-collapse-btn', function() { $('.result .panel-collapse').collapse('hide'); @@ -44,6 +53,7 @@ function initMyModuleResultsShow() { initAttachments(); initResultsExpandCollapse(); + initResultComments(); $('.hot-table-container').each(function() { initializeHandsonTable($(this)); diff --git a/app/assets/stylesheets/my_modules/protocol.scss b/app/assets/stylesheets/my_modules/protocol.scss index b6b7d3817..11d83d2a2 100644 --- a/app/assets/stylesheets/my_modules/protocol.scss +++ b/app/assets/stylesheets/my_modules/protocol.scss @@ -103,14 +103,3 @@ color: var(--sn-grey); } } - -@media screen and (max-width: 1395px) { - .task-section-header { - height: 7.44rem; - } - - .protocol-buttons-group { - flex-wrap: wrap; - margin: 1rem; - } -} diff --git a/app/assets/stylesheets/shared/assets.scss b/app/assets/stylesheets/shared/assets.scss index 3e58a4b5b..947746b12 100644 --- a/app/assets/stylesheets/shared/assets.scss +++ b/app/assets/stylesheets/shared/assets.scss @@ -288,9 +288,6 @@ .dropdown-menu { @include font-button; - min-width: 200px; - padding: .5em 0; - z-index: 102; .divider-label { @include font-small; diff --git a/app/assets/stylesheets/shared/content/checklist.scss b/app/assets/stylesheets/shared/content/checklist.scss index 65eddae49..5317f14ec 100644 --- a/app/assets/stylesheets/shared/content/checklist.scss +++ b/app/assets/stylesheets/shared/content/checklist.scss @@ -2,16 +2,6 @@ // scss-lint:disable NestingDepth .step-checklist-items { - .sci-inline-edit { - margin-top: 5px; - - .sci-inline-edit__content { - margin-bottom: 7px; - margin-left: 0; - margin-right: .5em; - } - } - .step-checklist-item { padding-left: 5px; } @@ -59,14 +49,6 @@ .step-checklist-item-ghost { border: 1px solid $brand-primary; } - - .sci-checkbox-container { - margin: 11px 0; - - &.disabled { - pointer-events: none; - } - } } .step-checklist-container { diff --git a/app/views/shareable_links/my_module_protocol_show.html.erb b/app/views/shareable_links/my_module_protocol_show.html.erb index 1ad7bba3c..bf04088e7 100644 --- a/app/views/shareable_links/my_module_protocol_show.html.erb +++ b/app/views/shareable_links/my_module_protocol_show.html.erb @@ -7,7 +7,7 @@ -
+
<%= render partial: 'shareable_links/my_modules/header_actions' %> @@ -27,10 +27,6 @@ <%= @my_module.code %>
- -
- <%= render partial: 'shareable_links/my_modules/task_flow_button', locals: { my_module: @my_module } if @my_module.my_module_status_flow %> -
> <%= render partial: 'shareable_links/my_modules/my_module_details' %> diff --git a/app/views/shareable_links/my_module_results_show.html.erb b/app/views/shareable_links/my_module_results_show.html.erb index 2d9d24ddb..62b198e4e 100644 --- a/app/views/shareable_links/my_module_results_show.html.erb +++ b/app/views/shareable_links/my_module_results_show.html.erb @@ -6,24 +6,22 @@
-
-
+
+
<%= render partial: 'shareable_links/my_modules/header_actions' %> -
-
-
- -