From c3a98d5a4f945ffbe9b61d40c25473e559d49d0e Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 20 Dec 2019 10:06:01 +0000 Subject: [PATCH 1/6] Bring css dependencies from spree_backend These dependencies are in spree_core so we dont need to bring them to ofn right now --- app/assets/stylesheets/admin/all.scss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/admin/all.scss b/app/assets/stylesheets/admin/all.scss index a3200f1d91..c789423696 100644 --- a/app/assets/stylesheets/admin/all.scss +++ b/app/assets/stylesheets/admin/all.scss @@ -7,6 +7,8 @@ *= require admin/spree_backend *= require jquery.powertip *= require responsive-tables + *= require normalize + *= require skeleton *= require jquery-ui-timepicker-addon *= require shared/textAngular *= require shared/ng-tags-input.min @@ -17,18 +19,18 @@ //************************************************************************// //************************************************************************// @import 'globals/variables'; +@import 'variables'; @import 'globals/mixins'; @import 'plugins/powertip'; @import 'plugins/jstree'; +@import 'plugins/font-awesome'; @import 'hacks/mozilla'; @import 'hacks/opera'; @import 'hacks/ie'; -@import 'variables'; -@import 'components/*'; -@import 'plugins/font-awesome'; -@import 'pages/*'; +@import 'components/*'; +@import 'pages/*'; @import '*'; From 289f62f1150f75e20f68cecb6f7532d39234cb8c Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 20 Dec 2019 10:08:51 +0000 Subject: [PATCH 2/6] Bring and require date picker css from spree_backend --- app/assets/stylesheets/admin/all.scss | 1 + .../admin/components/date-picker.scss | 154 ++++++++ .../stylesheets/jquery-ui.datepicker.css | 357 ++++++++++++++++++ 3 files changed, 512 insertions(+) create mode 100644 app/assets/stylesheets/admin/components/date-picker.scss create mode 100644 vendor/assets/stylesheets/jquery-ui.datepicker.css diff --git a/app/assets/stylesheets/admin/all.scss b/app/assets/stylesheets/admin/all.scss index c789423696..832377ebc4 100644 --- a/app/assets/stylesheets/admin/all.scss +++ b/app/assets/stylesheets/admin/all.scss @@ -9,6 +9,7 @@ *= require responsive-tables *= require normalize *= require skeleton + *= require jquery.ui.datepicker *= require jquery-ui-timepicker-addon *= require shared/textAngular *= require shared/ng-tags-input.min diff --git a/app/assets/stylesheets/admin/components/date-picker.scss b/app/assets/stylesheets/admin/components/date-picker.scss new file mode 100644 index 0000000000..296bc8b806 --- /dev/null +++ b/app/assets/stylesheets/admin/components/date-picker.scss @@ -0,0 +1,154 @@ +.date-range-filter { + .range-divider { + padding: 0; + } + input.datepicker { + width: 96px !important; + } +} + +#ui-datepicker-div { + @include border-radius($border-radius); + border-color: $color-3; + padding: 0; + margin-top: 10px; + + &:before { + content: ''; + position: absolute; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-bottom: 10px solid $color-3; + top: 0px; + margin-top: -10px; + left: 25px; + z-index: 1; + } + + .ui-datepicker-header { + padding: 0; + background-image: none; + background-color: $color-3; + border: none; + border-bottom: none; + border-radius: 0; + height: 32px; + + .ui-datepicker-prev, .ui-datepicker-next { + border-radius: 0; + top: 0; + height: 32px; + + &:hover { + border: none; + background-image: none; + background-color: $color-3; + cursor: pointer; + } + + .ui-icon { + background-image: none; + text-indent: 0; + color: $color-1; + width: 10px; + margin-left: -5px; + @extend [class^="icon-"]:before; + + &:hover { + color: very-light($color-2, 25); + } + } + } + .ui-datepicker-prev { + left: 0; + + .ui-icon { + @extend .icon-arrow-left; + } + } + .ui-datepicker-next { + right: 0; + + .ui-icon { + @extend .icon-arrow-right; + } + + &:hover { + .ui-icon { + margin-left: -5px; + } + } + } + + .ui-datepicker-title { + color: $color-1; + text-transform: uppercase; + font-size: 85% !important; + padding: 6px 10px; + } + } + + table.ui-datepicker-calendar { + border: none; + + thead { + th { + border-bottom: 1px solid $color-border; + border-right: 1px solid $color-border; + color: $color-body-text; + width: 33px; + + &:last-child { + border-right: none; + } + } + } + tbody { + tr:hover { + td { + background-color: transparent !important; + } + } + &:last-child tr:last-child td { + border-bottom: none; + } + td { + a { + border: 1px solid transparent; + background-color: $color-1; + background-image: none; + font-size: 85%; + color: $color-body-text; + + &.ui-state-active { + background-color: $color-2; + color: $color-1; + } + + &:hover { + background-color: $color-2; + color: $color-1; + border-color: darken($color-2, 5); + + } + } + + &.ui-state-disabled { + .ui-state-default { + border: none; + background-image: none; + background-color: transparent; + } + } + + &.ui-datepicker-today { + a { + background-color: $color-6; + color: $color-1; + border: 1px solid darken($color-6, 5); + } + } + } + } + } +} diff --git a/vendor/assets/stylesheets/jquery-ui.datepicker.css b/vendor/assets/stylesheets/jquery-ui.datepicker.css new file mode 100644 index 0000000000..33b69f7253 --- /dev/null +++ b/vendor/assets/stylesheets/jquery-ui.datepicker.css @@ -0,0 +1,357 @@ +/* + * jQuery UI CSS Framework 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Helvetica,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=2px&bgColorHeader=dddddd&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=50&borderColorHeader=dddddd&fcHeader=444444&iconColorHeader=0073ea&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=dddddd&fcContent=444444&iconColorContent=ff0084&bgColorDefault=f6f6f6&bgTextureDefault=03_highlight_soft.png&bgImgOpacityDefault=100&borderColorDefault=dddddd&fcDefault=0073ea&iconColorDefault=666666&bgColorHover=0073ea&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=25&borderColorHover=0073ea&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=dddddd&fcActive=ff0084&iconColorActive=454545&bgColorHighlight=ffffff&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=cccccc&fcHighlight=444444&iconColorHighlight=0073ea&bgColorError=ffffff&bgTextureError=01_flat.png&bgImgOpacityError=55&borderColorError=ff0084&fcError=222222&iconColorError=ff0084&bgColorOverlay=eeeeee&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=80&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=60&thicknessShadow=4px&offsetTopShadow=-4px&offsetLeftShadow=-4px&cornerRadiusShadow=0px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Helvetica, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Helvetica, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #ffffff url(<%= asset_path("jquery-ui/ui-bg_flat_75_ffffff_40x100.png") %>) 50% 50% repeat-x; color: #444444; } +.ui-widget-content a { color: #444444; } +.ui-widget-header { border: 1px solid #dddddd; background: #dddddd url(<%= asset_path("jquery-ui/ui-bg_highlight-soft_50_dddddd_1x100.png") %>) 50% 50% repeat-x; color: #444444; font-weight: bold; } +.ui-widget-header a { color: #444444; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #dddddd; background: #f6f6f6 url(<%= asset_path("jquery-ui/ui-bg_highlight-soft_100_f6f6f6_1x100.png") %>) 50% 50% repeat-x; font-weight: bold; color: #0073ea; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #0073ea; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #0073ea; background: #0073ea url(<%= asset_path("jquery-ui/ui-bg_highlight-soft_25_0073ea_1x100.png") %>) 50% 50% repeat-x; font-weight: bold; color: #ffffff; } +.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #dddddd; background: #ffffff url(<%= asset_path("jquery-ui/ui-bg_glass_65_ffffff_1x400.png") %>) 50% 50% repeat-x; font-weight: bold; color: #ff0084; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ff0084; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #cccccc; background: #ffffff url(<%= asset_path("jquery-ui/ui-bg_flat_55_ffffff_40x100.png") %>) 50% 50% repeat-x; color: #444444; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #444444; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #ff0084; background: #ffffff url(<%= asset_path("jquery-ui/ui-bg_flat_55_ffffff_40x100.png") %>) 50% 50% repeat-x; color: #222222; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #222222; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #222222; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(<%= asset_path("jquery-ui/ui-icons_ff0084_256x240.png") %>); } +.ui-widget-content .ui-icon {background-image: url(<%= asset_path("jquery-ui/ui-icons_ff0084_256x240.png") %>); } +.ui-widget-header .ui-icon {background-image: url(<%= asset_path("jquery-ui/ui-icons_0073ea_256x240.png") %>); } +.ui-state-default .ui-icon { background-image: url(<%= asset_path("jquery-ui/ui-icons_666666_256x240.png") %>); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(<%= asset_path("jquery-ui/ui-icons_ffffff_256x240.png") %>); } +.ui-state-active .ui-icon {background-image: url(<%= asset_path("jquery-ui/ui-icons_454545_256x240.png") %>); } +.ui-state-highlight .ui-icon {background-image: url(<%= asset_path("jquery-ui/ui-icons_0073ea_256x240.png") %>); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(<%= asset_path("jquery-ui/ui-icons_ff0084_256x240.png") %>); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -webkit-border-top-left-radius: 2px; -khtml-border-top-left-radius: 2px; border-top-left-radius: 2px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -webkit-border-top-right-radius: 2px; -khtml-border-top-right-radius: 2px; border-top-right-radius: 2px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -webkit-border-bottom-left-radius: 2px; -khtml-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -webkit-border-bottom-right-radius: 2px; -khtml-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; } + +/* Overlays */ +.ui-widget-overlay { background: #eeeeee url(<%= asset_path("jquery-ui/ui-bg_flat_0_eeeeee_40x100.png") %>) 50% 50% repeat-x; opacity: .80;filter:Alpha(Opacity=80); } +.ui-widget-shadow { margin: -4px 0 0 -4px; padding: 4px; background: #aaaaaa url(<%= asset_path("jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png") %>) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -khtml-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; }/* + * jQuery UI Datepicker 1.8.14 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file From f61258d0b4d57bed2bf4ac317ea48e8962dd3690 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 20 Dec 2019 10:18:48 +0000 Subject: [PATCH 3/6] Bring components css from spree_backend pagination and navigation rules were merged --- .../stylesheets/admin/components/actions.scss | 31 ++++ .../admin/components/admin-menu.css.scss | 12 -- .../admin/components/messages.scss | 43 +++++ .../admin/components/navigation.scss | 160 ++++++++++++++++++ .../admin/components/pagination.scss | 14 ++ .../stylesheets/admin/components/sidebar.scss | 26 +++ .../stylesheets/admin/components/states.scss | 34 ++++ .../admin/components/table-filter.scss | 14 ++ 8 files changed, 322 insertions(+), 12 deletions(-) create mode 100644 app/assets/stylesheets/admin/components/actions.scss delete mode 100644 app/assets/stylesheets/admin/components/admin-menu.css.scss create mode 100644 app/assets/stylesheets/admin/components/messages.scss create mode 100644 app/assets/stylesheets/admin/components/navigation.scss create mode 100644 app/assets/stylesheets/admin/components/sidebar.scss create mode 100644 app/assets/stylesheets/admin/components/states.scss create mode 100644 app/assets/stylesheets/admin/components/table-filter.scss diff --git a/app/assets/stylesheets/admin/components/actions.scss b/app/assets/stylesheets/admin/components/actions.scss new file mode 100644 index 0000000000..1aeac5e630 --- /dev/null +++ b/app/assets/stylesheets/admin/components/actions.scss @@ -0,0 +1,31 @@ +table tbody tr { + &.highlight { + + @each $action in $actions { + &.action-#{$action} td { + background-color: get-value($actions, $actions-bg-colors, $action); + border-color: get-value($actions, $actions-brd-colors, $action); + } + } + + &.action-remove td, &.action-void td { + text-decoration: line-through; + + &.actions { + text-decoration: none; + } + } + } + + &.before-highlight { + @each $action in $actions { + &.action-#{$action} td { + border-bottom-color: get-value($actions, $actions-brd-colors, $action); + } + } + } + + td.actions { + background-color: transparent !important; + } +} diff --git a/app/assets/stylesheets/admin/components/admin-menu.css.scss b/app/assets/stylesheets/admin/components/admin-menu.css.scss deleted file mode 100644 index fd31bcda1c..0000000000 --- a/app/assets/stylesheets/admin/components/admin-menu.css.scss +++ /dev/null @@ -1,12 +0,0 @@ -#admin-menu { - li { - a { - font-weight: 600; - } - - a::before { - font-weight: normal; - padding-top: 0; - } - } -} diff --git a/app/assets/stylesheets/admin/components/messages.scss b/app/assets/stylesheets/admin/components/messages.scss new file mode 100644 index 0000000000..8300434d62 --- /dev/null +++ b/app/assets/stylesheets/admin/components/messages.scss @@ -0,0 +1,43 @@ +.errorExplanation { + padding: 5px; + border: 1px solid very-light($color-error, 12); + background-color: very-light($color-error, 6); + border-radius: 3px; + color: very-light($color-error, 30); + margin-bottom: 15px; + + h2 { + font-size: 140%; + color: very-light($color-error, 30); + margin-bottom: 5px; + } + + p { + padding: 10px 0; + } + + ul { + list-style-position: inside; + + li { + font-weight: $font-weight-bold; + } + } +} + +.flash { + position: fixed; + top: 0; + left: 0; + width: 100%; + padding: 16px; + text-align: center; + z-index: 1000; + font-size: 120%; + color: $color-1; + font-weight: 600; + + &.notice { background-color: rgba($color-notice, 0.8) } + &.success { background-color: rgba($color-success, 0.8) } + &.error { background-color: rgba($color-error, 0.8) } +} \ No newline at end of file diff --git a/app/assets/stylesheets/admin/components/navigation.scss b/app/assets/stylesheets/admin/components/navigation.scss new file mode 100644 index 0000000000..74788ab582 --- /dev/null +++ b/app/assets/stylesheets/admin/components/navigation.scss @@ -0,0 +1,160 @@ +// Navigation +//--------------------------------------------------- +.inline-menu { + margin: 0; + -webkit-margin-before: 0; + -webkit-padding-start: 0; +} + +nav.menu { + ul { + list-style: none; + + li { + a { + padding: 10px 0; + display: block; + position: relative; + text-align: left; + border: 1px solid transparent; + text-transform: uppercase; + font-weight: 600; + font-size: 90%; + } + + &.active a { + color: $color-2; + border-left-width: 0; + border-bottom-color: $color-2; + } + + &:hover a { + color: $color-2; + } + } + } +} + +[data-hook="admin_login_navigation_bar"] { + ul { + text-align: right; + + li { + padding: 5px 0 5px 10px; + text-align: right; + font-size: 90%; + color: $color-link; + margin-top: 8px; + + &[data-hook="user-logged-in-as"] { + width: 50%; + color: $color-body-text; + } + + &:hover { + i { + color: $color-2; + } + } + } + } +} + +#admin-menu { + background-color: $color-3; + + li { + min-width: 90px; + + a { + display: block; + padding: 25px 20px; + color: $color-1 !important; + text-transform: uppercase; + position: relative; + text-align: center; + font-weight: 600; + + i { + display: inline; + } + + &:hover { + background-color: $color-2; + + &:after { + content: ''; + position: absolute; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 5px solid $color-2; + bottom: 0px; + margin-bottom: -5px; + left: 50%; + margin-left: -10px; + z-index: 1; + } + } + + span.text { + font-weight: 600; + } + } + + a::before { + font-weight: normal; + padding-top: 0; + } + + .dropdown { + width: 300px; + background-color: $color-3; + width: 200px; + z-index: 100000; + + > li { + width: 200px !important; + + a:after { + display: none; + } + } + } + + &.selected a { + @extend a:hover; + } + } +} + +#sub-menu { + background-color: $color-2; + padding-bottom: 0; + + li { + a { + display: block; + padding: 12px 20px; + color: $color-1; + text-align: center; + text-transform: uppercase; + position: relative; + font-size: 85%; + } + + &.selected a, a:hover { + &:after { + content: ''; + position: absolute; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-top: 5px solid $color-2; + bottom: 0px; + margin-bottom: -5px; + left: 50%; + margin-left: -10px; + z-index: 1; + } + } + } +} diff --git a/app/assets/stylesheets/admin/components/pagination.scss b/app/assets/stylesheets/admin/components/pagination.scss index 05cbf34ca7..c05a9fdd80 100644 --- a/app/assets/stylesheets/admin/components/pagination.scss +++ b/app/assets/stylesheets/admin/components/pagination.scss @@ -3,6 +3,20 @@ .pagination { text-align: center; margin: 2em 0 1em; + padding: 10px 0; + + .page { + padding: 5px 8px; + text-align: center; + display: inline-block; + text-align: center; + + &.current { + background-color: $color-2; + border-radius: 3px; + color: $color-1; + } + } button { margin: 0 0.35em; diff --git a/app/assets/stylesheets/admin/components/sidebar.scss b/app/assets/stylesheets/admin/components/sidebar.scss new file mode 100644 index 0000000000..960de96ab0 --- /dev/null +++ b/app/assets/stylesheets/admin/components/sidebar.scss @@ -0,0 +1,26 @@ +// Sidebar +//--------------------------------------------------- +#sidebar { + overflow: visible; + border-top: 1px solid $color-border; + margin-top: 17px; + + .sidebar-title { + color: $color-2; + text-transform: uppercase; + text-align: center; + font-size: 14px; + font-weight: 600; + + > span { + display: inline; + background: #fff; + padding: 5px 10px; + position: relative; + top: -14px; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + } +} diff --git a/app/assets/stylesheets/admin/components/states.scss b/app/assets/stylesheets/admin/components/states.scss new file mode 100644 index 0000000000..97ad366abf --- /dev/null +++ b/app/assets/stylesheets/admin/components/states.scss @@ -0,0 +1,34 @@ +.state { + text-transform: uppercase; + font-size: 80%; + font-weight: 600; + + &:before { + content: ''; + position: relative; + display: inline-block; + margin-right: 3px; + border-radius: $body-font-size/2; + width: $body-font-size - 4px; + height: $body-font-size - 4px; + } + + @each $state in $states { + &.#{$state}:before { + background-color: get-value($states, $states-bg-colors, $state); + + // &, a { + // color: get-value($states, $states-text-colors, $state); + // } + } + } +} + +table tbody tr { + &[class*="state"] td:first-child { + border-left-width: 3px; + } + &.state-complete td:first-child { border-left-color: $color-success } + &.state-cart td:first-child { border-left-color: very-light($color-notice, 6) } + &.state-canceled td:first-child { border-left-color: $color-error } +} diff --git a/app/assets/stylesheets/admin/components/table-filter.scss b/app/assets/stylesheets/admin/components/table-filter.scss new file mode 100644 index 0000000000..51504e4589 --- /dev/null +++ b/app/assets/stylesheets/admin/components/table-filter.scss @@ -0,0 +1,14 @@ +#table-filter { + + .field { + input[type="text"], input[type="phone"], + input[type="email"], input[type="number"], + input[type="url"] { + width: 100%; + } + } + + .actions { + text-align: center; + } +} \ No newline at end of file From 9c0788c3e06f4cd064344a7204d1c09776c6eee9 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 20 Dec 2019 10:22:46 +0000 Subject: [PATCH 4/6] Bring shared css rules from spree_backend --- .../stylesheets/admin/shared/forms.scss | 267 ++++++++++++++++++ .../stylesheets/admin/shared/icons.scss | 23 ++ .../stylesheets/admin/shared/layout.scss | 90 ++++++ .../stylesheets/admin/shared/tables.scss | 205 ++++++++++++++ .../stylesheets/admin/shared/typography.scss | 132 +++++++++ 5 files changed, 717 insertions(+) create mode 100644 app/assets/stylesheets/admin/shared/forms.scss create mode 100644 app/assets/stylesheets/admin/shared/icons.scss create mode 100644 app/assets/stylesheets/admin/shared/layout.scss create mode 100644 app/assets/stylesheets/admin/shared/tables.scss create mode 100644 app/assets/stylesheets/admin/shared/typography.scss diff --git a/app/assets/stylesheets/admin/shared/forms.scss b/app/assets/stylesheets/admin/shared/forms.scss new file mode 100644 index 0000000000..133ae9ce2f --- /dev/null +++ b/app/assets/stylesheets/admin/shared/forms.scss @@ -0,0 +1,267 @@ +input[type="text"], +input[type="password"], +input[type="email"], +input[type="date"], +input[type="datetime"], +input[type="time"], +input[type="url"], +input[type="number"], +input[type="tel"], +textarea, fieldset { + @include border-radius($border-radius); + padding: 7px 10px; + border: 1px solid $color-txt-brd; + color: $color-txt-text; + font-size: 90%; + + &:focus { + outline: none; + border-color: $color-txt-hover-brd; + } + + &[disabled] { + opacity: 0.7; + } +} + +textarea { + line-height: 19px; +} + +.fullwidth { + width: 100%; +} + +label { + font-weight: 600; + text-transform: uppercase; + font-size: 85%; + display: inline; + margin-bottom: 5px; + color: $color-4; + + &.inline { + display: inline-block !important; + } + + &.block { + display: block !important; + } +} + +.label-block label { display: block } + +input[type="submit"], +input[type="button"], +button, .button { + @include border-radius($border-radius); + display: inline-block; + padding: 8px 15px; + border: none; + background-color: $color-btn-bg; + color: $color-btn-text; + text-transform: uppercase; + font-weight: 600 !important; + + &:before { + font-weight: normal !important; + } + + &:visited, &:active, &:focus { color: $color-btn-text } + + &:hover { + background-color: $color-btn-hover-bg; + color: $color-btn-hover-text; + } + + &:active:focus { + box-shadow: 0 0 8px 0 darken($color-btn-hover-bg, 5) inset; + } + + &.fullwidth { + width: 100%; + text-align: center; + } +} + +span.info { + font-style: italic; + font-size: 85%; + color: lighten($color-body-text, 15); + display: block; + line-height: 20px; + margin: 5px 0; +} + +.field { + padding: 10px 0; + + &.checkbox { + min-height: 73px; + + input[type="checkbox"] { + display: inline-block; + width: auto; + } + + label { + cursor: pointer; + display: block; + } + } + + ul { + border-top: 1px solid $color-border; + list-style: none; + padding-top: 5px; + + li { + display: inline-block; + padding-right: 10px; + + + label { + font-weight: normal; + text-transform: none; + } + &.white-space-nowrap { + white-space: nowrap; + } + } + } + + &.withError { + .field_with_errors { + label { + color: very-light($color-error, 30); + } + + input { + border-color: very-light($color-error, 15); + } + } + .formError { + color: very-light($color-error, 30); + font-style: italic; + font-size: 85%; + } + } +} + +fieldset { + box-shadow: none; + box-sizing: border-box; + border-color: $color-border; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + margin-left: 0; + margin-right: 0; + position: relative; + margin-bottom: 35px; + padding: 10px 0 15px 0; + background-color: transparent; + border-left: none; + border-right: none; + border-radius: 0; + + &.no-border-bottom { + border-bottom: none; + margin-bottom: 0; + } + + &.no-border-top { + border-top: none; + padding-top: 0; + } + + legend { + background-color: $color-1; + color: $color-2; + font-size: 14px; + font-weight: 600; + text-transform: uppercase; + text-align: center; + padding: 8px 15px; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + i { + color: $color-link; + } + } + + label { + color: lighten($color-body-text, 8); + } + + .filter-actions { + margin-bottom: -32px; + margin-top: 15px; + text-align: center; + + form { + display: inline-block; + } + + button, .button, input[type="submit"], input[type="button"], span.or { + @include border-radius($border-radius); + + -webkit-box-shadow: 0 0 0 15px $color-1; + -moz-box-shadow: 0 0 0 15px $color-1; + -ms-box-shadow: 0 0 0 15px $color-1; + -o-box-shadow: 0 0 0 15px $color-1; + box-shadow: 0 0 0 15px $color-1; + + &:hover { + border-color: $color-1; + } + } + + span.or { + background-color: $color-1; + border-width: 5px; + margin-left: 5px; + margin-right: 5px; + position: relative; + + -webkit-box-shadow: 0 0 0 5px $color-1; + -moz-box-shadow: 0 0 0 5px $color-1; + -ms-box-shadow: 0 0 0 5px $color-1; + -o-box-shadow: 0 0 0 5px $color-1; + box-shadow: 0 0 0 5px $color-1; + } + } + + &.labels-inline { + .field { + margin-bottom: 0; + display: table; + width: 100%; + + label, input { + display: table-cell !important; + } + input { + width: 100%; + } + + &.checkbox { + input { + width: auto !important + } + } + } + .actions { + padding: 0; + text-align: right; + } + } +} + +.form-actions { + margin-top: 18px; +} +.form-buttons { + text-align: center; +} diff --git a/app/assets/stylesheets/admin/shared/icons.scss b/app/assets/stylesheets/admin/shared/icons.scss new file mode 100644 index 0000000000..4e0d275ddf --- /dev/null +++ b/app/assets/stylesheets/admin/shared/icons.scss @@ -0,0 +1,23 @@ +// Some fixes for fontwesome stylesheets +[class^="icon-"], [class*=" icon-"] { + &:before { + padding-right: 5px; + } + + &.button, &.icon_link { + width: auto; + + &:before { + padding-top: 3px; + } + } +} + +.icon-email:before { @extend .icon-envelope:before } +.icon-resume:before { @extend .icon-refresh:before } + +.icon-cancel:before, +.icon-void:before { @extend .icon-remove:before } + +.icon-capture:before { @extend .icon-ok:before } +.icon-credit:before { @extend .icon-ok:before } diff --git a/app/assets/stylesheets/admin/shared/layout.scss b/app/assets/stylesheets/admin/shared/layout.scss new file mode 100644 index 0000000000..70df4b98d8 --- /dev/null +++ b/app/assets/stylesheets/admin/shared/layout.scss @@ -0,0 +1,90 @@ +// Basics +//--------------------------------------------------- +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +// Helpers +.block-table { + display: table; + width: 100%; + + .table-cell { + display: table-cell; + vertical-align: middle; + padding: 0 10px; + + &:first-child { + padding-left: 0; + } + &:last-child { + padding-right: 0; + } + } +} + +.hidden { + display: none; +} + +// For block grids +.frameless { + margin-left: -10px; + margin-right: -10px; +} + +// Header +//--------------------------------------------------- +#header { + background-color: $color-1; + padding: 5px 0; +} + +#logo { height: 40px } + +[data-hook="admin-title"] { font-size: 14px } + +.page-title { + i { + color: $color-2; + } +} + +// Content +//--------------------------------------------------- +#content { + background-color: $color-1; + position: relative; + z-index: 0; + padding: 0; + margin-top: 15px; +} + +#content-header { + padding: 15px 0; + background-color: very-light($color-3, 4); + border-bottom: 1px solid $color-border; + + .page-title { + font-size: 20px; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + .page-actions { + text-align: right; + form { + display: inline-block; + } + } +} + +// Footer +//--------------------------------------------------- +#footer { + margin-top: 15px; + border-top: 1px solid $color-border; + padding: 10px 0; +} diff --git a/app/assets/stylesheets/admin/shared/tables.scss b/app/assets/stylesheets/admin/shared/tables.scss new file mode 100644 index 0000000000..8f089f6765 --- /dev/null +++ b/app/assets/stylesheets/admin/shared/tables.scss @@ -0,0 +1,205 @@ +table { + width: 100%; + margin-bottom: 15px; + border-collapse: separate; + + th, td { + padding: 7px 5px; + border-right: 1px solid $color-border; + border-bottom: 1px solid $color-border; + vertical-align: middle; + text-overflow: ellipsis; + + img { + border: 1px solid transparent; + } + + &:first-child { + border-left: 1px solid $color-border; + } + + a { + border-bottom: 1px dotted lighten($color-link, 10); + + &:hover { + border-color: lighten($color-link-hover, 10); + } + } + + .handle { + display: block !important; + text-align: center; + padding-right: 0; + } + + &.actions { + background-color: transparent; + border: none !important; + text-align: center; + + span.text { + font-size: $body-font-size; + } + + [class*='icon-'].no-text { + font-size: 120%; + background-color: very-light($color-3); + border: 1px solid $color-border; + border-radius: 15px; + width: 29px; + height: 29px; + display: inline-block; + padding-top: 2px; + + &:before { + text-align: center !important; + width: 27px; + display: inline-block; + } + + &:hover { + border-color: transparent; + } + } + + button[class*='icon-'] { + color: $color-link; + padding: 0 !important; + } + + .icon-envelope-alt, .icon-eye-open { + color: $color-link; + padding-left: 0px; + + &:hover { + background-color: $color-3; + color: $color-1; + } + } + .icon-trash:hover, .icon-void:hover { + background-color: $color-error; + color: $color-1; + } + .icon-cancel:hover { + background-color: $color-notice; + color: $color-1; + } + .icon-edit:hover, .icon-capture:hover, .icon-ok:hover, .icon-plus:hover { + background-color: $color-success; + color: $color-1; + } + .icon-copy:hover { + background-color: $color-notice; + color: $color-1; + } + } + + input[type="number"], + input[type="text"] { + width: 100%; + } + + &.no-border { + border-right: none; + } + + .handle { + @extend [class^="icon-"]:before; + @extend .icon-reorder; + cursor: move; + } + + } + + &.no-borders { + td, th { + border: none !important; + } + + } + + thead { + th { + padding: 10px; + border-top: 1px solid $color-border; + border-bottom: none; + background-color: $color-tbl-thead; + text-transform: uppercase; + font-size: 85%; + font-weight: $font-weight-bold; + } + } + + tbody { + tr { + &:first-child th, + &:first-child td { + border-top: 1px solid $color-border; + } + &.even td { + background-color: $color-tbl-even; + + img { + border: 1px solid very-light($color-3, 6); + } + } + + &:hover td { + background-color: very-light($color-3, 5); + + img { + border: 1px solid $color-border; + } + } + + &.deleted td { + background-color: very-light($color-error, 6); + border-color: very-light($color-error, 15); + } + + &.ui-sortable-placeholder td { + border: 1px solid $color-2 !important; + visibility: visible !important; + + &.actions { + background-color: transparent; + border-right: none !important; + border-top: none !important; + border-bottom: none !important; + border-left: 1px solid $color-2 !important; + } + } + + &.ui-sortable-helper { + width: 100%; + + td { + background-color: lighten($color-3, 33); + border-bottom: 1px solid $color-border; + + &.actions { + display: none; + } + } + } + } + + &.no-border-top tr:first-child td { + border-top: none; + } + + &.grand-total { + td { + border-color: $color-2 !important; + text-transform: uppercase; + font-size: 110%; + font-weight: 600; + background-color: lighten($color-2, 50); + } + .total { + background-color: $color-2; + color: $color-1; + } + } + } +} diff --git a/app/assets/stylesheets/admin/shared/typography.scss b/app/assets/stylesheets/admin/shared/typography.scss new file mode 100644 index 0000000000..76fc7c1967 --- /dev/null +++ b/app/assets/stylesheets/admin/shared/typography.scss @@ -0,0 +1,132 @@ +// Base +//-------------------------------------------------------------- +body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 13px; } + +body { + font-family: $base-font-family; + font-size: $body-font-size; + font-weight: 400; + color: $color-body-text; + text-rendering: optimizeLegibility; +} + +hr { + border-top: 1px solid $color-border; + border-bottom: 1px solid white; + border-left: none; +} + +strong, b { + font-weight: 600; +} + +// links +//-------------------------------------------------------------- +a { + color: $color-link; + text-decoration: none; + line-height: inherit; + + &, &:hover, &:active, &:visited, &:focus { + outline: none; + } + + &:visited { + color: $color-link-visited; + } + &:focus { + color: $color-link-focus; + } + &:active { + color: $color-link-active; + } + &:hover { + color: $color-link-hover; + } +} + +// Headings +//-------------------------------------------------------------- + +h1,h2,h3,h4,h5,h6 { + font-weight: 600; + color: $color-headers; + line-height: 1.1; +} + +h1 { font-size: $h1-size; line-height: $h1-size + 6 } +h2 { font-size: $h2-size; line-height: $h1-size + 4 } +h3 { font-size: $h3-size; line-height: $h1-size + 2 } +h4 { font-size: $h4-size; line-height: $h1-size } +h5 { font-size: $h5-size; line-height: $h1-size } +h6 { font-size: $h6-size; line-height: $h1-size } + + +// Lists +//-------------------------------------------------------------- +ul { + &.inline-menu { + li { + display: inline-block; + } + } + &.fields { + list-style: none; + padding: 0; + margin: 0; + } +} + +dl { + width: 100%; + overflow: hidden; + margin: 5px 0; + color: lighten($color-body-text, 15); + + dt, dd { + float: left; + line-height: 16px; + padding: 5px; + text-align: justify; + } + + dt { + width: 40%; + font-weight: 600; + padding-left: 0; + text-transform: uppercase; + font-size: 85%; + } + + dd { + width: 60%; + padding-right: 0; + } + + dd:after { + content: ''; + clear: both; + } + +} + +// Helpers +.align-center { text-align: center } +.align-right { text-align: right } +.align-left { text-align: left } +.align-justify { text-align: justify } + +.uppercase { text-transform: uppercase } + +.green { color: $color-2 } +.blue { color: $color-3 } +.red { color: $color-5 } +.yellow { color: $color-6 } + +.no-objects-found { + text-align: center; + font-size: 120%; + text-transform: uppercase; + padding: 40px 0px; + color: lighten($color-body-text, 15); +} From 8b6ebfb351623688aefecd3539d67d830d485a70 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 20 Dec 2019 10:25:00 +0000 Subject: [PATCH 5/6] Add imports for new css files from spree_backend --- app/assets/stylesheets/admin/all.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/admin/all.scss b/app/assets/stylesheets/admin/all.scss index 832377ebc4..cd8063d43f 100644 --- a/app/assets/stylesheets/admin/all.scss +++ b/app/assets/stylesheets/admin/all.scss @@ -19,10 +19,17 @@ //************************************************************************// //************************************************************************// +@import 'globals/functions'; @import 'globals/variables'; @import 'variables'; @import 'globals/mixins'; +@import 'shared/typography'; +@import 'shared/tables'; +@import 'shared/icons'; +@import 'shared/forms'; +@import 'shared/layout'; + @import 'plugins/powertip'; @import 'plugins/jstree'; @import 'plugins/font-awesome'; @@ -31,7 +38,6 @@ @import 'hacks/opera'; @import 'hacks/ie'; - @import 'components/*'; @import 'pages/*'; @import '*'; From f48ab57782dc8598f9e924269b6fe14b0739d442 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 24 Jan 2020 17:48:42 +0000 Subject: [PATCH 6/6] Add explicit css import statements where they are needed --- app/assets/stylesheets/admin/components/actions.scss | 2 ++ app/assets/stylesheets/admin/components/date-picker.scss | 4 ++++ app/assets/stylesheets/admin/components/messages.scss | 2 ++ app/assets/stylesheets/admin/components/navigation.scss | 2 ++ app/assets/stylesheets/admin/components/pagination.scss | 1 + app/assets/stylesheets/admin/components/sidebar.scss | 2 ++ app/assets/stylesheets/admin/components/states.scss | 2 ++ app/assets/stylesheets/admin/shared/forms.scss | 3 +++ app/assets/stylesheets/admin/shared/icons.scss | 2 ++ app/assets/stylesheets/admin/shared/layout.scss | 2 ++ app/assets/stylesheets/admin/shared/tables.scss | 3 +++ app/assets/stylesheets/admin/shared/typography.scss | 2 ++ 12 files changed, 27 insertions(+) diff --git a/app/assets/stylesheets/admin/components/actions.scss b/app/assets/stylesheets/admin/components/actions.scss index 1aeac5e630..c6b5519aef 100644 --- a/app/assets/stylesheets/admin/components/actions.scss +++ b/app/assets/stylesheets/admin/components/actions.scss @@ -1,3 +1,5 @@ +@import 'admin/globals/variables'; + table tbody tr { &.highlight { diff --git a/app/assets/stylesheets/admin/components/date-picker.scss b/app/assets/stylesheets/admin/components/date-picker.scss index 296bc8b806..f54f33d5b5 100644 --- a/app/assets/stylesheets/admin/components/date-picker.scss +++ b/app/assets/stylesheets/admin/components/date-picker.scss @@ -1,3 +1,7 @@ +@import 'admin/globals/variables'; +@import 'admin/globals/mixins'; +@import 'admin/plugins/font-awesome'; + .date-range-filter { .range-divider { padding: 0; diff --git a/app/assets/stylesheets/admin/components/messages.scss b/app/assets/stylesheets/admin/components/messages.scss index 8300434d62..0b353da214 100644 --- a/app/assets/stylesheets/admin/components/messages.scss +++ b/app/assets/stylesheets/admin/components/messages.scss @@ -1,3 +1,5 @@ +@import 'admin/globals/variables'; + .errorExplanation { padding: 5px; border: 1px solid very-light($color-error, 12); diff --git a/app/assets/stylesheets/admin/components/navigation.scss b/app/assets/stylesheets/admin/components/navigation.scss index 74788ab582..c90f4b736a 100644 --- a/app/assets/stylesheets/admin/components/navigation.scss +++ b/app/assets/stylesheets/admin/components/navigation.scss @@ -1,3 +1,5 @@ +@import 'admin/globals/variables'; + // Navigation //--------------------------------------------------- .inline-menu { diff --git a/app/assets/stylesheets/admin/components/pagination.scss b/app/assets/stylesheets/admin/components/pagination.scss index c05a9fdd80..3491585449 100644 --- a/app/assets/stylesheets/admin/components/pagination.scss +++ b/app/assets/stylesheets/admin/components/pagination.scss @@ -1,3 +1,4 @@ +@import 'admin/globals/variables'; @import "admin/variables"; .pagination { diff --git a/app/assets/stylesheets/admin/components/sidebar.scss b/app/assets/stylesheets/admin/components/sidebar.scss index 960de96ab0..03047ba8db 100644 --- a/app/assets/stylesheets/admin/components/sidebar.scss +++ b/app/assets/stylesheets/admin/components/sidebar.scss @@ -1,3 +1,5 @@ +@import 'admin/globals/variables'; + // Sidebar //--------------------------------------------------- #sidebar { diff --git a/app/assets/stylesheets/admin/components/states.scss b/app/assets/stylesheets/admin/components/states.scss index 97ad366abf..11593f2f77 100644 --- a/app/assets/stylesheets/admin/components/states.scss +++ b/app/assets/stylesheets/admin/components/states.scss @@ -1,3 +1,5 @@ +@import 'admin/globals/variables'; + .state { text-transform: uppercase; font-size: 80%; diff --git a/app/assets/stylesheets/admin/shared/forms.scss b/app/assets/stylesheets/admin/shared/forms.scss index 133ae9ce2f..9da2543fb8 100644 --- a/app/assets/stylesheets/admin/shared/forms.scss +++ b/app/assets/stylesheets/admin/shared/forms.scss @@ -1,3 +1,6 @@ +@import 'admin/globals/variables'; +@import 'admin/globals/mixins'; + input[type="text"], input[type="password"], input[type="email"], diff --git a/app/assets/stylesheets/admin/shared/icons.scss b/app/assets/stylesheets/admin/shared/icons.scss index 4e0d275ddf..04a3fb74c0 100644 --- a/app/assets/stylesheets/admin/shared/icons.scss +++ b/app/assets/stylesheets/admin/shared/icons.scss @@ -1,3 +1,5 @@ +@import 'admin/plugins/font-awesome'; + // Some fixes for fontwesome stylesheets [class^="icon-"], [class*=" icon-"] { &:before { diff --git a/app/assets/stylesheets/admin/shared/layout.scss b/app/assets/stylesheets/admin/shared/layout.scss index 70df4b98d8..804e32b3a8 100644 --- a/app/assets/stylesheets/admin/shared/layout.scss +++ b/app/assets/stylesheets/admin/shared/layout.scss @@ -1,3 +1,5 @@ +@import 'admin/globals/variables'; + // Basics //--------------------------------------------------- * { diff --git a/app/assets/stylesheets/admin/shared/tables.scss b/app/assets/stylesheets/admin/shared/tables.scss index 8f089f6765..93b3a5070d 100644 --- a/app/assets/stylesheets/admin/shared/tables.scss +++ b/app/assets/stylesheets/admin/shared/tables.scss @@ -1,3 +1,6 @@ +@import 'admin/globals/variables'; +@import 'admin/plugins/font-awesome'; + table { width: 100%; margin-bottom: 15px; diff --git a/app/assets/stylesheets/admin/shared/typography.scss b/app/assets/stylesheets/admin/shared/typography.scss index 76fc7c1967..9cd3a4c2c4 100644 --- a/app/assets/stylesheets/admin/shared/typography.scss +++ b/app/assets/stylesheets/admin/shared/typography.scss @@ -1,3 +1,5 @@ +@import 'admin/globals/variables'; + // Base //-------------------------------------------------------------- body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 13px; }