diff --git a/mrp_workorder/static/src/scss/table_custom.scss b/mrp_workorder/static/src/scss/table_custom.scss new file mode 100644 index 00000000..d0557894 --- /dev/null +++ b/mrp_workorder/static/src/scss/table_custom.scss @@ -0,0 +1,28 @@ +.o_form_view.o_xxl_form_view { + flex-flow: column !important; +} + +.o_form_view_container { + width: 100% !important; +} + +html .o_web_client > .o_action_manager > .o_action { + height: unset !important; + overflow: scroll !important; +} + +.o_FormRenderer_chatterContainer.o-aside { + width: 100% !important; + max-width: 1320px !important; + background-color: #fff !important; + padding-left: 32px !important; + padding-right: 32px !important; + box-sizing: border-box !important; + border: 1px solid #dee2e6; + //margin-bottom: 12px; +} + +.o_form_view { + background-color: unset !important; + min-height: unset !important; +} diff --git a/mrp_workorder/static/src/scss/tablet_view.scss b/mrp_workorder/static/src/scss/tablet_view.scss index 0ecc86da..1e251ed7 100644 --- a/mrp_workorder/static/src/scss/tablet_view.scss +++ b/mrp_workorder/static/src/scss/tablet_view.scss @@ -1,251 +1,231 @@ .o_web_client { - $o-wo-tablet-padding: $o-horizontal-padding; - $o-wo-tablet-btn-margin: 2px; - $o-wo-tablet-bg: #404040; // emulate the pdf reader - $o-wo-tablet-text: color-contrast($o-wo-tablet-bg, $body-color, #FFF); + $o-wo-tablet-padding: $o-horizontal-padding; + $o-wo-tablet-btn-margin: 2px; + $o-wo-tablet-bg: #404040; // emulate the pdf reader + $o-wo-tablet-text: color-contrast($o-wo-tablet-bg, $body-color, #FFF); - .o_legacy_form_view.o_workorder_tablet { - display: flex; - flex-flow: column nowrap; - padding: 0; - background-color: $o-wo-tablet-bg; - background-image: url(/web/static/lib/pdfjs/web/images/texture.png); - background-repeat: repeat; + .o_legacy_form_view.o_workorder_tablet { + display: flex; + flex-flow: column nowrap; + padding: 0; + background-color: $o-wo-tablet-bg; + background-image: url(/web/static/lib/pdfjs/web/images/texture.png); + background-repeat: repeat; + color: $o-wo-tablet-text; + height: auto; + overflow: auto; + + font-size: 16px; + + @include media-breakpoint-up(xl) { + font-size: 18px; + } + + // Components + h1, h2, h3, h4, h5, h6 { + color: $o-wo-tablet-text; + } + + .btn { + font-size: 1em; + padding: 0.4em 1em; + margin: 0 $o-wo-tablet-btn-margin; + + &.btn-secondary { color: $o-wo-tablet-text; + background-color: $o-wo-tablet-bg; + border: $o-wo-tablet-bg; + text-transform: capitalize; + } + + &.fa-plus-square-o { + margin-bottom: 1px; + } + + &.o_workorder_icon_btn { + padding: 0.4em; + + &.o_workorder_icon_back { + padding: 0.4em 0.8em; + } + } + + .o_workorder_btn_icon_small { + font-size: 0.8em; + margin-top: -1em; + + &.float-end { + margin-top: 0.5em; + } + } + } + + .o_input { + background-color: $o-wo-tablet-bg; + color: $o-wo-tablet-text; + padding: 0.4em 1em; + } + + .o_field_widget { + margin-bottom: 0; + } + + .o_workorder_bar_content { + display: flex; + flex-flow: row nowrap; + flex: 1 0 auto; + align-items: center; + + &.workorder_bar_left { + word-break: break-all; + flex-shrink: 1; + } + + @include media-breakpoint-down(md) { + justify-content: flex-start; + &.workorder_bar_left { + flex-flow: wrap; + } + } + + &.o_workorder_bar_content_right { + justify-content: flex-end; + @include media-breakpoint-down(md) { + justify-content: flex-start; + .o_actions { + display: flex; + flex-flow: column; + width: 100%; + } + } + } + } + + // Both Top Blocks + .workorder_bar, .workorder_actions { + background-color: darken($o-wo-tablet-bg, 5%); + background-image: url(/web/static/lib/pdfjs/web/images/texture.png); + } + + // First Top Block + .workorder_bar { + display: flex; + flex-flow: row wrap; + padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding; + padding-left: $o-wo-tablet-padding - $o-wo-tablet-btn-margin; + @include media-breakpoint-down(md) { + flex-flow: column; + } + } + + // Last top Block + .workorder_actions { + display: flex; + flex-flow: row nowrap; + @include media-breakpoint-down(md) { + flex-flow: column; + } + padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding - $o-wo-tablet-btn-margin $o-wo-tablet-padding; + box-shadow: 0 1px 1px rgba(black, 0.3); + font-size: 1.2em; + } + + .o_form_label { + color: $o-wo-tablet-text; + } + + // Step's info block + .o_workorder_data { + background-color: $o-wo-tablet-bg; + padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding 0; + font-size: 0.9em; + + // Final resume table + table.o_list_table { + color: $body-color; + } + + // Horizontal form + .o_workorder_form { + padding-bottom: $o-wo-tablet-padding*0.5; + justify-content: space-between; + @include media-breakpoint-down(md) { + flex-flow: column; + align-items: flex-start; + } + + > div { + flex: 1 0 auto; + } + + .o_workorder_field { + > div.o_workorder_lot { + width: 100%; + justify-content: center; + + > .o_lot_number { + width: 50%; + + &:not(.o_with_button) button.o_external_button { + display: block !important; + visibility: hidden; + } + } + } + + > div { + display: inline-flex; + align-items: baseline; + } + + .o_form_label { + opacity: 0.7; + display: inline-block; + font-weight: bold; + } + } + + a, a::first-line { + font-weight: bold; + color: $o-wo-tablet-text; + } + } + } + } + + // PDF Viewer block + .workorder_pdf { + display: flex; + flex: 1 0 auto; + + div.o_field_pdfviewer, div.o_field_pdf_viewer, span.o_embed_url_viewer { + margin: 0; + @include media-breakpoint-up(md) { height: auto; - overflow: auto; + } + position: relative; + display: flex; + flex: 1 0 auto; - font-size: 16px; - - @include media-breakpoint-up(xl) { - font-size: 18px; - } - - // Components - h1,h2,h3,h4,h5,h6 { - color: $o-wo-tablet-text; - } - - .btn { - font-size: 1em; - padding: 0.4em 1em; - margin: 0 $o-wo-tablet-btn-margin; - - &.btn-secondary { - color: $o-wo-tablet-text; - background-color: $o-wo-tablet-bg; - border: $o-wo-tablet-bg; - text-transform: capitalize; - } - - &.fa-plus-square-o { - margin-bottom: 1px; - } - - &.o_workorder_icon_btn { - padding: 0.4em; - - &.o_workorder_icon_back { - padding: 0.4em 0.8em; - } - } - - .o_workorder_btn_icon_small { - font-size: 0.8em; - margin-top: -1em; - - &.float-end { - margin-top: 0.5em; - } - } - } - - .o_input { - background-color: $o-wo-tablet-bg; - color: $o-wo-tablet-text; - padding: 0.4em 1em; - } - - .o_field_widget { - margin-bottom: 0; - } - - .o_workorder_bar_content { - display: flex; - flex-flow: row nowrap; - flex: 1 0 auto; - align-items: center; - - &.workorder_bar_left { - word-break: break-all; - flex-shrink: 1; - } - - @include media-breakpoint-down(md) { - justify-content: flex-start; - &.workorder_bar_left { - flex-flow: wrap; - } - } - - &.o_workorder_bar_content_right { - justify-content: flex-end; - @include media-breakpoint-down(md) { - justify-content: flex-start; - .o_actions { - display: flex; - flex-flow: column; - width: 100%; - } - } - } - } - - // Both Top Blocks - .workorder_bar, .workorder_actions { - background-color: darken($o-wo-tablet-bg, 5%); - background-image: url(/web/static/lib/pdfjs/web/images/texture.png); - } - - // First Top Block - .workorder_bar { - display: flex; - flex-flow: row wrap; - padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding; - padding-left: $o-wo-tablet-padding - $o-wo-tablet-btn-margin; - @include media-breakpoint-down(md) { - flex-flow: column; - } - } - - // Last top Block - .workorder_actions { - display: flex; - flex-flow: row nowrap; - @include media-breakpoint-down(md) { - flex-flow: column; - } - padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding - $o-wo-tablet-btn-margin $o-wo-tablet-padding; - box-shadow: 0 1px 1px rgba(black, 0.3); - font-size: 1.2em; - } - - .o_form_label { - color: $o-wo-tablet-text; - } - - // Step's info block - .o_workorder_data { - background-color: $o-wo-tablet-bg; - padding: $o-wo-tablet-padding*0.5 $o-wo-tablet-padding 0; - font-size: 0.9em; - - // Final resume table - table.o_list_table { - color: $body-color; - } - - // Horizontal form - .o_workorder_form { - padding-bottom: $o-wo-tablet-padding*0.5; - justify-content: space-between; - @include media-breakpoint-down(md) { - flex-flow: column; - align-items: flex-start; - } - - > div { - flex: 1 0 auto; - } - - .o_workorder_field { - > div.o_workorder_lot { - width: 100%; - justify-content: center; - > .o_lot_number { - width: 50%; - &:not(.o_with_button) button.o_external_button { - display: block !important; - visibility: hidden; - } - } - } - > div { - display: inline-flex; - align-items: baseline; - } - - .o_form_label { - opacity: 0.7; - display: inline-block; - font-weight: bold; - } - } - - a, a::first-line { - font-weight: bold; - color: $o-wo-tablet-text; - } - } - } + iframe { + display: block; + margin: 0; + width: 100%; + height: 100%; + @include o-position-absolute(0, 0, 0, 0); + } } + } - // PDF Viewer block - .workorder_pdf { - display: flex; - flex: 1 0 auto; - - div.o_field_pdfviewer, div.o_field_pdf_viewer, span.o_embed_url_viewer { - margin: 0; - @include media-breakpoint-up(md) { - height: auto; - } - position: relative; - display: flex; - flex: 1 0 auto; - - iframe { - display: block; - margin: 0; - width: 100%; - height: 100%; - @include o-position-absolute(0,0,0,0); - } - } - } - - // Work order Modal - .workorder_menu { - .btn { - margin-bottom: $o-wo-tablet-padding; - padding: 1em; - font-size: 2em; - text-transform: uppercase; - } + // Work order Modal + .workorder_menu { + .btn { + margin-bottom: $o-wo-tablet-padding; + padding: 1em; + font-size: 2em; + text-transform: uppercase; } + } } -.o_form_view.o_xxl_form_view { - flex-flow:column !important; -} -.o_form_view_container { - width:100% !important; -} - -html .o_web_client > .o_action_manager > .o_action { - overflow:scroll !important; -} - -.o_FormRenderer_chatterContainer.o-aside { - width:100% !important; - max-width: 1320px !important; - background-color:#ccc !important; -} - -.o_form_view { - background-color:unset !important; - border: 1px solid #C9CCD2 !important; - border-left-color:unset !important; - box-shadow: 0 5px 20px -15px rgb(0 0 0 / 40%) !important; -} diff --git a/sf_base/static/src/scss/test.scss b/sf_base/static/src/scss/test.scss index e351acc2..24d638e3 100644 --- a/sf_base/static/src/scss/test.scss +++ b/sf_base/static/src/scss/test.scss @@ -1,15 +1,22 @@ .test_model { display: flex !important; } -.test_model>.o_form_label { + +.test_model > .o_form_label { margin-left: 20px; margin-right: 0px !important; white-space: nowrap; } -.o_form_label.o_field_invalid::after { + +div:has(.o_required_modifier)>label::before { content: '*' !important; color: red !important; padding: 0 4px !important; vertical-align: top !important; font-size: 1.5rem !important; - } \ No newline at end of file + display: inline !important; +} + +.o_required_modifier { + display: flex !important; +} \ No newline at end of file