From 9694117635802cc084e858df5a9aff3687e98318 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Sat, 30 Nov 2019 20:04:28 +0100 Subject: [PATCH 01/14] Add new colors and buttons --- app/assets/stylesheets/application.scss | 13 ++- app/assets/stylesheets/constants.scss | 8 +- .../shared_styles/constants/borders.scss | 13 +++ .../shared_styles/constants/colors.scss | 55 ++++++++++++ .../shared_styles/constants/fonts.scss | 61 +++++++++++++ .../shared_styles/constants/transition.scss | 4 + .../shared_styles/elements/buttons.scss | 87 +++++++++++++++++++ .../shared_styles/global_elements.scss | 2 + app/views/projects/index.html.erb | 37 +++++++- 9 files changed, 271 insertions(+), 9 deletions(-) create mode 100644 app/assets/stylesheets/shared_styles/constants/borders.scss create mode 100644 app/assets/stylesheets/shared_styles/constants/colors.scss create mode 100644 app/assets/stylesheets/shared_styles/constants/fonts.scss create mode 100644 app/assets/stylesheets/shared_styles/constants/transition.scss create mode 100644 app/assets/stylesheets/shared_styles/elements/buttons.scss create mode 100644 app/assets/stylesheets/shared_styles/global_elements.scss diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 76b39c9c1..a1f54560d 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1,14 +1,14 @@ /* *= require highlightjs-github-theme *= require_self - *= require_tree . *= require jquery-ui/draggable *= require rails_bootstrap_forms *= require bootstrap-select - *= require constants *= stub reports_pdf */ +@import "shared_styles/global_elements"; + @import "constants"; @import "bootstrap-sprockets"; @import "bootstrap"; @@ -19,9 +19,14 @@ @import "handsontable.full.min"; @import "ajax-bootstrap-select.min"; @import "extend/bootstrap"; -@import "themes/scinote"; -@import "extend/perfect-scrollbar"; +@import "themes/*"; +@import "extend/*"; @import "my_modules/protocols/*"; @import "my_modules/results/*"; @import "protocols/*"; @import "hooks/*"; +@import "partials/*"; +@import "settings/*"; +@import "shared/*"; + +@import "*" diff --git a/app/assets/stylesheets/constants.scss b/app/assets/stylesheets/constants.scss index 718a924ff..ee9c6a7d2 100644 --- a/app/assets/stylesheets/constants.scss +++ b/app/assets/stylesheets/constants.scss @@ -5,7 +5,7 @@ //============================================================================== // Grayscale colors -$color-white: #fff; +/*$color-white: #fff; $color-alabaster: #fcfcfc; $color-concrete: #f2f2f2; $color-gainsboro: #e3e3e3; @@ -41,7 +41,7 @@ $office-ms-powerpoint: #d24726; // MarvinJS color: $marvinjs-color: #29999c; - +*/ //============================================================================== // Other //============================================================================== @@ -69,7 +69,7 @@ $link-hover-color: darken($link-color, 15%); $link-hover-decoration: underline; // Typography -$font-family-lato: Lato, "Open Sans", Arial, Helvetica, sans-serif; +/*$font-family-lato: Lato, "Open Sans", Arial, Helvetica, sans-serif; $font-family-sans-serif: "Open Sans", Arial, Helvetica, sans-serif; $font-family-serif: Georgia, "Times New Roman", Times, serif; $font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace; @@ -89,7 +89,7 @@ $line-height-computed: floor(($font-size-base * $line-height-base)); $headings-font-family: inherit; $headings-font-weight: 500; $headings-line-height: 1.1; -$headings-color: inherit; +$headings-color: inherit;*/ // Components $padding-base-vertical: 6px; diff --git a/app/assets/stylesheets/shared_styles/constants/borders.scss b/app/assets/stylesheets/shared_styles/constants/borders.scss new file mode 100644 index 000000000..b572ca225 --- /dev/null +++ b/app/assets/stylesheets/shared_styles/constants/borders.scss @@ -0,0 +1,13 @@ +@import "colors"; + +$border-radius-default: 4px; +$border-radius-modal: 6px; +$border-radius-tag: 2px; + +$border-default: 1px solid $color-silver-chalice; +$border-secondary: 1px solid $color-volcano; +$border-tertiary: 1px solid $color-alto; + +$border-focus: 1px solid $brand-focus; +$border-danger: 1px solid $brand-danger; +$border-transparent: 1px solid transparent; \ No newline at end of file diff --git a/app/assets/stylesheets/shared_styles/constants/colors.scss b/app/assets/stylesheets/shared_styles/constants/colors.scss new file mode 100644 index 000000000..47720bd2d --- /dev/null +++ b/app/assets/stylesheets/shared_styles/constants/colors.scss @@ -0,0 +1,55 @@ +// Grayscale colors +$color-white: #fff; +$color-concrete: #F0F0F0; +$color-alto: #d0d0d0; +$color-silver-chalice: #a0a0a0; +$color-volcano: #404040; +$color-black: #231f20; + + + +// Theme colors +$brand-primary: #104da9; +$brand-primary-hover: #0c3a80; +$brand-primary-press: #07244f; + +$brand-academy: #a52068; +$brand-academy-dark: #8c1b58; + +$brand-focus: #609fff; +$brand-focus-light: #dfecff; + +$brand-success: #2dbe61; +$brand-success-light: #cbefd7; + +$brand-danger: #e72525; +$brand-danger-hover: #b21d1d; +$brand-danger-press: #801515; +$brand-danger-light: #f9c9c9; + +$brand-warning: #f0ad4e; +$brand-warning-light: #fbebd3; + +// MS Office colors: +$office-ms-word: #2b579a; +$office-ms-excel: #217346; +$office-ms-powerpoint: #d24726; + +// MarvinJS color: +$marvinjs-color: #29999c; + + + +// Don't use them +$color-alabaster: $color-concrete; +$color-gainsboro: $color-concrete; +$color-silver: $color-alto; +$color-dove-gray: $color-volcano; +$color-emperor: $color-volcano; +$brand-default: $color-white; +$brand-info: $brand-focus; +$brand-other: $brand-success; +$brand-extra: $brand-focus; +$brand-primary-light: $brand-focus-light; +$brand-light-blue: $brand-focus-light; + diff --git a/app/assets/stylesheets/shared_styles/constants/fonts.scss b/app/assets/stylesheets/shared_styles/constants/fonts.scss new file mode 100644 index 000000000..cf3269066 --- /dev/null +++ b/app/assets/stylesheets/shared_styles/constants/fonts.scss @@ -0,0 +1,61 @@ +$font-family-lato: Lato, "Open Sans", Arial, Helvetica, sans-serif; +$font-family-sans-serif: "Open Sans", Arial, Helvetica, sans-serif; +$font-family-serif: Georgia, "Times New Roman", Times, serif; +$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace; +$font-family-base: $font-family-lato; +$font-family-icons: "Font Awesome 5 Free"; +$font-size-base: 16px; + + +@mixin font-h1 { + font-family: $font-family-base; + font-size: 24px; + font-weight: bold; +} + +@mixin font-h2 { + font-family: $font-family-base; + font-size: 18px; + font-weight: bold; +} + +@mixin font-h3 { + font-family: $font-family-base; + font-size: $font-size-base; + font-weight: bold; +} + +@mixin font-main { + font-family: $font-family-base; + font-size: $font-size-base; +} + +@mixin font-button { + font-family: $font-family-base; + font-size: 14px; +} + +@mixin font-small { + font-family: $font-family-base; + font-size: 12px; +} + + + +/* + +$font-size-large: ceil(($font-size-base * 1.1)); //16px +$font-size-small: ceil(($font-size-base * .9)); //13px +$font-size-h1: floor(($font-size-base * 2.6)); //36px +$font-size-h2: floor(($font-size-base * 2.15)); //30px +$font-size-h3: ceil(($font-size-base * 1.7)); //24px +$font-size-h4: ceil(($font-size-base * 1.25)); //18px +$font-size-h5: $font-size-base; //14px +$font-size-h6: ceil(($font-size-base * .85)); //12px +$line-height-base: 1.428571429; +$line-height-computed: floor(($font-size-base * $line-height-base)); +$headings-font-family: inherit; +$headings-font-weight: 500; +$headings-line-height: 1.1; +$headings-color: inherit; +*/ \ No newline at end of file diff --git a/app/assets/stylesheets/shared_styles/constants/transition.scss b/app/assets/stylesheets/shared_styles/constants/transition.scss new file mode 100644 index 000000000..e483a735b --- /dev/null +++ b/app/assets/stylesheets/shared_styles/constants/transition.scss @@ -0,0 +1,4 @@ +$timing-function-deceleration: cubic-bezier(0, 0, .2, 1) !default; +$timing-function-standard: cubic-bezier(.4, 0, .2, 1) !default; +$timing-function-acceleration: cubic-bezier(.4, 0, 1, 1) !default; +$timing-function-sharp: cubic-bezier(.4, 0, .6, 1) !default; \ No newline at end of file diff --git a/app/assets/stylesheets/shared_styles/elements/buttons.scss b/app/assets/stylesheets/shared_styles/elements/buttons.scss new file mode 100644 index 000000000..f8b30374e --- /dev/null +++ b/app/assets/stylesheets/shared_styles/elements/buttons.scss @@ -0,0 +1,87 @@ +.sci-btn { + @include font-button; + animation-timing-function: $timing-function-sharp; + background: $brand-primary; + border: 1px solid $brand-primary; + border-radius: $border-radius-default; + color: $color-white; + cursor: pointer; + display: inline-block; + font-size: 14px; + line-height: 20px; + outline: 0; + padding: 7px 16px; + transition: .3s; + user-select: none; + + .fas { + color: inherit; + margin-right: 5px + } + + &:hover { + background: $brand-primary-hover; + } + + &:active { + background: $brand-primary-press; + } + + &.secondary { + background: $color-white; + border: $border-default; + color: $color-black; + + &:hover { + background: $color-concrete; + border: $border-secondary; + } + + &:active { + background: $color-alto; + border: $border-secondary; + } + } + + &.tertiary { + background: transparent; + border: $border-transparent; + color: $color-black; + + &:hover { + background: $color-concrete; + border: $border-transparent; + } + + &:active { + background: $color-alto; + border: $border-transparent; + } + } + + &.sensitive { + background: $brand-danger; + border: $border-danger; + + &:hover { + background: $brand-danger-hover; + } + + &:active { + background: $brand-danger-press; + } + } + + &.icon-btn { + padding: 7px; + width: 36px; + + .fas { + margin: 0; + } + } + + &:focus { + border: $border-focus; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/shared_styles/global_elements.scss b/app/assets/stylesheets/shared_styles/global_elements.scss new file mode 100644 index 000000000..44e52502b --- /dev/null +++ b/app/assets/stylesheets/shared_styles/global_elements.scss @@ -0,0 +1,2 @@ +@import "constants/*"; +@import "elements/*"; \ No newline at end of file diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 6c1fdcf58..0dd059ce8 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -1,5 +1,6 @@ -<% provide(:head_title, t("projects.index.head_title")) %> +<% provide(:head_title, t("projects.index.head_title")) %> + <% if current_team %> <%= render partial: "shared/sidebar", locals: { page: 'project' } %> <%= render partial: "shared/secondary_navigation" %> @@ -168,3 +169,37 @@ <% end %> <%= javascript_include_tag "projects/index" %> + + + +
+
+ + + + + + + +
+
+
+ + + + + + + +
+
+
+ + + + + + + +
+
From 7bfefd8659fbb09f253eb0046a0761f69a22c1fa Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Sat, 30 Nov 2019 21:24:50 +0100 Subject: [PATCH 02/14] Add checkboxes and radio buttons --- .../shared_styles/elements/buttons.scss | 38 +++++++++ .../shared_styles/elements/checkboxes.scss | 62 ++++++++++++++ .../shared_styles/elements/radio_buttons.scss | 80 +++++++++++++++++++ app/views/projects/index.html.erb | 44 +++++++--- 4 files changed, 212 insertions(+), 12 deletions(-) create mode 100644 app/assets/stylesheets/shared_styles/elements/checkboxes.scss create mode 100644 app/assets/stylesheets/shared_styles/elements/radio_buttons.scss diff --git a/app/assets/stylesheets/shared_styles/elements/buttons.scss b/app/assets/stylesheets/shared_styles/elements/buttons.scss index f8b30374e..4fd73b654 100644 --- a/app/assets/stylesheets/shared_styles/elements/buttons.scss +++ b/app/assets/stylesheets/shared_styles/elements/buttons.scss @@ -11,6 +11,7 @@ line-height: 20px; outline: 0; padding: 7px 16px; + position: relative; transition: .3s; user-select: none; @@ -84,4 +85,41 @@ &:focus { border: $border-focus; } + + &:disabled { + background: $color-alto; + border: $border-tertiary; + color: $color-silver-chalice; + opacity: .25; + + &.secondary, + &.tertiary { + background: $color-white; + + &:hover { + background: $color-white; + border: $border-tertiary; + } + } + + &.sensitive { + &:hover { + background: $color-alto; + } + } + } +} + +.sci-btn-group { + display: inline-block; + position: relative; + + .sci-btn { + float: left; + margin: 0 4px 4px 0; + + &:last-of-type { + margin-right: 0; + } + } } \ No newline at end of file diff --git a/app/assets/stylesheets/shared_styles/elements/checkboxes.scss b/app/assets/stylesheets/shared_styles/elements/checkboxes.scss new file mode 100644 index 000000000..649f38117 --- /dev/null +++ b/app/assets/stylesheets/shared_styles/elements/checkboxes.scss @@ -0,0 +1,62 @@ +:root { + --sci-checkbox-size: 16px; +} + +input[type="checkbox"].sci-checkbox { + cursor: pointer; + flex-shrink: 0; + height: var(--sci-checkbox-size); + margin: 0; + opacity: 0; + position: relative; + width: var(--sci-checkbox-size); + z-index: 2; + + + .sci-checkbox-label { + display: inline-block; + flex-shrink: 0; + height: var(--sci-checkbox-size); + margin-left: calc((var(--sci-checkbox-size) * -1) - 3px); + position: relative; + width: var(--sci-checkbox-size); + + &::before { + animation-timing-function: $timing-function-sharp; + background: $color-white; + border: $border-default; + border-radius: 1px; + color: $color-white; + content: ""; + font-family: "Font Awesome 5 Free"; + font-size: calc(var(--sci-checkbox-size) - var(--sci-checkbox-size) * 0.375); + font-weight: 501; + height: var(--sci-checkbox-size); + left: 0; + line-height: calc(var(--sci-checkbox-size) - 2px); + position: absolute; + text-align: center; + top: 1px; + transition: .2s; + width: var(--sci-checkbox-size); + } + } + + &.hidden + .sci-checkbox-label { + display: none; + } + + &:checked + .sci-checkbox-label { + &::before { + background: $brand-primary; + border: 1px solid $brand-primary; + content: "\f00c"; + } + } + + &:disabled + .sci-checkbox-label { + &::before { + background: $color-alto; + border: $border-tertiary; + } + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/shared_styles/elements/radio_buttons.scss b/app/assets/stylesheets/shared_styles/elements/radio_buttons.scss new file mode 100644 index 000000000..23cf8ddd4 --- /dev/null +++ b/app/assets/stylesheets/shared_styles/elements/radio_buttons.scss @@ -0,0 +1,80 @@ +:root { + --sci-radio-size: 16px; +} + +input[type="radio"].sci-radio { + cursor: pointer; + flex-shrink: 0; + height: var(--sci-radio-size); + margin: 0; + opacity: 0; + position: relative; + width: var(--sci-radio-size); + z-index: 2; + + + .sci-radio-label { + display: inline-block; + flex-shrink: 0; + height: var(--sci-radio-size); + margin-left: calc((var(--sci-radio-size) * -1) - 3px); + position: relative; + width: var(--sci-radio-size); + + &::before { + animation-timing-function: $timing-function-sharp; + border: $border-default; + border-radius: 50%; + color: $color-white; + content: ""; + font-family: "Font Awesome 5 Free"; + font-size: calc(var(--sci-radio-size) - var(--sci-radio-size) * 0.375); + font-weight: 501; + height: var(--sci-radio-size); + left: 0; + line-height: calc(var(--sci-radio-size) - 2px); + position: absolute; + text-align: center; + top: 1px; + transition: .2s; + width: var(--sci-radio-size); + } + + &::after { + animation-timing-function: $timing-function-sharp; + background: $color-white; + border-radius: 50%; + content: ""; + display: inline-block; + height: calc(var(--sci-radio-size) - 6px); + left: 3px; + position: absolute; + top: 4px; + transition: .2s; + width: calc(var(--sci-radio-size) - 6px); + } + } + + &.hidden + .sci-radio-label { + display: none; + } + + &:checked + .sci-radio-label { + &::before { + border: 1px solid $brand-primary; + } + &::after { + background: $brand-primary; + } + } + + &:disabled + .sci-radio-label { + &::before { + background: $color-alto; + border: $border-tertiary; + } + + &::after { + display: none; + } + } +} \ No newline at end of file diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 0dd059ce8..641b50ed0 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -173,33 +173,53 @@
-
+
- - -

-
+
- - -

-
+
- - -
+
+
+ + + + +
+
+
+ + + + + + + + +
+
+
+ + + + + + + + +
From 443ab8645fdcc72dab48b9c51e742addaf84d6bc Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Sun, 1 Dec 2019 16:13:25 +0100 Subject: [PATCH 03/14] Add toggles --- .../shared_styles/elements/toggles.scss | 100 ++++++++++++++++++ app/views/projects/index.html.erb | 17 +++ 2 files changed, 117 insertions(+) create mode 100644 app/assets/stylesheets/shared_styles/elements/toggles.scss diff --git a/app/assets/stylesheets/shared_styles/elements/toggles.scss b/app/assets/stylesheets/shared_styles/elements/toggles.scss new file mode 100644 index 000000000..34bcebabb --- /dev/null +++ b/app/assets/stylesheets/shared_styles/elements/toggles.scss @@ -0,0 +1,100 @@ +input[type="checkbox"].sci-toggle-checkbox { + cursor: pointer; + flex-shrink: 0; + height: 16px; + margin: 0; + opacity: 0; + position: relative; + width: 24px; + z-index: 2; + + + .sci-toggle-checkbox-label { + animation-timing-function: $timing-function-sharp; + background: $color-alto; + border-radius: 8px; + display: inline-block; + flex-shrink: 0; + height: 16px; + margin-left: -27px; + position: relative; + transition: .2s; + width: 24px; + + &::before { + animation-timing-function: $timing-function-sharp; + background: $color-white; + border-radius: 7px; + content: ""; + height: 12px; + left: 0; + margin: 2px; + position: absolute; + transition: .2s; + width: 12px; + } + } + + &.hidden + .sci-toggle-checkbox-label { + display: none; + } + + &:checked + .sci-toggle-checkbox-label { + background: $brand-primary; + + &::before { + left: 8px; + } + } + + &:disabled + .sci-toggle-checkbox-label { + + &::before { + background: $color-silver-chalice; + } + } +} + +.sci-toggles-group { + align-items: center; + display: flex; + position: relative; + + input[type="radio"].sci-toggle-item { + cursor: pointer; + height: 36px; + margin: 0; + opacity: 0; + position: relative; + width: 48px; + z-index: 2; + + + .sci-toggle-item-label { + animation-timing-function: $timing-function-sharp; + background: $color-white; + border: $border-default; + border-left-color: transparent; + display: inline-block; + height: 36px; + line-height: 34px; + margin-left: -48px; + position: relative; + text-align: center; + transition: .2s; + width: 48px; + + &:first-of-type { + border-left-color: $color-silver-chalice; + border-radius: $border-radius-default 0 0 $border-radius-default; + } + &:last-of-type { + border-radius: 0 $border-radius-default $border-radius-default 0; + } + } + + &:checked + .sci-toggle-item-label { + background: $brand-primary; + border: 1px solid $brand-primary; + color: $color-white; + } + } +} \ No newline at end of file diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 641b50ed0..2dd1f7795 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -222,4 +222,21 @@
+
+
+ + + + + +
+
+
+ + + + + + +
From 3f38b1e6a17d7d56cace291e60dc536480964272 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Sun, 1 Dec 2019 18:42:43 +0100 Subject: [PATCH 04/14] Add text input fields --- .../shared_styles/elements/input_fields.scss | 134 ++++++++++++++++++ app/views/projects/index.html.erb | 31 ++++ 2 files changed, 165 insertions(+) create mode 100644 app/assets/stylesheets/shared_styles/elements/input_fields.scss diff --git a/app/assets/stylesheets/shared_styles/elements/input_fields.scss b/app/assets/stylesheets/shared_styles/elements/input_fields.scss new file mode 100644 index 000000000..16d2831fd --- /dev/null +++ b/app/assets/stylesheets/shared_styles/elements/input_fields.scss @@ -0,0 +1,134 @@ +.sci-input-container { + display: inline-block; + position: relative; + + label { + @include font-small; + display: inline-block; + font-weight: bold; + margin-bottom: 5px; + } + + .sci-input-field { + @include font-button; + animation-timing-function: $timing-function-sharp; + border: $border-default; + border-radius: $border-radius-default; + height: 36px; + outline: 0; + padding: 0 0 0 10px; + transition: .3s; + width: 100%; + + &:focus { + border: $border-focus; + } + + &:disabled { + background: transparent; + } + } + + .fas { + line-height: 36px; + position: absolute; + text-align: center; + bottom: 0; + width: 25px; + } + + &.left-icon { + + .sci-input-field { + padding: 0 0 0 30px; + } + + .fas { + left: 5px; + } + } + + &.right-icon { + + .sci-input-field { + padding: 0 30px 0 10px; + } + + .fas { + right: 5px; + } + } + + &.success, + &.error { + + .sci-input-field { + padding: 0 30px 0 10px; + } + + &::after { + font-family: "Font Awesome 5 Free"; + font-weight: 501; + line-height: 36px; + position: absolute; + right: 5px; + text-align: center; + bottom: 0; + width: 25px; + } + + &.right-icon { + .sci-input-field { + padding: 0 60px 0 10px; + } + + &::after { + right: 35px; + } + } + } + + &.success { + &::after { + color: $brand-success; + content: "\f00c"; + } + } + + &.error { + .sci-input-field { + border: $border-danger; + } + + &::after { + color: $brand-danger; + content: "\f071"; + } + + &::before { + @include font-small; + color: $brand-danger; + content: attr(data-error-text); + left: 0; + line-height: 15px; + position: absolute; + bottom: -15px; + width: 100%; + } + } + + &.disabled { + label { + color: $color-alto; + } + + .sci-input-field { + border: $border-tertiary; + color: $color-alto; + + &::placeholder { + color: inherit; + } + } + } +} \ No newline at end of file diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 2dd1f7795..868cc6b8e 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -239,4 +239,35 @@
+
+
+ +
+
+
+ + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + +
+
+
+ + +
From aba3baf685ae594efcd1b3512ea27256ba801b6c Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 2 Dec 2019 10:41:02 +0100 Subject: [PATCH 05/14] Fix colors --- app/assets/stylesheets/constants.scss | 24 +++++++++---------- .../shared_styles/constants/colors.scss | 8 +++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/constants.scss b/app/assets/stylesheets/constants.scss index ee9c6a7d2..312a48e04 100644 --- a/app/assets/stylesheets/constants.scss +++ b/app/assets/stylesheets/constants.scss @@ -55,18 +55,18 @@ $infinity: 9999999; //============================================================================== // Grayscale Colors in bootstrap -$gray-darker: $color-black; -$gray-dark: $color-emperor; -$gray: $color-emperor; -$gray-light: $color-dove-gray; -$gray-lighter: $color-concrete; + $gray-darker: $color-black; + $gray-dark: $color-emperor; + $gray: $color-emperor; + $gray-light: $color-dove-gray; + $gray-lighter: $color-concrete; // Scaffolding -$body-bg: $color-concrete; -$text-color: $color-emperor; -$link-color: $brand-primary; -$link-hover-color: darken($link-color, 15%); -$link-hover-decoration: underline; +// $body-bg: $color-concrete; +// $text-color: $color-emperor; +// $link-color: $brand-primary; +// $link-hover-color: darken($link-color, 15%); +// $link-hover-decoration: underline; // Typography /*$font-family-lato: Lato, "Open Sans", Arial, Helvetica, sans-serif; @@ -125,13 +125,13 @@ $btn-default-color: $gray-dark; $btn-default-bg: $brand-default; $btn-default-border: $color-silver; $btn-primary-color: $color-white; -$btn-primary-bg: $brand-success; +$btn-primary-bg: $brand-primary; $btn-primary-border: darken($btn-primary-bg, 5%); $btn-primary-new-color: $color-white; $btn-primary-new-bg: $brand-primary-new; $btn-primary-new-border: darken($brand-primary-new, 5%); $btn-success-color: $color-white; -$btn-success-bg: $brand-success; +$btn-success-bg: $brand-primary; $btn-success-border: darken($btn-success-bg, 5%); $btn-info-color: $color-white; $btn-info-bg: $brand-info; diff --git a/app/assets/stylesheets/shared_styles/constants/colors.scss b/app/assets/stylesheets/shared_styles/constants/colors.scss index 47720bd2d..a8782be3b 100644 --- a/app/assets/stylesheets/shared_styles/constants/colors.scss +++ b/app/assets/stylesheets/shared_styles/constants/colors.scss @@ -1,9 +1,9 @@ // Grayscale colors $color-white: #fff; -$color-concrete: #F0F0F0; -$color-alto: #d0d0d0; -$color-silver-chalice: #a0a0a0; -$color-volcano: #404040; +$color-concrete: #F0F0F6; +$color-alto: #d0d0d8; +$color-silver-chalice: #a0a0a8; +$color-volcano: #404048; $color-black: #231f20; From ef3814cceca4510fea72d4ba63d12766ba1c7300 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Wed, 4 Dec 2019 11:27:22 +0100 Subject: [PATCH 06/14] Add new buttons to protocols, tasks, experiments, projects --- app/assets/javascripts/projects/canvas.js.erb | 4 + app/assets/javascripts/sitewide/comments.js | 1 + .../javascripts/users/settings/teams/show.js | 2 +- app/assets/stylesheets/application.scss | 6 +- app/assets/stylesheets/constants.scss | 4 +- app/assets/stylesheets/marvinjs.scss | 1 + .../my_modules/protocols/index.scss | 1 + .../stylesheets/my_modules/results/index.scss | 14 +- app/assets/stylesheets/projects.scss | 34 +++-- .../shared_styles/elements/buttons.scss | 40 +++++- .../shared_styles/elements/toggles.scss | 1 + .../shared_styles/global_elements.scss | 108 ++++++++++++++- app/assets/stylesheets/steps.scss | 23 +--- app/assets/stylesheets/themes/scinote.scss | 23 ++-- app/helpers/search_helper.rb | 4 +- .../_create_marvin_sketch_button.html.erb | 2 +- app/views/canvas/_edit.html.erb | 10 +- app/views/experiments/canvas.html.erb | 19 +-- .../_state_button_complete.html.erb | 4 +- .../_state_button_uncomplete.html.erb | 4 +- .../modals/_manage_users_modal.html.erb | 2 +- .../protocols/_protocol_buttons.html.erb | 28 ++-- app/views/my_modules/results.html.erb | 62 ++++----- app/views/projects/index.html.erb | 124 ++---------------- app/views/protocols/_steps.html.erb | 8 +- app/views/protocols/index.html.erb | 45 ++++--- .../index/_create_new_modal.html.erb | 4 +- .../index/_protocol_preview_modal.html.erb | 4 +- .../_protocol_preview_modal_body.html.erb | 2 +- .../_protocol_preview_modal_footer.html.erb | 2 +- app/views/result_assets/_edit.html.erb | 4 +- app/views/result_assets/_new.html.erb | 4 +- app/views/result_tables/_edit.html.erb | 4 +- app/views/result_tables/_new.html.erb | 4 +- app/views/result_texts/_edit.html.erb | 4 +- app/views/result_texts/_new.html.erb | 4 +- app/views/shared/_invite_users_modal.html.erb | 6 +- app/views/steps/_edit.html.erb | 4 +- app/views/steps/_new.html.erb | 4 +- app/views/steps/_step.html.erb | 4 +- app/views/users/settings/teams/index.html.erb | 2 +- 41 files changed, 341 insertions(+), 289 deletions(-) diff --git a/app/assets/javascripts/projects/canvas.js.erb b/app/assets/javascripts/projects/canvas.js.erb index 1a82bcceb..0786be505 100644 --- a/app/assets/javascripts/projects/canvas.js.erb +++ b/app/assets/javascripts/projects/canvas.js.erb @@ -496,6 +496,10 @@ function animateReposition(el, left, top) { function bindModeChange() { var buttons = $('#diagram-buttons').find("a[type='button']"); + $('.change-canvas-view').off().on('click', '.sci-toggle-item', function() { + $(this).next().click(); + }) + buttons.on('click', function() { var action = $(this).data("action"); diff --git a/app/assets/javascripts/sitewide/comments.js b/app/assets/javascripts/sitewide/comments.js index 45e4a3ef9..26159335f 100644 --- a/app/assets/javascripts/sitewide/comments.js +++ b/app/assets/javascripts/sitewide/comments.js @@ -65,6 +65,7 @@ var Comments = (function() { $el.find('textarea'), $el.find('.new-comment-button') ); + $el.find('textarea').focus().blur(); $el.find('.new-comment-button').off('click').click(() => { var errorField = $el.find('.new-message-error'); var newButton = this; diff --git a/app/assets/javascripts/users/settings/teams/show.js b/app/assets/javascripts/users/settings/teams/show.js index 96eed79ba..6174038b7 100644 --- a/app/assets/javascripts/users/settings/teams/show.js +++ b/app/assets/javascripts/users/settings/teams/show.js @@ -13,7 +13,7 @@ function AddUserButtonTemplate() { return ` - diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index a1f54560d..f96efa918 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -19,14 +19,14 @@ @import "handsontable.full.min"; @import "ajax-bootstrap-select.min"; @import "extend/bootstrap"; -@import "themes/*"; @import "extend/*"; +@import "hooks/*"; +@import "partials/*"; @import "my_modules/protocols/*"; @import "my_modules/results/*"; @import "protocols/*"; -@import "hooks/*"; -@import "partials/*"; @import "settings/*"; @import "shared/*"; +@import "themes/*"; @import "*" diff --git a/app/assets/stylesheets/constants.scss b/app/assets/stylesheets/constants.scss index 312a48e04..d6274494f 100644 --- a/app/assets/stylesheets/constants.scss +++ b/app/assets/stylesheets/constants.scss @@ -134,8 +134,8 @@ $btn-success-color: $color-white; $btn-success-bg: $brand-primary; $btn-success-border: darken($btn-success-bg, 5%); $btn-info-color: $color-white; -$btn-info-bg: $brand-info; -$btn-info-border: darken($btn-info-bg, 5%); +$btn-info-bg: $brand-primary; +$btn-info-border: $brand-primary; $btn-warning-color: $color-white; $btn-warning-bg: $brand-warning; $btn-warning-border: darken($btn-warning-bg, 5%); diff --git a/app/assets/stylesheets/marvinjs.scss b/app/assets/stylesheets/marvinjs.scss index 92d1a2da7..918b8016a 100644 --- a/app/assets/stylesheets/marvinjs.scss +++ b/app/assets/stylesheets/marvinjs.scss @@ -140,6 +140,7 @@ } .new-marvinjs-upload-button { + padding: 2px 16px; .new-marvinjs-upload-icon { display: inline-block; diff --git a/app/assets/stylesheets/my_modules/protocols/index.scss b/app/assets/stylesheets/my_modules/protocols/index.scss index 8e9736d33..d5a76bf33 100644 --- a/app/assets/stylesheets/my_modules/protocols/index.scss +++ b/app/assets/stylesheets/my_modules/protocols/index.scss @@ -259,6 +259,7 @@ .my-module-recent-protocols { flex-grow: 1; + height: 36px; margin-bottom: 5px; position: relative; diff --git a/app/assets/stylesheets/my_modules/results/index.scss b/app/assets/stylesheets/my_modules/results/index.scss index 9fe221dc4..c52bb0323 100644 --- a/app/assets/stylesheets/my_modules/results/index.scss +++ b/app/assets/stylesheets/my_modules/results/index.scss @@ -8,10 +8,14 @@ #results-toolbar { .help_tooltips { - .btn-default { - border: 0; - color: inherit; - margin-left: 10px; + align-items: center; + display: flex; + + .add-result-text { + display: inline-block; + line-height: 36px; + margin-bottom: 5px; + margin-right: 5px; } } -} +} \ No newline at end of file diff --git a/app/assets/stylesheets/projects.scss b/app/assets/stylesheets/projects.scss index 4c43691c9..c7ea813aa 100644 --- a/app/assets/stylesheets/projects.scss +++ b/app/assets/stylesheets/projects.scss @@ -48,26 +48,38 @@ $color-module-hover: $brand-primary; /* Canvas index page */ #canvas-container:not(.canvas-container-edit-mode) { - margin-top: 20px; + margin-top: 5px; } /********************************** * jsPlumb CANVAS RELATED STYLING * *********************************/ #diagram-buttons { - margin-bottom: 10px; + align-items: center; + display: flex; + + #edit-canvas-button { + margin-right: 5px; + } + + .actions-button { + margin-right: 15px; + } + + .toolbarButtons { + align-items: center; + display: flex; + + .zoom-text { + margin-right: 5px; + } + } } #update-canvas { - #canvas-new-module { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; - } - .btn-group > .btn:first-child { - border-bottom-left-radius: 0; - } - .btn-group > .btn:last-child { - border-bottom-right-radius: 0; + + .canvas-header{ + margin-bottom: 5px; } } diff --git a/app/assets/stylesheets/shared_styles/elements/buttons.scss b/app/assets/stylesheets/shared_styles/elements/buttons.scss index 4fd73b654..f051c2981 100644 --- a/app/assets/stylesheets/shared_styles/elements/buttons.scss +++ b/app/assets/stylesheets/shared_styles/elements/buttons.scss @@ -13,6 +13,7 @@ padding: 7px 16px; position: relative; transition: .3s; + text-decoration: none; user-select: none; .fas { @@ -22,10 +23,21 @@ &:hover { background: $brand-primary-hover; + color: $color-white; + text-decoration: none; } &:active { background: $brand-primary-press; + color: $color-white; + text-decoration: none; + } + + &:focus { + border: $border-focus; + color: $color-white; + outline: 0; + text-decoration: none; } &.secondary { @@ -36,11 +48,18 @@ &:hover { background: $color-concrete; border: $border-secondary; + color: $color-black; } &:active { background: $color-alto; border: $border-secondary; + color: $color-black; + } + + &:focus { + border: $border-focus; + color: $color-black; } } @@ -52,11 +71,18 @@ &:hover { background: $color-concrete; border: $border-transparent; + color: $color-black; } &:active { background: $color-alto; border: $border-transparent; + color: $color-black; + } + + &:focus { + border: $border-focus; + color: $color-black; } } @@ -71,6 +97,11 @@ &:active { background: $brand-danger-press; } + + &:focus { + border: $border-focus; + color: $color-white; + } } &.icon-btn { @@ -82,15 +113,11 @@ } } - &:focus { - border: $border-focus; - } - &:disabled { background: $color-alto; border: $border-tertiary; color: $color-silver-chalice; - opacity: .25; + opacity: .5; &.secondary, &.tertiary { @@ -99,6 +126,7 @@ &:hover { background: $color-white; border: $border-tertiary; + color: $color-silver-chalice; } } @@ -118,7 +146,7 @@ float: left; margin: 0 4px 4px 0; - &:last-of-type { + &:nth-last-child(1) { margin-right: 0; } } diff --git a/app/assets/stylesheets/shared_styles/elements/toggles.scss b/app/assets/stylesheets/shared_styles/elements/toggles.scss index 34bcebabb..5a1fdd9c1 100644 --- a/app/assets/stylesheets/shared_styles/elements/toggles.scss +++ b/app/assets/stylesheets/shared_styles/elements/toggles.scss @@ -73,6 +73,7 @@ input[type="checkbox"].sci-toggle-checkbox { background: $color-white; border: $border-default; border-left-color: transparent; + color: $color-black; display: inline-block; height: 36px; line-height: 34px; diff --git a/app/assets/stylesheets/shared_styles/global_elements.scss b/app/assets/stylesheets/shared_styles/global_elements.scss index 44e52502b..230c6eb10 100644 --- a/app/assets/stylesheets/shared_styles/global_elements.scss +++ b/app/assets/stylesheets/shared_styles/global_elements.scss @@ -1,2 +1,108 @@ @import "constants/*"; -@import "elements/*"; \ No newline at end of file +@import "elements/*"; + +// Examples + +/* + +
+
+ + + + +
+
+
+ + + + +
+
+
+ + + + +
+
+
+ + + + +
+
+
+ + + + + + + + +
+
+
+ + + + + + + + +
+
+
+ + + + + +
+
+
+ + + + + + +
+
+
+ +
+
+
+ + +
+
+
+ + + +
+
+
+ + + +
+
+
+ + +
+
+
+ + +
+
+ +*/ \ No newline at end of file diff --git a/app/assets/stylesheets/steps.scss b/app/assets/stylesheets/steps.scss index c1562b4eb..3a129293b 100644 --- a/app/assets/stylesheets/steps.scss +++ b/app/assets/stylesheets/steps.scss @@ -42,28 +42,17 @@ .complete-step-btn { display: inline-block; - line-height: 39px; - - button { - display: block; - font-size: 12px; - margin: auto 0; - padding: 3px 10px; - - span { - font-size: 15px; - } - } } .panel-heading { - height: 39px; + border: 0; + height: 46px; padding-bottom: 0; padding-top: 0; .panel-options { bottom: 0; - line-height: 39px; + line-height: 46px; } span.step-number { @@ -76,19 +65,19 @@ .left-floats { align-items: center; display: flex; - height: 39px; + height: 100%; padding-right: 15px; .step-name-link { display: flex; flex-shrink: 1; - line-height: 39px; + line-height: 100%; overflow: hidden; .name-block { display: flex; flex-shrink: 1; - height: 39px; + height: 100%; overflow: hidden; @media (max-width: 1188px) { diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index 7be1f04a1..20365fc25 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -286,8 +286,8 @@ a[data-toggle="tooltip"] { .navbar-secondary { background: $color-concrete !important; margin-left: -280px; - padding-left: 294px; - padding-right: 97px; + padding-left: 280px; + padding-right: 82px; margin-bottom: 0; border-color: transparent; border-bottom: 0; @@ -310,7 +310,7 @@ a[data-toggle="tooltip"] { #secondary-menu { background: $color-white; border-bottom: 1px solid $color-gainsboro; - margin-top: 15px; + padding-top: 15px; .open > a, .open > a:hover, @@ -398,7 +398,7 @@ a[data-toggle="tooltip"] { } .navbar-without-sidebar{ - padding-left: 15px; + padding-left: 0; margin-left: 0px; -webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; @@ -498,7 +498,7 @@ a[data-toggle="tooltip"] { margin-bottom: 15px; } - & > .btn-group { + & > .sci-btn-group { margin-right: 30px; } } @@ -918,13 +918,15 @@ ul.content-activities { margin-bottom: 5px; .protocol-button { - margin-bottom: 5px; + + .sci-btn-group { + float: left + } } .protocol-status-bar { display: flex; - height: 33px; - margin-bottom: 5px; + height: 40px; margin-right: 15px; } @@ -932,7 +934,8 @@ ul.content-activities { border-color: $color-silver; box-shadow: none; display: inline-block; - height: 33px; + height: 36px; + margin-bottom: 5px; & > .panel-body { padding: 0 0 0 15px; @@ -944,7 +947,7 @@ ul.content-activities { .link-button, .link-toggle { - height: 33px; + height: 36px; position: relative; right: -1px; top: -1px; diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 794efd8cf..48b49c2d9 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -25,11 +25,11 @@ module SearchHelper if search_team != current_team link_to text, path, - class: 'btn btn-success', + class: 'sci-btn', data: { confirm: t('users.settings.changed_team_in_search', team: search_team.name) } else - link_to text, path, class: 'btn btn-success' + link_to text, path, class: 'sci-btn' end end end diff --git a/app/views/assets/marvinjs/_create_marvin_sketch_button.html.erb b/app/views/assets/marvinjs/_create_marvin_sketch_button.html.erb index d4d3c472f..5fa53dafa 100644 --- a/app/views/assets/marvinjs/_create_marvin_sketch_button.html.erb +++ b/app/views/assets/marvinjs/_create_marvin_sketch_button.html.erb @@ -1,5 +1,5 @@ " data-unsaved-work-text="<%=t "experiments.canvas.edit.unsaved_work" %>" > - <%= bootstrap_form_tag url: canvas_experiment_url, method: "post" do |f| %> + <%= bootstrap_form_tag url: canvas_experiment_url, method: "post", html: {class: "canvas-header"} do |f| %> <% if can_manage_experiment?(@experiment) %> - <%=link_to "", type: "button", class: "btn btn-primary help_tooltips", id: "canvas-new-module", + <%=link_to "", type: "button", class: "sci-btn help_tooltips", id: "canvas-new-module", data: { tooltiplink: I18n.t('tooltips.link.task.new'), tooltipcontent: I18n.t('tooltips.text.task.new') } do %> @@ -24,12 +24,12 @@ <% end %> <% end %> -
- <%= link_to canvas_experiment_path(@experiment), type: "button", class: "btn btn-default cancel-edit-canvas" do %> +
+ <%= link_to canvas_experiment_path(@experiment), type: "button", class: "sci-btn secondary cancel-edit-canvas" do %>   <% end %> - <%= f.submit class: "btn btn-success", id: "canvas-save" do %> + <%= f.submit class: "sci-btn", id: "canvas-save" do %> <%= t("experiments.canvas.edit.save_short") %> <% end %> diff --git a/app/views/experiments/canvas.html.erb b/app/views/experiments/canvas.html.erb index 2769de66f..a8732f63b 100644 --- a/app/views/experiments/canvas.html.erb +++ b/app/views/experiments/canvas.html.erb @@ -12,13 +12,13 @@ type: 'button', id: 'edit-canvas-button', data: { action: 'edit' }, - class: 'ajax btn btn-primary' do %> + class: 'ajax sci-btn' do %> <% end %> - - diff --git a/app/views/my_modules/_state_button_uncomplete.html.erb b/app/views/my_modules/_state_button_uncomplete.html.erb index a923e5d26..6f1ca9acd 100644 --- a/app/views/my_modules/_state_button_uncomplete.html.erb +++ b/app/views/my_modules/_state_button_uncomplete.html.erb @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/app/views/my_modules/modals/_manage_users_modal.html.erb b/app/views/my_modules/modals/_manage_users_modal.html.erb index baf988374..3b6c518f3 100644 --- a/app/views/my_modules/modals/_manage_users_modal.html.erb +++ b/app/views/my_modules/modals/_manage_users_modal.html.erb @@ -15,7 +15,7 @@ <%=t "experiments.canvas.full_zoom.modal_manage_users.contact_admins", team: @experiment.project.team.name %> <% end %> - +
diff --git a/app/views/my_modules/protocols/_protocol_buttons.html.erb b/app/views/my_modules/protocols/_protocol_buttons.html.erb index 421dbbd3d..874aab933 100644 --- a/app/views/my_modules/protocols/_protocol_buttons.html.erb +++ b/app/views/my_modules/protocols/_protocol_buttons.html.erb @@ -1,6 +1,6 @@
-
-
@@ -25,17 +25,17 @@
  •  <%= t("my_modules.protocols.buttons.load_protocol_from_file") %>
  • <% end %> + <% if can_read_experiment?(@my_module.experiment) %> + <%= link_to raw(" " + t('my_modules.protocols.buttons.export') + ""), export_protocols_path(protocol_ids: @protocol.id, my_module_id: @my_module.id), class: "sci-btn secondary", data: { turbolinks: false } %> + <% else %> +  <%= t("my_modules.protocols.buttons.export") %> + <% end %> + <% if can_read_protocol_in_module?(@protocol) && can_create_protocols_in_repository?(@protocol.team) %> + +  <%= t("my_modules.protocols.buttons.copy_to_repository") %> + + <% else %> +  <%= t("my_modules.protocols.buttons.copy_to_repository") %> + <% end %>
    - <% if can_read_experiment?(@my_module.experiment) %> - <%= link_to raw(" " + t('my_modules.protocols.buttons.export') + ""), export_protocols_path(protocol_ids: @protocol.id, my_module_id: @my_module.id), class: "btn btn-default", data: { turbolinks: false } %> - <% else %> -  <%= t("my_modules.protocols.buttons.export") %> - <% end %> - <% if can_read_protocol_in_module?(@protocol) && can_create_protocols_in_repository?(@protocol.team) %> - -  <%= t("my_modules.protocols.buttons.copy_to_repository") %> - - <% else %> -  <%= t("my_modules.protocols.buttons.copy_to_repository") %> - <% end %>
    diff --git a/app/views/my_modules/results.html.erb b/app/views/my_modules/results.html.erb index 3f0e9bb80..105ac947d 100644 --- a/app/views/my_modules/results.html.erb +++ b/app/views/my_modules/results.html.erb @@ -6,45 +6,47 @@
    -
    - -
    <% if can_manage_module?(@my_module) %> -
    - - - - - - - - - - - - - - <%= render partial: '/assets/marvinjs/create_marvin_sketch_button.html.erb', - locals: { element_id: @my_module.id, element_type: 'Result', sketch_container: "#results[data-module-id=#{@my_module.id}]" } %> - <%= render partial: "assets/wopi/create_wopi_file_button", - locals: { element_id: @my_module.id, element_type: 'Result' } %> + +
    + + + + + + + + + + + + + <%= render partial: '/assets/marvinjs/create_marvin_sketch_button.html.erb', + locals: { element_id: @my_module.id, element_type: 'Result', sketch_container: "#results[data-module-id=#{@my_module.id}]" } %> + <%= render partial: "assets/wopi/create_wopi_file_button", + locals: { element_id: @my_module.id, element_type: 'Result' } %> +
    <% end %>
    diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 868cc6b8e..3e44d52b3 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -19,8 +19,8 @@ <%= render partial: "new.html.erb", locals: { form: f, teams: @teams } %>
    @@ -75,11 +75,11 @@ -
    -
    - - - - -
    -
    -
    - - - - -
    -
    -
    - - - - -
    -
    -
    - - - - - - - - -
    -
    -
    - - - - - - - - -
    -
    -
    - - - - - -
    -
    -
    - - - - - - -
    -
    -
    - -
    -
    -
    - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - -
    -
    -
    - - -
    - diff --git a/app/views/protocols/_steps.html.erb b/app/views/protocols/_steps.html.erb index 304921870..4a39256a3 100644 --- a/app/views/protocols/_steps.html.erb +++ b/app/views/protocols/_steps.html.erb @@ -2,7 +2,7 @@
    @@ -28,7 +28,7 @@
    diff --git a/app/views/protocols/index.html.erb b/app/views/protocols/index.html.erb index e4bd1ded1..143b40e47 100644 --- a/app/views/protocols/index.html.erb +++ b/app/views/protocols/index.html.erb @@ -28,39 +28,38 @@
    <%= t(@type == :public ? "protocols.index.public_description" : "protocols.index.private_description") %>
    -
    - data-url="<%= create_new_modal_protocols_path(team: @current_team, type: @type) %>"> + -
    - + <% if can_create_protocols_in_repository?(@current_team) %> <% end %> - +
    -
    - + <% elsif @type == :archive %>
    <%= t("protocols.index.archive.description") %>
    -
    - + <% end %> diff --git a/app/views/protocols/index/_create_new_modal.html.erb b/app/views/protocols/index/_create_new_modal.html.erb index 22047f3d0..32efcfa50 100644 --- a/app/views/protocols/index/_create_new_modal.html.erb +++ b/app/views/protocols/index/_create_new_modal.html.erb @@ -9,8 +9,8 @@
    diff --git a/app/views/protocols/index/_protocol_preview_modal.html.erb b/app/views/protocols/index/_protocol_preview_modal.html.erb index 68f35c55b..5ea63c0cb 100644 --- a/app/views/protocols/index/_protocol_preview_modal.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal.html.erb @@ -3,8 +3,8 @@
    diff --git a/app/views/canvas/edit/modal/_move_module.html.erb b/app/views/canvas/edit/modal/_move_module.html.erb index 5b8482e4f..d5ad8a96f 100644 --- a/app/views/canvas/edit/modal/_move_module.html.erb +++ b/app/views/canvas/edit/modal/_move_module.html.erb @@ -23,9 +23,9 @@ <% end %>
    diff --git a/app/views/experiments/_edit_modal.html.erb b/app/views/experiments/_edit_modal.html.erb index a33a6ea97..9910294c0 100644 --- a/app/views/experiments/_edit_modal.html.erb +++ b/app/views/experiments/_edit_modal.html.erb @@ -15,8 +15,8 @@ <%= render partial: "form.html.erb", locals: { form: f } %> diff --git a/app/views/experiments/_move_modal.html.erb b/app/views/experiments/_move_modal.html.erb index 521250036..9f2e88a8e 100644 --- a/app/views/experiments/_move_modal.html.erb +++ b/app/views/experiments/_move_modal.html.erb @@ -27,9 +27,9 @@ <%= t("experiments.move.notice") %> diff --git a/app/views/my_modules/protocols/_copy_to_repository_modal.html.erb b/app/views/my_modules/protocols/_copy_to_repository_modal.html.erb index 5c2e0c95d..849b6714d 100644 --- a/app/views/my_modules/protocols/_copy_to_repository_modal.html.erb +++ b/app/views/my_modules/protocols/_copy_to_repository_modal.html.erb @@ -9,8 +9,8 @@ diff --git a/app/views/my_modules/protocols/_load_from_repository_modal.html.erb b/app/views/my_modules/protocols/_load_from_repository_modal.html.erb index fb60bab63..02cd5ae12 100644 --- a/app/views/my_modules/protocols/_load_from_repository_modal.html.erb +++ b/app/views/my_modules/protocols/_load_from_repository_modal.html.erb @@ -9,8 +9,8 @@ diff --git a/app/views/reports/index.html.erb b/app/views/reports/index.html.erb index 0c9bcf20f..f9921bbb5 100644 --- a/app/views/reports/index.html.erb +++ b/app/views/reports/index.html.erb @@ -10,15 +10,15 @@
    <% if can_manage_reports?(current_team) %> - <%= link_to '#', remote: true, class: 'btn btn-primary', id: 'new-report-btn' do %> + <%= link_to '#', remote: true, class: 'sci-btn', id: 'new-report-btn' do %> <% end %> - <%= link_to "", remote: true, class: "btn btn-default", id: "edit-report-btn" do %> + <%= link_to "", remote: true, class: "sci-btn secondary", id: "edit-report-btn" do %> <% end %> - <%= link_to "", remote: true, class: "btn btn-default", id: "delete-reports-btn" do %> + <%= link_to "", remote: true, class: "sci-btn secondary", id: "delete-reports-btn" do %> <% end %> @@ -97,9 +97,9 @@
    @@ -67,8 +67,8 @@ diff --git a/app/views/reports/new/_report_navigation.html.erb b/app/views/reports/new/_report_navigation.html.erb index 8b1f39b45..506dd0fc5 100644 --- a/app/views/reports/new/_report_navigation.html.erb +++ b/app/views/reports/new/_report_navigation.html.erb @@ -2,7 +2,7 @@
    - <%= link_to "", class: "btn btn-default", remote: true, id: "print-report" do %> + <%= link_to "", class: "sci-btn secondary", remote: true, id: "print-report" do %> <% end %> -*/ \ No newline at end of file +*/ diff --git a/app/views/experiments/_new_modal.html.erb b/app/views/experiments/_new_modal.html.erb index 8d75300e3..7ac413fb6 100644 --- a/app/views/experiments/_new_modal.html.erb +++ b/app/views/experiments/_new_modal.html.erb @@ -11,8 +11,8 @@ <%= render partial: "form.html.erb", locals: { form: f } %>
    diff --git a/app/views/global_activities/_top_pane.html.erb b/app/views/global_activities/_top_pane.html.erb index 416971ee2..e7c06eb6c 100644 --- a/app/views/global_activities/_top_pane.html.erb +++ b/app/views/global_activities/_top_pane.html.erb @@ -1,6 +1,6 @@ -

    +

    <%= t('activities.index.global_activities_title') %> -

    +
    <%= t('activities.index.expand_all') %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 0af043348..0891c5d70 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -11,7 +11,7 @@
    diff --git a/public/images/scinote_icon.svg b/public/images/scinote_icon.svg new file mode 100644 index 000000000..365899717 --- /dev/null +++ b/public/images/scinote_icon.svg @@ -0,0 +1,5 @@ + + + + + From e714787c38c22a2f2ba702434315f8f5e6730e05 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Thu, 12 Dec 2019 13:17:09 +0100 Subject: [PATCH 10/14] Fix markup --- app/assets/javascripts/projects/index.js | 27 ++++++++++--------- app/assets/stylesheets/constants.scss | 10 +++---- .../stylesheets/my_modules/results/index.scss | 2 +- app/assets/stylesheets/projects.scss | 4 +-- app/assets/stylesheets/shared/comments.scss | 2 +- app/assets/stylesheets/themes/scinote.scss | 10 +++---- 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/app/assets/javascripts/projects/index.js b/app/assets/javascripts/projects/index.js index 8f55e18a0..76bed9eef 100644 --- a/app/assets/javascripts/projects/index.js +++ b/app/assets/javascripts/projects/index.js @@ -510,19 +510,20 @@ } function initProjectsViewModeSwitch() { - $('input[name=projects-view-mode-selector]').off().on('change', function() { - if ($(this).val() === projectsViewMode) { - return; - } - projectsViewMode = $(this).val(); - if (projectsChanged) { - refreshCurrentView(); - } - projectsChanged = false; - }) - .on('click', function() { - $(this).next().click(); - }); + $('input[name=projects-view-mode-selector]').off() + .on('change', function() { + if ($(this).val() === projectsViewMode) { + return; + } + projectsViewMode = $(this).val(); + if (projectsChanged) { + refreshCurrentView(); + } + projectsChanged = false; + }) + .on('click', function() { + $(this).next().click(); + }); } function initSorting() { diff --git a/app/assets/stylesheets/constants.scss b/app/assets/stylesheets/constants.scss index d6274494f..ea529ddce 100644 --- a/app/assets/stylesheets/constants.scss +++ b/app/assets/stylesheets/constants.scss @@ -55,11 +55,11 @@ $infinity: 9999999; //============================================================================== // Grayscale Colors in bootstrap - $gray-darker: $color-black; - $gray-dark: $color-emperor; - $gray: $color-emperor; - $gray-light: $color-dove-gray; - $gray-lighter: $color-concrete; +$gray-darker: $color-black; +$gray-dark: $color-emperor; +$gray: $color-emperor; +$gray-light: $color-dove-gray; +$gray-lighter: $color-concrete; // Scaffolding // $body-bg: $color-concrete; diff --git a/app/assets/stylesheets/my_modules/results/index.scss b/app/assets/stylesheets/my_modules/results/index.scss index c52bb0323..5d8714ee0 100644 --- a/app/assets/stylesheets/my_modules/results/index.scss +++ b/app/assets/stylesheets/my_modules/results/index.scss @@ -18,4 +18,4 @@ margin-right: 5px; } } -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/projects.scss b/app/assets/stylesheets/projects.scss index 4af0e48c4..a7859d1b9 100644 --- a/app/assets/stylesheets/projects.scss +++ b/app/assets/stylesheets/projects.scss @@ -40,7 +40,7 @@ $color-module-hover: $brand-primary; } .projects-view-mode-switch { - margin: 8px 10px 12px ; + margin: 8px 10px 12px; } } @@ -78,7 +78,7 @@ $color-module-hover: $brand-primary; #update-canvas { - .canvas-header{ + .canvas-header { margin-bottom: 5px; } } diff --git a/app/assets/stylesheets/shared/comments.scss b/app/assets/stylesheets/shared/comments.scss index 5af497afb..93356a7db 100644 --- a/app/assets/stylesheets/shared/comments.scss +++ b/app/assets/stylesheets/shared/comments.scss @@ -219,8 +219,8 @@ textarea { border: 1px solid transparent; box-shadow: none; - overflow: hidden; outline: none; + overflow: hidden; width: 100%; &:focus { diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index 3d6e3a528..0aceee0de 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -399,11 +399,11 @@ a[data-toggle="tooltip"] { } .navbar-without-sidebar{ - padding-left: 0; margin-left: 0px; - -webkit-transition: all 0.5s ease; - -moz-transition: all 0.5s ease; + padding-left: 0; -o-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + -webkit-transition: all 0.5s ease; transition: all 0.5s ease; } @@ -499,7 +499,7 @@ a[data-toggle="tooltip"] { margin-bottom: 15px; } - & > .sci-btn-group { + > .sci-btn-group { margin-right: 30px; } } @@ -921,7 +921,7 @@ ul.content-activities { .protocol-button { .sci-btn-group { - float: left + float: left; } } From 464d03558ac8987c9f86cd1ace9d5392a2770426 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Thu, 19 Dec 2019 14:18:09 +0100 Subject: [PATCH 11/14] Fix markup, replace buttons and add new logo --- app/assets/javascripts/sitewide/avatar_modal.js | 8 ++++---- app/assets/stylesheets/global_activities.scss | 16 ---------------- app/assets/stylesheets/protocol_management.scss | 10 +--------- .../shared_styles/constants/fonts.scss | 12 ++++++------ .../shared_styles/elements/buttons.scss | 12 ++++++------ .../shared_styles/elements/checkboxes.scss | 5 ++--- .../shared_styles/elements/input_fields.scss | 10 +++------- .../shared_styles/elements/radio_buttons.scss | 2 -- .../stylesheets/themes/main_navigation.scss | 8 ++++---- app/assets/stylesheets/themes/scinote.scss | 8 ++++++++ app/views/global_activities/_top_pane.html.erb | 14 ++++++++------ app/views/my_module_tags/_index_edit.html.erb | 4 ++-- .../modals/_manage_module_tags_modal.html.erb | 2 +- .../_preview_modal_footer.html.erb | 6 +++--- .../protocol_importers/_protocol_card.html.erb | 2 +- app/views/steps/_step.html.erb | 8 ++++---- app/views/user_my_modules/_index_edit.html.erb | 2 +- app/views/user_projects/_index_edit.html.erb | 2 +- app/views/users/confirmations/new.html.erb | 2 +- app/views/users/invitations/edit.html.erb | 2 +- app/views/users/passwords/edit.html.erb | 2 +- app/views/users/passwords/new.html.erb | 2 +- app/views/users/registrations/new.html.erb | 2 +- .../registrations/new_with_provider.html.erb | 2 +- app/views/users/sessions/new.html.erb | 2 +- .../users/shared/_user_avatars_modal.html.erb | 2 +- app/views/users/unlocks/new.html.erb | 2 +- public/images/scinote_icon.svg | 8 ++++---- 28 files changed, 68 insertions(+), 89 deletions(-) diff --git a/app/assets/javascripts/sitewide/avatar_modal.js b/app/assets/javascripts/sitewide/avatar_modal.js index 893ed0c64..7859c54d1 100644 --- a/app/assets/javascripts/sitewide/avatar_modal.js +++ b/app/assets/javascripts/sitewide/avatar_modal.js @@ -31,7 +31,7 @@ var avatarsModal = (function() { reader.readAsDataURL(inputField.files[0]); reader.onload = function() { var avatarContainer = $(modal).find('.avatar-preview-container'); - $(modal).find('.save-button').removeClass('disabled'); + $(modal).find('.save-button').removeClass('disabled').attr('disabled', false); $(modal).find('#new_avatar').val(reader.result); avatarContainer.show().children().remove(); @@ -50,7 +50,7 @@ var avatarsModal = (function() { function initPredefinedAvatars() { $(modal).find('.avatar-collection .avatar').click(function() { - $(modal).find('.save-button').removeClass('disabled'); + $(modal).find('.save-button').removeClass('disabled').attr('disabled', false); $(modal).find('#raw_avatar')[0].value = null; $(modal).find('.avatar-preview-container').hide(); $(modal).find('.current-avatar').show().find('img') @@ -63,7 +63,7 @@ var avatarsModal = (function() { $(modal).find('.save-button').click(function() { if ($(this).hasClass('disabled')) return; - $(this).addClass('disabled'); + $(this).addClass('disabled').attr('disabled', true); $.ajax({ url: $(modal).data('update-url'), type: 'PUT', @@ -76,7 +76,7 @@ var avatarsModal = (function() { location.reload(); }, error: () => { - $(this).removeClass('disabled'); + $(this).removeClass('disabled').attr('disabled', false); } }); }); diff --git a/app/assets/stylesheets/global_activities.scss b/app/assets/stylesheets/global_activities.scss index e6a949b3b..1ef49cded 100644 --- a/app/assets/stylesheets/global_activities.scss +++ b/app/assets/stylesheets/global_activities.scss @@ -34,22 +34,6 @@ display: flex; height: 42px; - .hide-actions { - align-items: center; - color: $color-silver-chalice; - display: flex; - margin-right: 20px; - - &:hover { - text-decoration: none; - } - - .fas { - font-size: 18px; - margin-right: 5px; - } - } - .ga-search-container { display: none; flex-grow: 1; diff --git a/app/assets/stylesheets/protocol_management.scss b/app/assets/stylesheets/protocol_management.scss index a11303793..67573f78c 100644 --- a/app/assets/stylesheets/protocol_management.scss +++ b/app/assets/stylesheets/protocol_management.scss @@ -226,6 +226,7 @@ align-items: center; display: flex; height: 30px; + margin-top: 5px; .info-line.button { flex-grow: 1; @@ -355,15 +356,6 @@ } } - .external-import-btn { - background-color: $brand-primary; - border: 0; - color: $color-white; - font-size: 12px; - padding-bottom: 3px; - padding-top: 3px; - } - .footer { background: $color-white; bottom: -30px; diff --git a/app/assets/stylesheets/shared_styles/constants/fonts.scss b/app/assets/stylesheets/shared_styles/constants/fonts.scss index 0ba864524..0517b6b69 100644 --- a/app/assets/stylesheets/shared_styles/constants/fonts.scss +++ b/app/assets/stylesheets/shared_styles/constants/fonts.scss @@ -6,40 +6,40 @@ $font-family-base: $font-family-lato; $font-family-icons: "Font Awesome 5 Free"; $font-size-base: 16px; +$font-fas-check: "\f00c"; +$font-fas-exclamation-triangle: "\f071"; @mixin font-h1 { - font-family: $font-family-base; font-size: 24px; font-weight: bold; } @mixin font-h2 { - font-family: $font-family-base; font-size: 18px; font-weight: bold; } @mixin font-h3 { - font-family: $font-family-base; font-size: $font-size-base; font-weight: bold; } @mixin font-main { - font-family: $font-family-base; font-size: $font-size-base; } @mixin font-button { - font-family: $font-family-base; font-size: 14px; } @mixin font-small { - font-family: $font-family-base; font-size: 12px; } +@mixin font-awesome { + font-family: "Font Awesome 5 Free"; + font-weight: 501; +} diff --git a/app/assets/stylesheets/shared_styles/elements/buttons.scss b/app/assets/stylesheets/shared_styles/elements/buttons.scss index 446dda727..c7d5e4e0e 100644 --- a/app/assets/stylesheets/shared_styles/elements/buttons.scss +++ b/app/assets/stylesheets/shared_styles/elements/buttons.scss @@ -9,11 +9,11 @@ color: $color-white; cursor: pointer; display: inline-block; - font-size: 14px; line-height: 20px; outline: 0; padding: 7px 16px; position: relative; + text-align: center; text-decoration: none; transition: .3s; user-select: none; @@ -36,7 +36,7 @@ } &:focus { - border: $border-focus; + box-shadow: 0 0 0 1px $brand-focus; color: $color-white; outline: 0; text-decoration: none; @@ -60,7 +60,7 @@ } &:focus { - border: $border-focus; + box-shadow: 0 0 0 1px $brand-focus; color: $color-black; } } @@ -83,7 +83,7 @@ } &:focus { - border: $border-focus; + box-shadow: 0 0 0 1px $brand-focus; color: $color-black; } } @@ -101,7 +101,7 @@ } &:focus { - border: $border-focus; + box-shadow: 0 0 0 1px $brand-focus; color: $color-white; } } @@ -146,7 +146,7 @@ .sci-btn { float: left; - margin: 0 4px 4px 0; + margin: 2px 4px 2px 0; &:nth-last-child(1) { margin-right: 0; diff --git a/app/assets/stylesheets/shared_styles/elements/checkboxes.scss b/app/assets/stylesheets/shared_styles/elements/checkboxes.scss index 311a58139..c7cee3baa 100644 --- a/app/assets/stylesheets/shared_styles/elements/checkboxes.scss +++ b/app/assets/stylesheets/shared_styles/elements/checkboxes.scss @@ -23,15 +23,14 @@ input[type="checkbox"].sci-checkbox { width: var(--sci-checkbox-size); &::before { + @include font-awesome; animation-timing-function: $timing-function-sharp; background: $color-white; border: $border-default; border-radius: 1px; color: $color-white; content: ""; - font-family: "Font Awesome 5 Free"; font-size: calc(var(--sci-checkbox-size) - var(--sci-checkbox-size) * .375); - font-weight: 501; height: var(--sci-checkbox-size); left: 0; line-height: calc(var(--sci-checkbox-size) - 2px); @@ -51,7 +50,7 @@ input[type="checkbox"].sci-checkbox { &::before { background: $brand-primary; border: 1px solid $brand-primary; - content: "\f00c"; + content: $font-fas-check; } } diff --git a/app/assets/stylesheets/shared_styles/elements/input_fields.scss b/app/assets/stylesheets/shared_styles/elements/input_fields.scss index 29b584bfa..c86571b5d 100644 --- a/app/assets/stylesheets/shared_styles/elements/input_fields.scss +++ b/app/assets/stylesheets/shared_styles/elements/input_fields.scss @@ -40,7 +40,6 @@ } &.left-icon { - .sci-input-field { padding: 0 0 0 30px; } @@ -51,7 +50,6 @@ } &.right-icon { - .sci-input-field { padding: 0 30px 0 10px; } @@ -63,15 +61,13 @@ &.success, &.error { - .sci-input-field { padding: 0 30px 0 10px; } &::after { + @include font-awesome; bottom: 0; - font-family: "Font Awesome 5 Free"; - font-weight: 501; line-height: 36px; position: absolute; right: 5px; @@ -93,7 +89,7 @@ &.success { &::after { color: $brand-success; - content: "\f00c"; + content: $font-fas-check; } } @@ -104,7 +100,7 @@ &::after { color: $brand-danger; - content: "\f071"; + content: $font-fas-exclamation-triangle; } &::before { diff --git a/app/assets/stylesheets/shared_styles/elements/radio_buttons.scss b/app/assets/stylesheets/shared_styles/elements/radio_buttons.scss index 0536573ae..706e8a12e 100644 --- a/app/assets/stylesheets/shared_styles/elements/radio_buttons.scss +++ b/app/assets/stylesheets/shared_styles/elements/radio_buttons.scss @@ -28,9 +28,7 @@ input[type="radio"].sci-radio { border-radius: 50%; color: $color-white; content: ""; - font-family: "Font Awesome 5 Free"; font-size: calc(var(--sci-radio-size) - var(--sci-radio-size) * .375); - font-weight: 501; height: var(--sci-radio-size); left: 0; line-height: calc(var(--sci-radio-size) - 2px); diff --git a/app/assets/stylesheets/themes/main_navigation.scss b/app/assets/stylesheets/themes/main_navigation.scss index 888adb874..2a42b27ff 100644 --- a/app/assets/stylesheets/themes/main_navigation.scss +++ b/app/assets/stylesheets/themes/main_navigation.scss @@ -43,6 +43,10 @@ align-items: center; display: flex; padding: 0 15px; + + #logo { + max-height: 22px; + } } .dropdown-notifications { @@ -392,10 +396,6 @@ #search-bar { padding-right: 0; - - .btn-default[type="submit"] { - height: 34px; - } } @media (max-width: 768px) { diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index 0aceee0de..57fb236e3 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -1855,6 +1855,14 @@ th.custom-field .modal-tooltiptext { color: $color-white; font: bold; } + + .res-description { + color: $color-white; + } + + .res-type { + border-color: $color-white; + } } ul { diff --git a/app/views/global_activities/_top_pane.html.erb b/app/views/global_activities/_top_pane.html.erb index e7c06eb6c..7c1ca2073 100644 --- a/app/views/global_activities/_top_pane.html.erb +++ b/app/views/global_activities/_top_pane.html.erb @@ -2,12 +2,14 @@ <%= t('activities.index.global_activities_title') %>
    - - <%= t('activities.index.expand_all') %> - - - <%= t('activities.index.collapse_all') %> - +
    diff --git a/app/views/my_module_tags/_index_edit.html.erb b/app/views/my_module_tags/_index_edit.html.erb index 6f698cbc0..d33ff05c1 100644 --- a/app/views/my_module_tags/_index_edit.html.erb +++ b/app/views/my_module_tags/_index_edit.html.erb @@ -61,7 +61,7 @@ :name, {}, { class: 'selectpicker' }) %> - <%= f.button class: 'btn btn-primary' do %> + <%= f.button class: 'sci-btn' do %> <% end %>
    @@ -73,7 +73,7 @@ <%= f.hidden_field :project_id, :value => @my_module.experiment.project.id %> <%= f.hidden_field :name, :value => t("tags.create.new_name") %> <%= f.hidden_field :color, :value => Constants::TAG_COLORS[0] %> - <%= f.button class: "btn btn-primary" do %> + <%= f.button class: "sci-btn" do %> <% end %> diff --git a/app/views/my_modules/modals/_manage_module_tags_modal.html.erb b/app/views/my_modules/modals/_manage_module_tags_modal.html.erb index 94f977386..f9489c83a 100644 --- a/app/views/my_modules/modals/_manage_module_tags_modal.html.erb +++ b/app/views/my_modules/modals/_manage_module_tags_modal.html.erb @@ -7,7 +7,7 @@
    diff --git a/app/views/protocol_importers/_preview_modal_footer.html.erb b/app/views/protocol_importers/_preview_modal_footer.html.erb index 6a05e76a8..98e1ef60a 100644 --- a/app/views/protocol_importers/_preview_modal_footer.html.erb +++ b/app/views/protocol_importers/_preview_modal_footer.html.erb @@ -1,3 +1,3 @@ - - - + + + diff --git a/app/views/protocol_importers/_protocol_card.html.erb b/app/views/protocol_importers/_protocol_card.html.erb index ef6d1cc1d..95ef4c9b8 100644 --- a/app/views/protocol_importers/_protocol_card.html.erb +++ b/app/views/protocol_importers/_protocol_card.html.erb @@ -19,7 +19,7 @@
    <% if show_import_button %> - + <% end %>
    diff --git a/app/views/steps/_step.html.erb b/app/views/steps/_step.html.erb index a3a936db2..4f1ac4cce 100644 --- a/app/views/steps/_step.html.erb +++ b/app/views/steps/_step.html.erb @@ -29,25 +29,25 @@ <% if (can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol)) && !(preview) %> " data-remote="true"> " data-remote="true"> " href="<%= edit_step_path(step, format: :json) %>" data-remote="true" > - <%= link_to(step_path(step), title: t("protocols.steps.options.delete_title"), method: "delete", class: "btn btn-link", + <%= link_to(step_path(step), title: t("protocols.steps.options.delete_title"), method: "delete", class: "sci-btn tertiary icon-btn", data: {action: "delete-step", confirm: t("protocols.steps.destroy.confirm", step: step.name)}) do %> <% end %> diff --git a/app/views/user_my_modules/_index_edit.html.erb b/app/views/user_my_modules/_index_edit.html.erb index c5c384454..3297ab003 100644 --- a/app/views/user_my_modules/_index_edit.html.erb +++ b/app/views/user_my_modules/_index_edit.html.erb @@ -43,7 +43,7 @@ <%= collection_select(:user_my_module, :user_id, @unassigned_users, :id, :full_name, {}, { class: 'selectpicker' }) %>
    - <%= f.button class: 'btn btn-primary' do %> + <%= f.button class: 'btn sci-btn' do %> <% end %> diff --git a/app/views/user_projects/_index_edit.html.erb b/app/views/user_projects/_index_edit.html.erb index a36cdc599..682502c18 100644 --- a/app/views/user_projects/_index_edit.html.erb +++ b/app/views/user_projects/_index_edit.html.erb @@ -68,7 +68,7 @@
    - <%= f.button class: 'btn btn-primary' do %> + <%= f.button class: 'sci-btn' do %> <% end %> diff --git a/app/views/users/confirmations/new.html.erb b/app/views/users/confirmations/new.html.erb index 16650b5ec..a6279097e 100644 --- a/app/views/users/confirmations/new.html.erb +++ b/app/views/users/confirmations/new.html.erb @@ -12,7 +12,7 @@
    - <%= f.submit t("devise.confirmations.new.submit"), class: "btn btn-primary" %> + <%= f.submit t("devise.confirmations.new.submit"), class: "sci-btn" %>
    <% end %> diff --git a/app/views/users/invitations/edit.html.erb b/app/views/users/invitations/edit.html.erb index b42d97458..38f46f199 100644 --- a/app/views/users/invitations/edit.html.erb +++ b/app/views/users/invitations/edit.html.erb @@ -47,7 +47,7 @@ <%= recaptcha_input_tag %>
    - <%= f.submit "Sign Up", class: "btn btn-primary" %> + <%= f.submit "Sign Up", class: "sci-btn" %>
    <% end %> diff --git a/app/views/users/passwords/edit.html.erb b/app/views/users/passwords/edit.html.erb index e56470524..0e968afaa 100644 --- a/app/views/users/passwords/edit.html.erb +++ b/app/views/users/passwords/edit.html.erb @@ -27,7 +27,7 @@
    - <%= f.submit t("devise.passwords.edit.submit"), class: "btn btn-primary" %> + <%= f.submit t("devise.passwords.edit.submit"), class: "sci-btn" %>
    <% end %> diff --git a/app/views/users/passwords/new.html.erb b/app/views/users/passwords/new.html.erb index 4598aa0e4..dcf4afaa5 100644 --- a/app/views/users/passwords/new.html.erb +++ b/app/views/users/passwords/new.html.erb @@ -17,7 +17,7 @@
    - <%= f.submit t("devise.passwords.new.submit"), class: "btn btn-primary" %> + <%= f.submit t("devise.passwords.new.submit"), class: "sci-btn" %>
    <% end %> diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index 40137c451..0bc6a5fc8 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -43,7 +43,7 @@ <%= recaptcha_input_tag %>
    - <%= f.submit 'Sign up', class: 'btn btn-primary' %> + <%= f.submit 'Sign up', class: 'sci-btn' %>
    <% end %> diff --git a/app/views/users/registrations/new_with_provider.html.erb b/app/views/users/registrations/new_with_provider.html.erb index bf95d3de5..286befed6 100644 --- a/app/views/users/registrations/new_with_provider.html.erb +++ b/app/views/users/registrations/new_with_provider.html.erb @@ -16,7 +16,7 @@ <% end %>
    - <%= f.submit 'Sign up', class: 'btn btn-primary' %> + <%= f.submit 'Sign up', class: 'sci-btn' %>
    <% end %> diff --git a/app/views/users/sessions/new.html.erb b/app/views/users/sessions/new.html.erb index 245e51f83..e3b78836b 100644 --- a/app/views/users/sessions/new.html.erb +++ b/app/views/users/sessions/new.html.erb @@ -28,7 +28,7 @@ <%= hidden_field_tag(:simple_sign_in, @simple_sign_in) %>
    - <%= f.submit t("devise.sessions.new.submit"), class: "btn btn-primary" %> + <%= f.submit t("devise.sessions.new.submit"), class: "sci-btn" %>
    <% end %> diff --git a/app/views/users/shared/_user_avatars_modal.html.erb b/app/views/users/shared/_user_avatars_modal.html.erb index d1e73dc4f..de00b295a 100644 --- a/app/views/users/shared/_user_avatars_modal.html.erb +++ b/app/views/users/shared/_user_avatars_modal.html.erb @@ -32,7 +32,7 @@ diff --git a/app/views/users/unlocks/new.html.erb b/app/views/users/unlocks/new.html.erb index 14b5b313e..c4f4e1348 100644 --- a/app/views/users/unlocks/new.html.erb +++ b/app/views/users/unlocks/new.html.erb @@ -17,7 +17,7 @@
    - <%= f.submit t("devise.unlocks.new.submit"), class: "btn btn-primary" %> + <%= f.submit t("devise.unlocks.new.submit"), class: "sci-btn" %>
    <% end %> diff --git a/public/images/scinote_icon.svg b/public/images/scinote_icon.svg index 365899717..a50cd9114 100644 --- a/public/images/scinote_icon.svg +++ b/public/images/scinote_icon.svg @@ -1,5 +1,5 @@ - - - - + + + + From f717ce66cb9874089168dade5ddbe20d982119ba Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Mon, 6 Jan 2020 12:31:56 +0100 Subject: [PATCH 12/14] Fix tests --- app/assets/javascripts/sitewide/avatar_modal.js | 10 +++++----- app/assets/stylesheets/constants.scss | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/sitewide/avatar_modal.js b/app/assets/javascripts/sitewide/avatar_modal.js index 7859c54d1..c7906e665 100644 --- a/app/assets/javascripts/sitewide/avatar_modal.js +++ b/app/assets/javascripts/sitewide/avatar_modal.js @@ -31,7 +31,7 @@ var avatarsModal = (function() { reader.readAsDataURL(inputField.files[0]); reader.onload = function() { var avatarContainer = $(modal).find('.avatar-preview-container'); - $(modal).find('.save-button').removeClass('disabled').attr('disabled', false); + $(modal).find('.save-button').attr('disabled', false); $(modal).find('#new_avatar').val(reader.result); avatarContainer.show().children().remove(); @@ -50,7 +50,7 @@ var avatarsModal = (function() { function initPredefinedAvatars() { $(modal).find('.avatar-collection .avatar').click(function() { - $(modal).find('.save-button').removeClass('disabled').attr('disabled', false); + $(modal).find('.save-button').attr('disabled', false); $(modal).find('#raw_avatar')[0].value = null; $(modal).find('.avatar-preview-container').hide(); $(modal).find('.current-avatar').show().find('img') @@ -61,9 +61,9 @@ var avatarsModal = (function() { function initUpdateButton() { $(modal).find('.save-button').click(function() { - if ($(this).hasClass('disabled')) return; + if ($(this).is('[disabled=disabled]')) return; - $(this).addClass('disabled').attr('disabled', true); + $(this).attr('disabled', true); $.ajax({ url: $(modal).data('update-url'), type: 'PUT', @@ -76,7 +76,7 @@ var avatarsModal = (function() { location.reload(); }, error: () => { - $(this).removeClass('disabled').attr('disabled', false); + $(this).attr('disabled', false); } }); }); diff --git a/app/assets/stylesheets/constants.scss b/app/assets/stylesheets/constants.scss index ea529ddce..1defe28d8 100644 --- a/app/assets/stylesheets/constants.scss +++ b/app/assets/stylesheets/constants.scss @@ -128,8 +128,8 @@ $btn-primary-color: $color-white; $btn-primary-bg: $brand-primary; $btn-primary-border: darken($btn-primary-bg, 5%); $btn-primary-new-color: $color-white; -$btn-primary-new-bg: $brand-primary-new; -$btn-primary-new-border: darken($brand-primary-new, 5%); +$btn-primary-new-bg: $brand-primary; +$btn-primary-new-border: darken($brand-primary , 5%); $btn-success-color: $color-white; $btn-success-bg: $brand-primary; $btn-success-border: darken($btn-success-bg, 5%); From 68646276f5c39e1a0e8bc411bca9fdad1c73c849 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Tue, 7 Jan 2020 16:13:34 +0100 Subject: [PATCH 13/14] Replace bootstrap styles for button --- .../javascripts/users/settings/teams/show.js | 2 +- app/assets/stylesheets/application.scss | 7 --- app/assets/stylesheets/partials/_sidebar.scss | 4 +- .../shared_styles/constants/fonts.scss | 7 +++ .../shared_styles/constants/shadows.scss | 2 + .../shared_styles/elements/buttons.scss | 49 ++++++++++++------- .../shared_styles/global_elements.scss | 38 ++++---------- .../stylesheets/themes/main_navigation.scss | 2 +- app/assets/stylesheets/themes/menu_bar.scss | 2 +- app/assets/stylesheets/themes/scinote.scss | 5 +- app/helpers/search_helper.rb | 4 +- .../_create_marvin_sketch_button.html.erb | 2 +- app/views/canvas/_edit.html.erb | 6 +-- .../canvas/edit/modal/_delete_module.html.erb | 4 +- .../edit/modal/_delete_module_group.html.erb | 4 +- .../canvas/edit/modal/_edit_module.html.erb | 4 +- .../canvas/edit/modal/_move_module.html.erb | 4 +- .../edit/modal/_move_module_group.html.erb | 4 +- app/views/experiments/_clone_modal.html.erb | 4 +- app/views/experiments/_edit_modal.html.erb | 4 +- app/views/experiments/_move_modal.html.erb | 4 +- app/views/experiments/_new_modal.html.erb | 4 +- app/views/experiments/canvas.html.erb | 4 +- .../global_activities/_top_pane.html.erb | 4 +- app/views/my_module_tags/_index_edit.html.erb | 4 +- .../_state_button_complete.html.erb | 2 +- .../_state_button_uncomplete.html.erb | 2 +- .../modals/_manage_module_tags_modal.html.erb | 2 +- .../modals/_manage_users_modal.html.erb | 2 +- .../_copy_to_repository_modal.html.erb | 4 +- .../_load_from_repository_modal.html.erb | 4 +- .../protocols/_protocol_buttons.html.erb | 10 ++-- app/views/my_modules/results.html.erb | 10 ++-- app/views/projects/index.html.erb | 22 ++++----- app/views/projects/show.html.erb | 4 +- .../_preview_modal_footer.html.erb | 6 +-- .../_protocol_card.html.erb | 2 +- app/views/protocols/_steps.html.erb | 8 +-- app/views/protocols/index.html.erb | 18 +++---- .../index/_create_new_modal.html.erb | 4 +- .../_protocol_preview_modal_footer.html.erb | 2 +- app/views/reports/index.html.erb | 10 ++-- app/views/reports/new.html.erb | 8 +-- .../reports/new/_report_navigation.html.erb | 12 ++--- .../new/_save_PDF_to_inventory_modal.html.erb | 4 +- app/views/result_assets/_edit.html.erb | 4 +- app/views/result_assets/_new.html.erb | 4 +- app/views/result_tables/_edit.html.erb | 4 +- app/views/result_tables/_new.html.erb | 4 +- app/views/result_texts/_edit.html.erb | 4 +- app/views/result_texts/_new.html.erb | 4 +- app/views/shared/_invite_users_modal.html.erb | 6 +-- app/views/steps/_edit.html.erb | 4 +- app/views/steps/_new.html.erb | 4 +- app/views/steps/_step.html.erb | 12 ++--- .../user_my_modules/_index_edit.html.erb | 2 +- app/views/user_projects/_index_edit.html.erb | 2 +- app/views/users/confirmations/new.html.erb | 2 +- app/views/users/invitations/edit.html.erb | 2 +- app/views/users/passwords/edit.html.erb | 2 +- app/views/users/passwords/new.html.erb | 2 +- app/views/users/registrations/new.html.erb | 2 +- .../registrations/new_with_provider.html.erb | 2 +- app/views/users/sessions/new.html.erb | 2 +- app/views/users/settings/teams/index.html.erb | 2 +- .../users/shared/_user_avatars_modal.html.erb | 2 +- app/views/users/unlocks/new.html.erb | 2 +- 67 files changed, 192 insertions(+), 196 deletions(-) create mode 100644 app/assets/stylesheets/shared_styles/constants/shadows.scss diff --git a/app/assets/javascripts/users/settings/teams/show.js b/app/assets/javascripts/users/settings/teams/show.js index 6174038b7..96eed79ba 100644 --- a/app/assets/javascripts/users/settings/teams/show.js +++ b/app/assets/javascripts/users/settings/teams/show.js @@ -13,7 +13,7 @@ function AddUserButtonTemplate() { return ` - diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index f96efa918..77e0a354a 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -9,13 +9,6 @@ @import "shared_styles/global_elements"; -@import "constants"; -@import "bootstrap-sprockets"; -@import "bootstrap"; -@import "bootstrap-datetimepicker"; -@import "bootstrap-colorselector"; -@import "bootstrap-tagsinput"; -@import "bootstrap-tagsinput-typeahead"; @import "handsontable.full.min"; @import "ajax-bootstrap-select.min"; @import "extend/bootstrap"; diff --git a/app/assets/stylesheets/partials/_sidebar.scss b/app/assets/stylesheets/partials/_sidebar.scss index f3eed2ba0..3b0fadb98 100644 --- a/app/assets/stylesheets/partials/_sidebar.scss +++ b/app/assets/stylesheets/partials/_sidebar.scss @@ -26,7 +26,7 @@ $toggle-btn-size: 50px; border-bottom-right-radius: 10px; border-top-right-radius: 10px; bottom: 50%; - box-shadow: 2px 0 4px $color-alto; + box-shadow: $flyout-shadow; display: block; position: absolute; right: -18px; @@ -54,7 +54,7 @@ $toggle-btn-size: 50px; #sidebar-wrapper { background-color: $color-white; - box-shadow: 1px 3px 6px $color-alto; + box-shadow: $flyout-shadow; height: 100%; margin-left: -$wrapper-width; position: fixed; diff --git a/app/assets/stylesheets/shared_styles/constants/fonts.scss b/app/assets/stylesheets/shared_styles/constants/fonts.scss index 0517b6b69..1a156e6bd 100644 --- a/app/assets/stylesheets/shared_styles/constants/fonts.scss +++ b/app/assets/stylesheets/shared_styles/constants/fonts.scss @@ -6,6 +6,13 @@ $font-family-base: $font-family-lato; $font-family-icons: "Font Awesome 5 Free"; $font-size-base: 16px; +$font-size-h1: 24px; +$font-size-h2: 18px; +$font-size-h3: $font-size-base; +$font-size-h4: $font-size-base; +$font-size-h5: $font-size-base; +$font-size-h6: $font-size-base; + $font-fas-check: "\f00c"; $font-fas-exclamation-triangle: "\f071"; diff --git a/app/assets/stylesheets/shared_styles/constants/shadows.scss b/app/assets/stylesheets/shared_styles/constants/shadows.scss new file mode 100644 index 000000000..a345c116e --- /dev/null +++ b/app/assets/stylesheets/shared_styles/constants/shadows.scss @@ -0,0 +1,2 @@ +$flyout-shadow: 0px 1px 4px rgba(35, 31, 32, 0.15); +$modal-shadow: 0px 4px 16px rgba(35, 31, 32, 0.15); \ No newline at end of file diff --git a/app/assets/stylesheets/shared_styles/elements/buttons.scss b/app/assets/stylesheets/shared_styles/elements/buttons.scss index c7d5e4e0e..9b38b4736 100644 --- a/app/assets/stylesheets/shared_styles/elements/buttons.scss +++ b/app/assets/stylesheets/shared_styles/elements/buttons.scss @@ -1,12 +1,9 @@ // scss-lint:disable NestingDepth -.sci-btn { +.btn{ @include font-button; animation-timing-function: $timing-function-sharp; - background: $brand-primary; - border: 1px solid $brand-primary; border-radius: $border-radius-default; - color: $color-white; cursor: pointer; display: inline-block; line-height: 20px; @@ -24,25 +21,40 @@ } &:hover { - background: $brand-primary-hover; - color: $color-white; text-decoration: none; } &:active { - background: $brand-primary-press; - color: $color-white; text-decoration: none; } &:focus { - box-shadow: 0 0 0 1px $brand-focus; - color: $color-white; outline: 0; text-decoration: none; } - &.secondary { + &.btn-primary { + background: $brand-primary; + border: 1px solid $brand-primary; + color: $color-white; + + &:hover { + background: $brand-primary-hover; + color: $color-white; + } + + &:active { + background: $brand-primary-press; + color: $color-white; + } + + &:focus { + box-shadow: 0 0 0 1px $brand-focus; + color: $color-white; + } + } + + &.btn-secondary { background: $color-white; border: $border-default; color: $color-black; @@ -65,7 +77,7 @@ } } - &.tertiary { + &.btn-light { background: transparent; border: $border-transparent; color: $color-black; @@ -88,16 +100,19 @@ } } - &.sensitive { + &.btn-danger { background: $brand-danger; border: $border-danger; + color: $color-white; &:hover { background: $brand-danger-hover; + color: $color-white; } &:active { background: $brand-danger-press; + color: $color-white; } &:focus { @@ -121,8 +136,8 @@ color: $color-silver-chalice; opacity: .5; - &.secondary, - &.tertiary { + &.btn-secondary, + &.btn-light { background: $color-white; &:hover { @@ -132,7 +147,7 @@ } } - &.sensitive { + &.btn-danger { &:hover { background: $color-alto; } @@ -144,7 +159,7 @@ display: inline-block; position: relative; - .sci-btn { + .btn { float: left; margin: 2px 4px 2px 0; diff --git a/app/assets/stylesheets/shared_styles/global_elements.scss b/app/assets/stylesheets/shared_styles/global_elements.scss index 11a3305d8..0bc9664a9 100644 --- a/app/assets/stylesheets/shared_styles/global_elements.scss +++ b/app/assets/stylesheets/shared_styles/global_elements.scss @@ -1,6 +1,16 @@ // scss-lint:disable Comment @import "constants/*"; + +@import "../constants"; + +@import "bootstrap-sprockets"; +@import "bootstrap"; +@import "bootstrap-datetimepicker"; +@import "bootstrap-colorselector"; +@import "bootstrap-tagsinput"; +@import "bootstrap-tagsinput-typeahead"; + @import "elements/*"; // Examples @@ -8,34 +18,6 @@ /*
    -
    - - - - -
    -
    -
    - - - - -
    -
    -
    - - - - -
    -
    -
    - - - - -
    -
    diff --git a/app/assets/stylesheets/themes/main_navigation.scss b/app/assets/stylesheets/themes/main_navigation.scss index 2a42b27ff..639bf98ff 100644 --- a/app/assets/stylesheets/themes/main_navigation.scss +++ b/app/assets/stylesheets/themes/main_navigation.scss @@ -2,7 +2,7 @@ @import "mixins"; #main-nav { - box-shadow: 0 3px 6px $color-alto; + box-shadow: $flyout-shadow; margin-bottom: 0; } diff --git a/app/assets/stylesheets/themes/menu_bar.scss b/app/assets/stylesheets/themes/menu_bar.scss index eaec1435b..71146b679 100644 --- a/app/assets/stylesheets/themes/menu_bar.scss +++ b/app/assets/stylesheets/themes/menu_bar.scss @@ -3,7 +3,7 @@ .menu-bar { background-color: $color-white; - box-shadow: 1px 3px 6px 0 $color-alto; + box-shadow: $flyout-shadow; height: 100%; left: 0; padding-bottom: 50px; diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index 57fb236e3..ab9b0e508 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -423,9 +423,6 @@ a[data-toggle="tooltip"] { .tab-pane-settings { background-color: $color-white; padding: 15px; - border-left: 1px solid $color-alto; - border-right: 1px solid $color-alto; - border-bottom: 1px solid $color-alto; } .breadcrumb-teams { @@ -936,7 +933,7 @@ ul.content-activities { box-shadow: none; display: inline-block; height: 36px; - margin-bottom: 5px; + margin: 2px 0; & > .panel-body { padding: 0 0 0 15px; diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 48b49c2d9..79dbf08ef 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -25,11 +25,11 @@ module SearchHelper if search_team != current_team link_to text, path, - class: 'sci-btn', + class: 'btn btn-primary', data: { confirm: t('users.settings.changed_team_in_search', team: search_team.name) } else - link_to text, path, class: 'sci-btn' + link_to text, path, class: 'btn btn-primary' end end end diff --git a/app/views/assets/marvinjs/_create_marvin_sketch_button.html.erb b/app/views/assets/marvinjs/_create_marvin_sketch_button.html.erb index 5fa53dafa..21f706710 100644 --- a/app/views/assets/marvinjs/_create_marvin_sketch_button.html.erb +++ b/app/views/assets/marvinjs/_create_marvin_sketch_button.html.erb @@ -1,5 +1,5 @@ <%= bootstrap_form_tag url: canvas_experiment_url, method: "post", html: {class: "canvas-header"} do |f| %> <% if can_manage_experiment?(@experiment) %> - <%=link_to "", type: "button", class: "sci-btn help_tooltips", id: "canvas-new-module", + <%=link_to "", type: "button", class: "btn btn-primary help_tooltips", id: "canvas-new-module", data: { tooltiplink: I18n.t('tooltips.link.task.new'), tooltipcontent: I18n.t('tooltips.text.task.new') } do %> @@ -25,11 +25,11 @@ <% end %> <% end %>
    - <%= link_to canvas_experiment_path(@experiment), type: "button", class: "sci-btn secondary cancel-edit-canvas" do %> + <%= link_to canvas_experiment_path(@experiment), type: "button", class: "btn btn-secondary cancel-edit-canvas" do %>   <% end %> - <%= f.submit class: "sci-btn", id: "canvas-save" do %> + <%= f.submit class: "btn btn-primary", id: "canvas-save" do %> <%= t("experiments.canvas.edit.save_short") %> <% end %> diff --git a/app/views/canvas/edit/modal/_delete_module.html.erb b/app/views/canvas/edit/modal/_delete_module.html.erb index 64b31c5a9..975373a8e 100644 --- a/app/views/canvas/edit/modal/_delete_module.html.erb +++ b/app/views/canvas/edit/modal/_delete_module.html.erb @@ -10,8 +10,8 @@
    diff --git a/app/views/canvas/edit/modal/_delete_module_group.html.erb b/app/views/canvas/edit/modal/_delete_module_group.html.erb index 379f61f33..0f8ae0656 100644 --- a/app/views/canvas/edit/modal/_delete_module_group.html.erb +++ b/app/views/canvas/edit/modal/_delete_module_group.html.erb @@ -10,8 +10,8 @@
    diff --git a/app/views/canvas/edit/modal/_edit_module.html.erb b/app/views/canvas/edit/modal/_edit_module.html.erb index e90de2b2b..822bb836f 100644 --- a/app/views/canvas/edit/modal/_edit_module.html.erb +++ b/app/views/canvas/edit/modal/_edit_module.html.erb @@ -11,8 +11,8 @@ <% end %>
    diff --git a/app/views/canvas/edit/modal/_move_module.html.erb b/app/views/canvas/edit/modal/_move_module.html.erb index d5ad8a96f..c9b88920f 100644 --- a/app/views/canvas/edit/modal/_move_module.html.erb +++ b/app/views/canvas/edit/modal/_move_module.html.erb @@ -23,9 +23,9 @@ <% end %> diff --git a/app/views/experiments/_edit_modal.html.erb b/app/views/experiments/_edit_modal.html.erb index 9910294c0..d705b26a8 100644 --- a/app/views/experiments/_edit_modal.html.erb +++ b/app/views/experiments/_edit_modal.html.erb @@ -15,8 +15,8 @@ <%= render partial: "form.html.erb", locals: { form: f } %> diff --git a/app/views/experiments/_move_modal.html.erb b/app/views/experiments/_move_modal.html.erb index 9f2e88a8e..4af583ac9 100644 --- a/app/views/experiments/_move_modal.html.erb +++ b/app/views/experiments/_move_modal.html.erb @@ -27,9 +27,9 @@ <%= t("experiments.move.notice") %> diff --git a/app/views/experiments/_new_modal.html.erb b/app/views/experiments/_new_modal.html.erb index 7ac413fb6..c07376307 100644 --- a/app/views/experiments/_new_modal.html.erb +++ b/app/views/experiments/_new_modal.html.erb @@ -11,8 +11,8 @@ <%= render partial: "form.html.erb", locals: { form: f } %> diff --git a/app/views/experiments/canvas.html.erb b/app/views/experiments/canvas.html.erb index a8732f63b..b14f3a13e 100644 --- a/app/views/experiments/canvas.html.erb +++ b/app/views/experiments/canvas.html.erb @@ -12,13 +12,13 @@ type: 'button', id: 'edit-canvas-button', data: { action: 'edit' }, - class: 'ajax sci-btn' do %> + class: 'ajax btn btn-primary' do %> <% end %> - diff --git a/app/views/my_modules/_state_button_uncomplete.html.erb b/app/views/my_modules/_state_button_uncomplete.html.erb index 6f1ca9acd..bd4ca47aa 100644 --- a/app/views/my_modules/_state_button_uncomplete.html.erb +++ b/app/views/my_modules/_state_button_uncomplete.html.erb @@ -1,4 +1,4 @@ - \ No newline at end of file diff --git a/app/views/my_modules/modals/_manage_module_tags_modal.html.erb b/app/views/my_modules/modals/_manage_module_tags_modal.html.erb index f9489c83a..2c1ac7c50 100644 --- a/app/views/my_modules/modals/_manage_module_tags_modal.html.erb +++ b/app/views/my_modules/modals/_manage_module_tags_modal.html.erb @@ -7,7 +7,7 @@ diff --git a/app/views/my_modules/modals/_manage_users_modal.html.erb b/app/views/my_modules/modals/_manage_users_modal.html.erb index 3b6c518f3..da9e7b5c0 100644 --- a/app/views/my_modules/modals/_manage_users_modal.html.erb +++ b/app/views/my_modules/modals/_manage_users_modal.html.erb @@ -15,7 +15,7 @@ <%=t "experiments.canvas.full_zoom.modal_manage_users.contact_admins", team: @experiment.project.team.name %> <% end %> - + diff --git a/app/views/my_modules/protocols/_copy_to_repository_modal.html.erb b/app/views/my_modules/protocols/_copy_to_repository_modal.html.erb index 849b6714d..ef4ef7c0d 100644 --- a/app/views/my_modules/protocols/_copy_to_repository_modal.html.erb +++ b/app/views/my_modules/protocols/_copy_to_repository_modal.html.erb @@ -9,8 +9,8 @@ diff --git a/app/views/my_modules/protocols/_load_from_repository_modal.html.erb b/app/views/my_modules/protocols/_load_from_repository_modal.html.erb index 02cd5ae12..6f256964a 100644 --- a/app/views/my_modules/protocols/_load_from_repository_modal.html.erb +++ b/app/views/my_modules/protocols/_load_from_repository_modal.html.erb @@ -9,8 +9,8 @@ diff --git a/app/views/my_modules/protocols/_protocol_buttons.html.erb b/app/views/my_modules/protocols/_protocol_buttons.html.erb index 874aab933..327956e9c 100644 --- a/app/views/my_modules/protocols/_protocol_buttons.html.erb +++ b/app/views/my_modules/protocols/_protocol_buttons.html.erb @@ -1,6 +1,6 @@
    - @@ -26,16 +26,16 @@ <% end %> <% if can_read_experiment?(@my_module.experiment) %> - <%= link_to raw(" " + t('my_modules.protocols.buttons.export') + ""), export_protocols_path(protocol_ids: @protocol.id, my_module_id: @my_module.id), class: "sci-btn secondary", data: { turbolinks: false } %> + <%= link_to raw(" " + t('my_modules.protocols.buttons.export') + ""), export_protocols_path(protocol_ids: @protocol.id, my_module_id: @my_module.id), class: "btn btn-secondary", data: { turbolinks: false } %> <% else %> -  <%= t("my_modules.protocols.buttons.export") %> +  <%= t("my_modules.protocols.buttons.export") %> <% end %> <% if can_read_protocol_in_module?(@protocol) && can_create_protocols_in_repository?(@protocol.team) %> - +  <%= t("my_modules.protocols.buttons.copy_to_repository") %> <% else %> -  <%= t("my_modules.protocols.buttons.copy_to_repository") %> +  <%= t("my_modules.protocols.buttons.copy_to_repository") %> <% end %>
    diff --git a/app/views/my_modules/results.html.erb b/app/views/my_modules/results.html.erb index 105ac947d..074a4f596 100644 --- a/app/views/my_modules/results.html.erb +++ b/app/views/my_modules/results.html.erb @@ -7,10 +7,10 @@
    @@ -75,11 +75,11 @@
    <% if show_import_button %> - + <% end %>
    diff --git a/app/views/protocols/_steps.html.erb b/app/views/protocols/_steps.html.erb index 4a39256a3..e03b9f9d3 100644 --- a/app/views/protocols/_steps.html.erb +++ b/app/views/protocols/_steps.html.erb @@ -2,7 +2,7 @@
    @@ -28,7 +28,7 @@
    diff --git a/app/views/protocols/index/_protocol_preview_modal_footer.html.erb b/app/views/protocols/index/_protocol_preview_modal_footer.html.erb index 3da637b1f..36fcabba2 100644 --- a/app/views/protocols/index/_protocol_preview_modal_footer.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal_footer.html.erb @@ -1,4 +1,4 @@ - + <% if can_manage_protocol_in_repository?(@protocol) %> <%= route_to_other_team_btn edit_protocol_path(protocol), protocol.team, diff --git a/app/views/reports/index.html.erb b/app/views/reports/index.html.erb index f9921bbb5..08acfca06 100644 --- a/app/views/reports/index.html.erb +++ b/app/views/reports/index.html.erb @@ -10,15 +10,15 @@
    <% if can_manage_reports?(current_team) %> - <%= link_to '#', remote: true, class: 'sci-btn', id: 'new-report-btn' do %> + <%= link_to '#', remote: true, class: 'btn btn-primary', id: 'new-report-btn' do %> <% end %> - <%= link_to "", remote: true, class: "sci-btn secondary", id: "edit-report-btn" do %> + <%= link_to "", remote: true, class: "btn btn-secondary", id: "edit-report-btn" do %> <% end %> - <%= link_to "", remote: true, class: "sci-btn secondary", id: "delete-reports-btn" do %> + <%= link_to "", remote: true, class: "btn btn-secondary", id: "delete-reports-btn" do %> <% end %> @@ -97,9 +97,9 @@
    @@ -67,8 +67,8 @@ diff --git a/app/views/reports/new/_report_navigation.html.erb b/app/views/reports/new/_report_navigation.html.erb index 506dd0fc5..bb43484d7 100644 --- a/app/views/reports/new/_report_navigation.html.erb +++ b/app/views/reports/new/_report_navigation.html.erb @@ -2,7 +2,7 @@
    - <%= link_to "", class: "sci-btn secondary", remote: true, id: "print-report" do %> + <%= link_to "", class: "btn btn-secondary", remote: true, id: "print-report" do %> <% end %>
    - <%= f.submit t("result_tables.new.create"), - class: 'sci-btn save-result', + class: 'btn btn-primary save-result', onclick: "Results.processResult(event, Results.ResultTypeEnum.TABLE);" %>
    <% end %> diff --git a/app/views/result_texts/_edit.html.erb b/app/views/result_texts/_edit.html.erb index fef5c8ad4..15350760a 100644 --- a/app/views/result_texts/_edit.html.erb +++ b/app/views/result_texts/_edit.html.erb @@ -14,11 +14,11 @@ last_updated: @result.updated_at.to_i * 1000 }) %> <% end %>
    - <%= f.submit t("general.save"), - class: 'sci-btn save-result', + class: 'btn btn-primary save-result', onclick: "Results.processResult(event, Results.ResultTypeEnum.TEXT);" %>
    <% end %> diff --git a/app/views/result_texts/_new.html.erb b/app/views/result_texts/_new.html.erb index f6248fddb..402654d18 100644 --- a/app/views/result_texts/_new.html.erb +++ b/app/views/result_texts/_new.html.erb @@ -13,11 +13,11 @@ last_updated: @result.updated_at.to_i * 1000 }) %> <% end %>
    - <%= f.submit t("result_texts.new.create"), - class: 'sci-btn save-result', + class: 'btn btn-primary save-result', onclick: "Results.processResult(event, Results.ResultTypeEnum.TEXT);" %>
    <% end %> diff --git a/app/views/shared/_invite_users_modal.html.erb b/app/views/shared/_invite_users_modal.html.erb index 16babebaa..8441bab5c 100644 --- a/app/views/shared/_invite_users_modal.html.erb +++ b/app/views/shared/_invite_users_modal.html.erb @@ -115,12 +115,12 @@ invite_to_team = type.in?(%w(invite_to_team invite_to_team_with_role))
    diff --git a/app/views/steps/_step.html.erb b/app/views/steps/_step.html.erb index 4f1ac4cce..e2f562f63 100644 --- a/app/views/steps/_step.html.erb +++ b/app/views/steps/_step.html.erb @@ -9,7 +9,7 @@
    - @@ -18,7 +18,7 @@
    - @@ -29,25 +29,25 @@ <% if (can_manage_protocol_in_module?(@protocol) || can_manage_protocol_in_repository?(@protocol)) && !(preview) %> " data-remote="true"> " data-remote="true"> " href="<%= edit_step_path(step, format: :json) %>" data-remote="true" > - <%= link_to(step_path(step), title: t("protocols.steps.options.delete_title"), method: "delete", class: "sci-btn tertiary icon-btn", + <%= link_to(step_path(step), title: t("protocols.steps.options.delete_title"), method: "delete", class: "btn btn-light icon-btn", data: {action: "delete-step", confirm: t("protocols.steps.destroy.confirm", step: step.name)}) do %> <% end %> diff --git a/app/views/user_my_modules/_index_edit.html.erb b/app/views/user_my_modules/_index_edit.html.erb index 3297ab003..04ab903b6 100644 --- a/app/views/user_my_modules/_index_edit.html.erb +++ b/app/views/user_my_modules/_index_edit.html.erb @@ -43,7 +43,7 @@ <%= collection_select(:user_my_module, :user_id, @unassigned_users, :id, :full_name, {}, { class: 'selectpicker' }) %>
    - <%= f.button class: 'btn sci-btn' do %> + <%= f.button class: 'btn btn btn-primary' do %> <% end %> diff --git a/app/views/user_projects/_index_edit.html.erb b/app/views/user_projects/_index_edit.html.erb index 682502c18..a36cdc599 100644 --- a/app/views/user_projects/_index_edit.html.erb +++ b/app/views/user_projects/_index_edit.html.erb @@ -68,7 +68,7 @@
    - <%= f.button class: 'sci-btn' do %> + <%= f.button class: 'btn btn-primary' do %> <% end %> diff --git a/app/views/users/confirmations/new.html.erb b/app/views/users/confirmations/new.html.erb index a6279097e..16650b5ec 100644 --- a/app/views/users/confirmations/new.html.erb +++ b/app/views/users/confirmations/new.html.erb @@ -12,7 +12,7 @@
    - <%= f.submit t("devise.confirmations.new.submit"), class: "sci-btn" %> + <%= f.submit t("devise.confirmations.new.submit"), class: "btn btn-primary" %>
    <% end %> diff --git a/app/views/users/invitations/edit.html.erb b/app/views/users/invitations/edit.html.erb index 38f46f199..b42d97458 100644 --- a/app/views/users/invitations/edit.html.erb +++ b/app/views/users/invitations/edit.html.erb @@ -47,7 +47,7 @@ <%= recaptcha_input_tag %>
    - <%= f.submit "Sign Up", class: "sci-btn" %> + <%= f.submit "Sign Up", class: "btn btn-primary" %>
    <% end %> diff --git a/app/views/users/passwords/edit.html.erb b/app/views/users/passwords/edit.html.erb index 0e968afaa..e56470524 100644 --- a/app/views/users/passwords/edit.html.erb +++ b/app/views/users/passwords/edit.html.erb @@ -27,7 +27,7 @@
    - <%= f.submit t("devise.passwords.edit.submit"), class: "sci-btn" %> + <%= f.submit t("devise.passwords.edit.submit"), class: "btn btn-primary" %>
    <% end %> diff --git a/app/views/users/passwords/new.html.erb b/app/views/users/passwords/new.html.erb index dcf4afaa5..4598aa0e4 100644 --- a/app/views/users/passwords/new.html.erb +++ b/app/views/users/passwords/new.html.erb @@ -17,7 +17,7 @@
    - <%= f.submit t("devise.passwords.new.submit"), class: "sci-btn" %> + <%= f.submit t("devise.passwords.new.submit"), class: "btn btn-primary" %>
    <% end %> diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index 0bc6a5fc8..40137c451 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -43,7 +43,7 @@ <%= recaptcha_input_tag %>
    - <%= f.submit 'Sign up', class: 'sci-btn' %> + <%= f.submit 'Sign up', class: 'btn btn-primary' %>
    <% end %> diff --git a/app/views/users/registrations/new_with_provider.html.erb b/app/views/users/registrations/new_with_provider.html.erb index 286befed6..bf95d3de5 100644 --- a/app/views/users/registrations/new_with_provider.html.erb +++ b/app/views/users/registrations/new_with_provider.html.erb @@ -16,7 +16,7 @@ <% end %>
    - <%= f.submit 'Sign up', class: 'sci-btn' %> + <%= f.submit 'Sign up', class: 'btn btn-primary' %>
    <% end %> diff --git a/app/views/users/sessions/new.html.erb b/app/views/users/sessions/new.html.erb index e3b78836b..245e51f83 100644 --- a/app/views/users/sessions/new.html.erb +++ b/app/views/users/sessions/new.html.erb @@ -28,7 +28,7 @@ <%= hidden_field_tag(:simple_sign_in, @simple_sign_in) %>
    - <%= f.submit t("devise.sessions.new.submit"), class: "sci-btn" %> + <%= f.submit t("devise.sessions.new.submit"), class: "btn btn-primary" %>
    <% end %> diff --git a/app/views/users/settings/teams/index.html.erb b/app/views/users/settings/teams/index.html.erb index 2e55c7d2d..f54dfc96f 100644 --- a/app/views/users/settings/teams/index.html.erb +++ b/app/views/users/settings/teams/index.html.erb @@ -24,7 +24,7 @@ <% end %> <% if can_create_teams? %> - <%= link_to new_team_path, class: "sci-btn", style: "margin-left: 30px;" do %> + <%= link_to new_team_path, class: "btn btn-primary", style: "margin-left: 30px;" do %>