summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/form_view_extra.scss
blob: f6b8b2fa09521e73cd32f75cefec07db65104baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.o_form_view {
    $sheet-min-width: 650px;
    $sheet-padding: 16px;

    &.o_form_nosheet.oe_form_nomargin {
        margin: 0;
    }
    .o_form_sheet_bg {
        border-bottom: 1px solid #ddd;
        background: url(/web/static/src/img/form_sheetbg.png);

        > .o_form_sheet {
            min-width: $sheet-min-width;
            max-width: $o-form-view-sheet-max-width;
            min-height: 330px;
            border: 1px solid #c8c8d3;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            background: white;

            margin: $o-sheet-vpadding*0.2 auto;
            @include media-breakpoint-up(md) {
                margin: $o-sheet-vpadding*0.5 auto;
            }
            padding: $o-sheet-vpadding;
            @include o-form-sheet-inner-right-padding;
            @include o-form-sheet-inner-left-padding;

            .ui-tabs {
                margin: 0 -16px;
            }
            .oe_notebook_page {
                padding: 0 16px;
            }
        }
    }

    // Button box
    .oe_button_box {
        &, & + .oe_avatar {
            + .oe_title {
                width: 400px;
            }
        }

        // TODO remove me in master (this rule is a copy of the one in the
        // bootstrap_review.scss file)
        + .alert {
            clear: both;
        }

        .oe_stat_button {
            &:hover {
                background-color: #e6e6e6;
            }
            .o_button_icon {
                color: #7C7BAD;
            }
        }
    }

    // Groups
    .o_group {
        .o_td_label {
            border-right: 1px solid #ddd;
        }
        .o_td_label + td {
            padding: 0px 36px 0px 8px;
        }
        .o_field_widget.o_text_overflow {
            width: 1px!important; // hack to make the table layout believe it is a small element (so that the table does not grow too much) ...
            min-width: 100%;      // ... but in fact it takes the whole table space
        }
    }

    // Separators
    .o_horizontal_separator {
        color: $o-brand-primary;
        font-weight: bold;
    }

    // Specific style classes
    .o_group.o_inner_group.oe_subtotal_footer {
        .oe_subtotal_footer_separator {
            border-top: 1px solid #cacaca;
        }
        .o_td_label {
            border-right: none;
        }
    }
}

// Overridden style when form view in modal
.modal .modal-dialog {
    .o_form_view {
        .o_form_sheet_bg, .o_form_sheet {
            border: none;
        }
        .o_form_sheet_bg > .o_form_sheet {
            min-height: 0;
        }
    }
}

// XXS form view specific rules
.o_form_view.o_xxs_form_view {
    .o_group .o_td_label {
        border: none;
    }
}