Tower: upload web_responsive 19.0.1.0.2 (was 19.0.1.0.2, via marketplace)
All checks were successful
addon-qualify / qualify (push) Successful in 13s
All checks were successful
addon-qualify / qualify (push) Successful in 13s
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/* global requestAnimationFrame, window, document */
|
||||
/* Copyright 2018 Tecnativa - Jairo Llopis
|
||||
* Copyright 2021 ITerra - Sergey Shebanin
|
||||
* Copyright 2023 Onestein - Anjeel Haria
|
||||
* Copyright 2023 Taras Shabaranskyi
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
import {debounce} from "@web/core/utils/timing";
|
||||
|
||||
// Fix for iOS Safari to set correct viewport height
|
||||
// https://github.com/Faisal-Manzer/postcss-viewport-height-correction
|
||||
export function setViewportProperty(doc) {
|
||||
function handleResize() {
|
||||
requestAnimationFrame(function () {
|
||||
doc.style.setProperty("--vh100", doc.clientHeight + "px");
|
||||
});
|
||||
}
|
||||
|
||||
handleResize();
|
||||
return handleResize;
|
||||
}
|
||||
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
debounce(setViewportProperty(document.documentElement), 25)
|
||||
);
|
||||
95
addons/web_responsive/static/src/legacy/scss/big_boxes.scss
Normal file
95
addons/web_responsive/static/src/legacy/scss/big_boxes.scss
Normal file
@@ -0,0 +1,95 @@
|
||||
/* Copyright 2018 Tecnativa - Jairo Llopis
|
||||
* Copyright 2021 ITerra - Sergey Shebanin
|
||||
* Copyright 2023 Onestein - Anjeel Haria
|
||||
* Copyright 2023 Taras Shabaranskyi
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
$big-checkbox-size: 1.5em;
|
||||
|
||||
// Big checkboxes
|
||||
.o_list_view,
|
||||
.o_setting_container .o_setting_box {
|
||||
.o_setting_right_pane {
|
||||
margin-left: 34px;
|
||||
}
|
||||
|
||||
.o-checkbox:not(.o_boolean_toggle) {
|
||||
margin-right: 10px;
|
||||
margin-top: -6px;
|
||||
|
||||
&.d-inline-block {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
height: $big-checkbox-size;
|
||||
width: $big-checkbox-size;
|
||||
}
|
||||
}
|
||||
|
||||
.o_optional_columns_dropdown {
|
||||
.o-dropdown--menu {
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.o-checkbox {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_add_favorite + .o_accordion_values {
|
||||
.o_add_favorite_props {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.o_add_favorite_name {
|
||||
margin-bottom: 0.5rem;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
height: $big-checkbox-size;
|
||||
width: $big-checkbox-size;
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.o-checkbox {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.o_setting_container .o_setting_box {
|
||||
.o-checkbox:not(.o_boolean_toggle) {
|
||||
.form-check-label {
|
||||
&::after {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
&::before {
|
||||
outline: none !important;
|
||||
border: 1px solid #4c4c4c;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
/* Copyright 2023 Taras Shabaranskyi
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
$o-form-renderer-max-width: 3840px;
|
||||
$o-form-view-sheet-max-width: 2560px;
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Copyright 2018 Tecnativa - Jairo Llopis
|
||||
* Copyright 2021 ITerra - Sergey Shebanin
|
||||
* Copyright 2023 Onestein - Anjeel Haria
|
||||
* Copyright 2023 Taras Shabaranskyi
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
.o_mobile_sticky {
|
||||
transition: top 0.5s;
|
||||
}
|
||||
|
||||
// Sticky Header & Footer in List View
|
||||
.o_list_view {
|
||||
.o_list_table {
|
||||
thead {
|
||||
box-shadow: 0 1px 0 0 var(--ListRenderer-thead-border-end-color);
|
||||
}
|
||||
|
||||
.o_list_footer {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
background-color: var(--ListRenderer-thead-bg-color);
|
||||
box-shadow: 0 -1px 0 -1px var(--ListRenderer-thead-border-end-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Copyright 2023 Taras Shabaranskyi
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
$app-menu-text-color: #374151 !default;
|
||||
$app-menu-background-color: rgb(233, 230, 249) !default;
|
||||
$app-menu-item-highlight: rgb(243, 240, 259) !default;
|
||||
$app-menu-box-shadow:
|
||||
inset 0 0 0 1px rgba(0, 0, 0, 0.16),
|
||||
0 2px 2px rgba(0, 0, 0, 0.016),
|
||||
0 4px 4px rgba(0, 0, 0, 0.016),
|
||||
0 8px 8px rgba(0, 0, 0, 0.016),
|
||||
0 16px 16px rgba(0, 0, 0, 0.016) !default;
|
||||
$app-menu-box-shadow-highlight:
|
||||
inset 0 0 0 1px rgba(0, 0, 0, 0.26),
|
||||
0 2px 2px rgba(0, 0, 0, 0.026),
|
||||
0 4px 4px rgba(0, 0, 0, 0.026),
|
||||
0 8px 8px rgba(0, 0, 0, 0.026),
|
||||
0 16px 16px rgba(0, 0, 0, 0.026) !default;
|
||||
221
addons/web_responsive/static/src/legacy/scss/web_responsive.scss
Normal file
221
addons/web_responsive/static/src/legacy/scss/web_responsive.scss
Normal file
@@ -0,0 +1,221 @@
|
||||
/* Copyright 2018 Tecnativa - Jairo Llopis
|
||||
* Copyright 2021 ITerra - Sergey Shebanin
|
||||
* Copyright 2023 Onestein - Anjeel Haria
|
||||
* Copyright 2023 Taras Shabaranskyi
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
$chatter_zone_width: 35% !important;
|
||||
|
||||
// Allow sticky header
|
||||
.o_action_manager {
|
||||
.o_form_view {
|
||||
overflow: unset;
|
||||
|
||||
.o_form_view_container {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
.ui-menu-item-wrapper {
|
||||
display: inline-flex !important;
|
||||
align-items: center;
|
||||
height: 35px;
|
||||
}
|
||||
.o_calendar_view .o_calendar_widget {
|
||||
.fc-timeGridDay-view .fc-axis,
|
||||
.fc-timeGridWeek-view .fc-axis {
|
||||
padding-left: 0px;
|
||||
}
|
||||
.fc-dayGridYear-view {
|
||||
padding-left: 0px;
|
||||
> .fc-month-container {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
.fc-timeGridDay-view {
|
||||
.fc-day-header {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
.o_kanban_view .o_cp_pager .btn-group {
|
||||
top: -1px;
|
||||
}
|
||||
.o_kanban_renderer {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
// Normal views
|
||||
.o_content,
|
||||
.modal-content {
|
||||
max-width: 100%;
|
||||
|
||||
// Form views
|
||||
.o_form_editable {
|
||||
.o_cell .o_form_label:not(.o_status):not(.o_calendar_invitation) {
|
||||
min-height: 23px;
|
||||
@include media-breakpoint-up(md) {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.o_horizontal_separator {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
// Some UX improvements for form in edit mode
|
||||
@include media-breakpoint-down(sm) {
|
||||
&.o_form_editable .o_field_widget {
|
||||
&:not(.o_stat_info):not(.o_readonly_modifier):not(
|
||||
.oe_form_field_html
|
||||
):not(.o_field_image) {
|
||||
min-height: 35px;
|
||||
}
|
||||
|
||||
.o_x2m_control_panel {
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
|
||||
&.o_field_float_percentage,
|
||||
&.o_field_monetary,
|
||||
&.o_field_many2many_selection,
|
||||
.o_field_many2one_selection {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.o_field_many2one_selection .o_input_dropdown,
|
||||
&.o_datepicker,
|
||||
&.o_partner_autocomplete_info {
|
||||
input {
|
||||
min-height: 35px;
|
||||
}
|
||||
}
|
||||
|
||||
.o_external_button {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.o_dropdown_button,
|
||||
.o_datepicker_button {
|
||||
top: 50%;
|
||||
right: 6px;
|
||||
bottom: auto;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
min-width: auto;
|
||||
|
||||
// Avoid overflow on modals
|
||||
.o_form_sheet {
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
// Render website inputs properly in phones
|
||||
.o_group .o_field_widget.o_text_overflow {
|
||||
// Overrides another !important
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//No content message improvements on mobile
|
||||
@include media-breakpoint-down(md) {
|
||||
.o_view_nocontent {
|
||||
top: 53px;
|
||||
}
|
||||
.o_nocontent_help {
|
||||
box-shadow: none;
|
||||
}
|
||||
.o_sample_data_disabled {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o-mail-Form-chatter {
|
||||
&.o-isInFormSheetBg:not(.o-aside) {
|
||||
background-color: $white;
|
||||
|
||||
&:not(.o-aside) {
|
||||
width: auto;
|
||||
border-top: 1px solid $border-color;
|
||||
}
|
||||
}
|
||||
|
||||
&.o-aside {
|
||||
flex: 0 0 $chatter_zone_width;
|
||||
max-width: initial;
|
||||
min-width: initial;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
body:not(.o_statusbar_buttons) {
|
||||
.oe-toolbar {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.o_inner_group > .mb-sm-0 {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.o_searchview_autocomplete {
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
// Color clue to tell the difference between a note and a public message
|
||||
// HACK: has() pseudo class is broadly supported in desktop, even FF will deploy
|
||||
// full support soon (now it's available behind a config flag)
|
||||
// https://caniuse.com/css-has
|
||||
.o-mail-Chatter-top:has(.o-mail-Chatter-sendMessage.active) {
|
||||
.o-mail-Composer {
|
||||
background-color: lighten($o-brand-primary, 35%);
|
||||
padding-top: 0.25rem !important;
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(sm) {
|
||||
.o-mail-Composer {
|
||||
padding-top: 0.5rem !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(md) {
|
||||
.app_settings_block > h2,
|
||||
.app_settings_block > div > h2 {
|
||||
@include o-position-sticky(0);
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
|
||||
.o_list_table {
|
||||
.o_handle_cell,
|
||||
.o_list_record_remove {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.o_action_manager {
|
||||
.dropdown-menu {
|
||||
max-height: 70vh;
|
||||
max-height: 70dvh;
|
||||
}
|
||||
|
||||
.o_searchview_input {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.o_control_panel_main {
|
||||
.btn {
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates>
|
||||
<t
|
||||
t-name="web_responsive.CustomFavoriteItem"
|
||||
t-inherit="web.CustomFavoriteItem"
|
||||
t-inherit-mode="extension"
|
||||
>
|
||||
<xpath expr="//AccordionItem/div[1]" position="attributes">
|
||||
<attribute name="class" add="o_add_favorite_props" separator=" " />
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//AccordionItem/div[1]/input[hasclass('o_input')]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="class" add="o_add_favorite_name" separator=" " />
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
178
addons/web_responsive/static/src/legacy/xml/form_buttons.xml
Normal file
178
addons/web_responsive/static/src/legacy/xml/form_buttons.xml
Normal file
@@ -0,0 +1,178 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2017 LasLabs Inc.
|
||||
Copyright 2018 Alexandre Díaz
|
||||
Copyright 2018 Tecnativa - Jairo Llopis
|
||||
Copyright 2021 ITerra - Sergey Shebanin
|
||||
Copyright 2023 Onestein - Anjeel Haria
|
||||
Copyright 2023 Taras Shabaranskyi
|
||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
||||
-->
|
||||
<templates id="form_view">
|
||||
<!-- Template for buttons that display only the icon in xs -->
|
||||
<t t-name="web_responsive.icon_button_create">
|
||||
<i t-attf-class="fa fa-plus" title="New" />
|
||||
<span class="d-none d-sm-inline ms-1">New</span>
|
||||
</t>
|
||||
<t t-name="web_responsive.icon_button_save">
|
||||
<i t-attf-class="fa fa-check" title="Save" />
|
||||
<span class="d-none d-sm-inline ms-1">Save</span>
|
||||
</t>
|
||||
<t t-name="web_responsive.icon_button_discard">
|
||||
<i t-attf-class="fa fa-undo" title="Discard" />
|
||||
<span class="d-none d-sm-inline ms-1">Discard</span>
|
||||
</t>
|
||||
<t
|
||||
t-name="web_responsive.FormView.Buttons"
|
||||
t-inherit="web.FormView.Buttons"
|
||||
t-inherit-mode="extension"
|
||||
>
|
||||
<!-- Change "Discard" button hotkey to "D" -->
|
||||
<xpath expr="//button[hasclass('o_form_button_cancel')]" position="attributes">
|
||||
<attribute name="data-hotkey">d</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[hasclass('o_form_button_save')]" position="replace">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary o_form_button_save"
|
||||
data-hotkey="s"
|
||||
t-on-click.stop="() => this.saveButtonClicked({closable: true})"
|
||||
t-if="model.root.isInEdition"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_save" />
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//button[hasclass('o_form_button_cancel')]" position="replace">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary o_form_button_cancel"
|
||||
data-hotkey="j"
|
||||
t-on-click.stop="discard"
|
||||
t-if="model.root.isInEdition"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_discard" />
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//button[hasclass('o_form_button_create')]" position="replace">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary o_form_button_create"
|
||||
data-hotkey="c"
|
||||
t-on-click.stop="create"
|
||||
t-if="!model.root.isInEdition and canCreate"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_create" />
|
||||
</button>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
<t
|
||||
t-name="web_responsive.FormView"
|
||||
t-inherit="web.FormView"
|
||||
t-inherit-mode="extension"
|
||||
>
|
||||
<xpath
|
||||
expr="//button[hasclass('o_form_button_create')][hasclass('btn-outline-primary')]"
|
||||
position="replace"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-primary o_form_button_create"
|
||||
data-hotkey="c"
|
||||
t-on-click.stop="create"
|
||||
t-if="canCreate"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_create" />
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//button[hasclass('o_form_button_create')][hasclass('btn-outline-primary')]"
|
||||
position="replace"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary o_form_button_create"
|
||||
data-hotkey="c"
|
||||
t-on-click.stop="create"
|
||||
t-if="canCreate"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_create" />
|
||||
</button>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
<t t-name="web_responsive.FormStatusIndicator" t-inherit="web.FormStatusIndicator">
|
||||
<!-- Change "Discard" button hotkey to "D" -->
|
||||
<xpath expr="//button[hasclass('o_form_button_cancel')]" position="attributes">
|
||||
<attribute name="data-hotkey">d</attribute>
|
||||
</xpath>
|
||||
</t>
|
||||
<t
|
||||
t-name="web_responsive.KanbanView"
|
||||
t-inherit="web.KanbanView"
|
||||
t-inherit-mode="extension"
|
||||
>
|
||||
<!-- Add responsive icons to buttons -->
|
||||
<xpath expr="//button[hasclass('o-kanban-button-new')]" position="replace">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary o-kanban-button-new"
|
||||
accesskey="c"
|
||||
t-on-click="() => this.createRecord()"
|
||||
data-bounce-button=""
|
||||
t-if="canCreate and props.showButtons"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_create" />
|
||||
</button>
|
||||
</xpath>
|
||||
</t>
|
||||
<t
|
||||
t-name="web_responsive.ListView"
|
||||
t-inherit="web.ListView"
|
||||
t-inherit-mode="extension"
|
||||
>
|
||||
<!-- Add responsive icons to buttons -->
|
||||
<xpath expr="//button[hasclass('o_list_button_add')]" position="replace">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary o_list_button_add"
|
||||
data-hotkey="c"
|
||||
t-on-click="onClickCreate"
|
||||
data-bounce-button=""
|
||||
t-if="!editedRecord and activeActions.create and props.showButtons"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_create" />
|
||||
</button>
|
||||
</xpath>
|
||||
</t>
|
||||
<t
|
||||
t-name="web_responsive.ListView.Buttons"
|
||||
t-inherit="web.ListView.EditableButtons"
|
||||
t-inherit-mode="extension"
|
||||
>
|
||||
<!-- Add responsive icons to buttons -->
|
||||
<xpath expr="//button[hasclass('o_list_button_save')]" position="replace">
|
||||
<button
|
||||
t-if="editedRecord"
|
||||
type="button"
|
||||
class="btn btn-primary o_list_button_save"
|
||||
data-hotkey="s"
|
||||
t-on-click.stop="onClickSave"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_save" />
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//button[hasclass('o_list_button_discard')]" position="replace">
|
||||
<button
|
||||
t-if="editedRecord"
|
||||
type="button"
|
||||
class="btn btn-secondary o_list_button_discard"
|
||||
data-hotkey="d"
|
||||
t-on-click.stop="onClickDiscard"
|
||||
t-on-mousedown="onMouseDownDiscard"
|
||||
>
|
||||
<t t-call="web_responsive.icon_button_discard" />
|
||||
</button>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
Reference in New Issue
Block a user