From 71b3228310bcc4b00837ae6d5e698f5192af1df8 Mon Sep 17 00:00:00 2001 From: aignatov-bio <47317017+aignatov-bio@users.noreply.github.com> Date: Mon, 13 May 2019 10:45:12 +0200 Subject: [PATCH] Update protocol preview style [SCI-3416] (#1729) * Update protocol appearance --- app/assets/stylesheets/application.scss | 1 + .../my_modules/protocols/index.scss | 41 ++++--- .../stylesheets/protocols/preview_modal.scss | 17 +++ .../stylesheets/protocols/protocol.scss | 12 ++ app/assets/stylesheets/themes/scinote.scss | 12 -- app/views/my_modules/results.html.erb | 12 +- app/views/protocols/_header.html.erb | 10 +- app/views/protocols/_steps.html.erb | 12 +- app/views/protocols/edit.html.erb | 2 + app/views/protocols/index.html.erb | 12 +- .../_protocol_preview_modal_body.html.erb | 112 ++++-------------- app/views/reports/new.html.erb | 12 +- app/views/search/results/_protocols.html.erb | 12 +- app/views/shared/_formulas_libraries.html.erb | 11 ++ app/views/steps/_step.html.erb | 9 +- app/views/steps/attachments/_list.html.erb | 6 +- 16 files changed, 105 insertions(+), 188 deletions(-) create mode 100644 app/assets/stylesheets/protocols/preview_modal.scss create mode 100644 app/assets/stylesheets/protocols/protocol.scss create mode 100644 app/views/shared/_formulas_libraries.html.erb diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b55c8bded..929c3e5af 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -23,4 +23,5 @@ @import "select2.min"; @import "extend/perfect-scrollbar"; @import "my_modules/protocols/*"; +@import "protocols/*"; @import "hooks/*"; diff --git a/app/assets/stylesheets/my_modules/protocols/index.scss b/app/assets/stylesheets/my_modules/protocols/index.scss index 097ba784f..45f1ebb74 100644 --- a/app/assets/stylesheets/my_modules/protocols/index.scss +++ b/app/assets/stylesheets/my_modules/protocols/index.scss @@ -14,6 +14,28 @@ } } +.protocol-info, +.module-header { + .well { + border: 0; + box-shadow: none; + padding-left: 0; + padding-right: 0; + } + + .badge-icon { + background: transparent; + color: $color-silver; + padding-left: 0; + padding-right: 5px; + + + .well-sm { + margin-bottom: 10px; + margin-left: 0; + } + } +} + .module-header { display: inline-block; position: relative; @@ -46,25 +68,6 @@ } } - .well { - border: 0; - box-shadow: none; - padding-left: 0; - padding-right: 0; - } - - .badge-icon { - background: transparent; - color: $color-silver; - padding-left: 0; - padding-right: 5px; - - + .well-sm { - margin-bottom: 10px; - margin-left: 0; - } - } - .module-description { float: left; width: 100%; diff --git a/app/assets/stylesheets/protocols/preview_modal.scss b/app/assets/stylesheets/protocols/preview_modal.scss new file mode 100644 index 000000000..0ea55b882 --- /dev/null +++ b/app/assets/stylesheets/protocols/preview_modal.scss @@ -0,0 +1,17 @@ +// scss-lint:disable SelectorDepth +// scss-lint:disable NestingDepth + +@import "constants"; +@import "mixins"; + +#protocol-preview-modal .modal-dialog { + .modal-body { + max-height: 75vh; + overflow-y: auto; + width: 100%; + + .ql-editor { + min-height: initial; + } + } +} diff --git a/app/assets/stylesheets/protocols/protocol.scss b/app/assets/stylesheets/protocols/protocol.scss new file mode 100644 index 000000000..fa18dc9f0 --- /dev/null +++ b/app/assets/stylesheets/protocols/protocol.scss @@ -0,0 +1,12 @@ +// scss-lint:disable SelectorDepth +// scss-lint:disable NestingDepth + +@import "constants"; +@import "mixins"; + +.protocol-info { + + .protocol-description { + padding: 0 48px; + } +} diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index e95907076..9b0c50a4d 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -940,18 +940,6 @@ ul.content-activities { } } -#protocol-preview-modal .modal-dialog { - .modal-body { - max-height: 75vh; - overflow-y: auto; - width: 100%; - - .ql-editor { - min-height: initial; - } - } -} - /* Import protocol/s modal */ #import-protocol-modal .modal-dialog { width: 70%; diff --git a/app/views/my_modules/results.html.erb b/app/views/my_modules/results.html.erb index 611933504..48f2d1b7a 100644 --- a/app/views/my_modules/results.html.erb +++ b/app/views/my_modules/results.html.erb @@ -59,17 +59,7 @@ <%= javascript_include_tag "handsontable.full.min" %> -<%= javascript_include_tag "lodash" %> -<%= javascript_include_tag "numeral" %> -<%= javascript_include_tag "numeric" %> -<%= javascript_include_tag "md5" %> -<%= javascript_include_tag "jstat" %> -<%= javascript_include_tag "formula" %> -<%= javascript_include_tag "parser" %> -<%= javascript_include_tag "ruleJS" %> -<%= javascript_include_tag "handsontable.formula" %> -<%= javascript_include_tag "big.min" %> -<%= stylesheet_link_tag "handsontable.formula" %> +<%= render partial: "shared/formulas_libraries.html.erb" %> <%= javascript_include_tag("canvas-to-blob.min") %> <%= javascript_include_tag "assets/wopi/create_wopi_file" %> diff --git a/app/views/protocols/_header.html.erb b/app/views/protocols/_header.html.erb index 5b6badd47..cf2d8a1c8 100644 --- a/app/views/protocols/_header.html.erb +++ b/app/views/protocols/_header.html.erb @@ -8,7 +8,7 @@ <% end %> -