summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/search_panel.scss
blob: 0a25d53a81d7a2da333f0360d70084974002ee49 (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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// ------- View with SearchPanel -------
$o-searchpanel-active-bg: rgba(108, 193, 237, 0.3);
$o-searchpanel-p: $o-horizontal-padding;
$o-searchpanel-p-small: $o-horizontal-padding*0.5;
$o-searchpanel-p-tiny: $o-searchpanel-p-small*0.5;

$o-searchpanel-category-default-color: $o-brand-primary;
$o-searchpanel-filter-default-color: #D59244;

.o_controller_with_searchpanel {
    display: flex;
    align-items: flex-start;

    .o_renderer_with_searchpanel {
        flex: 1 1 100%;
        overflow: auto; // make the renderer and search panel scroll individually
        max-height: 100%;
        position: relative;
    }
}

.o_search_panel {
    flex: 0 0 220px;
    overflow: auto;
    height: 100%;
    padding: $o-searchpanel-p-small $o-searchpanel-p-small $o-searchpanel-p*2 $o-searchpanel-p;
    border-right: 1px solid $gray-300;
    background-color: white;

    .o_search_panel_category .o_search_panel_section_icon {
        color: $o-brand-odoo;
    }

    .o_search_panel_filter .o_search_panel_section_icon {
        color: $o-searchpanel-filter-default-color;
    }

    .o_toggle_fold {
        text-align: center;
        width: 1.5rem;
    }

    .o_search_panel_label {
        align-items: center;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        user-select: none;
        width: 100%;
    }

    .o_search_panel_section_header {
        cursor: default;
        padding: $o-searchpanel-p-small 0;
    }

    .list-group {
        padding-bottom: $o-searchpanel-p-tiny;
    }

    .list-group-item {
        padding: 0;

        .list-group-item {
            padding: 0 0 0 $custom-control-gutter;
            margin-bottom: $o-searchpanel-p-tiny*0.5;
        }

        .o_search_panel_label_title {
            color: $headings-color;
            width: 100%;
            @include o-text-overflow;
        }

        header.active {
            background-color: $o-searchpanel-active-bg;
        }
    }

    .o_search_panel_category_value {
        cursor: pointer;

        header {
            align-items: center;
            display: flex;
            justify-content: space-between;
            padding: 4px 6px 4px 0px;
        }

        .o_search_panel_label.o_with_counters {
            overflow: hidden;
        }

        .o_search_panel_category_value {
            margin-bottom: 0;
            padding-left: $o-searchpanel-p;
            position: relative;

            &:before,
            &:after {
                content: '';
                background: $gray-500;
                margin-left: 4px;
                @include o-position-absolute(0, $left: $o-searchpanel-p-tiny);
                @include size(1px, 100%);
            }

            &:after {
                top: 12px;
                @include size(8px, 1px);
            }

            &:last-child:before {
                height: 12px;
            }
        }
    }

    .o_search_panel_group_header .custom-control {
        width: 100%;
    }

    .o_search_panel_filter_value,
    .o_search_panel_filter_group {
        cursor: pointer;
        padding-bottom: $o-searchpanel-p-small;

        .o_search_panel_label,
        .o_search_panel_label_title {
            padding-right: 6px;
        }
    }

    .o_search_panel_filter_group {

        header {
            display: flex;
        }

        .o_search_panel_label.o_with_counters {
            justify-content: flex-start;
        }
    }
}