-
Notifications
You must be signed in to change notification settings - Fork 23k
/
model_field_selector.less
141 lines (125 loc) · 4.67 KB
/
model_field_selector.less
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
.o_field_selector {
position: relative;
> .o_field_selector_value {
.o-flex-display();
.o-flex-flow(row, wrap);
.o-align-items(center);
height: 100%;
min-height: 20px; // needed when there is no value in it and used standalone
&:active, &:focus, &:active:focus {
outline: none;
}
> .o_field_selector_chain_part {
padding: 0px 1px;
border: 1px solid @gray-lighter-darker;
background: @gray-lighter-dark;
margin-bottom: 1px;
}
> i {
.o-align-self(center);
margin: 0 2px;
font-size: 10px;
}
}
> .o_field_selector_controls {
.o-position-absolute(0, 0, 1px);
.o-flex-display();
.o-align-items(center);
cursor: pointer;
}
&.o_edit_mode {
> .o_field_selector_controls::after {
.o-caret-down();
}
> .o_field_selector_popover {
@o-field-selector-arrow-height: 7px;
.o-position-absolute(@top: 100%, @left: 0);
z-index: 1051;
width: 265px;
margin-top: @o-field-selector-arrow-height;
background: white;
box-shadow: 0 3px 10px rgba(0,0,0,.4);
&:focus {
outline: none;
}
.o_field_selector_popover_header {
color: white;
background: @brand-primary;
font-weight: bold;
padding: 5px 0 5px 0.4em;
.o_field_selector_title {
width: 100%;
.o-text-overflow();
padding: 0px 35px;
text-align: center;
}
.o_field_selector_popover_option {
.o-position-absolute(@top: 0);
padding: 7px 8px 8px 6px;
&.o_prev_page {
left: 0;
border-right: 1px solid darken(@brand-primary, 10%);
}
&.o_field_selector_close {
right: 0;
border-left: 1px solid darken(@brand-primary, 10%);
}
&:hover {
background: darken(@brand-primary, 10%);
}
}
&:before {
.o-position-absolute(@top: -@o-field-selector-arrow-height, @left: @o-field-selector-arrow-height);
content: "";
border-left: @o-field-selector-arrow-height solid rgba(0, 0, 0, 0);
border-right: @o-field-selector-arrow-height solid rgba(0, 0, 0, 0);
border-bottom: @o-field-selector-arrow-height solid @brand-primary;
}
}
.o_field_selector_popover_body {
.o_field_selector_page {
position: relative;
max-height: 320px;
overflow: auto;
margin: 0;
padding: 0;
> .o_field_selector_item {
@mfs-next-page-padding: 15px;
list-style: none;
position: relative;
padding: 5px 0 5px 0.4em;
cursor: pointer;
border-bottom: 1px solid @gray-lighter-dark;
&.o_has_relation {
padding-right: @mfs-next-page-padding * 3;
}
&.active {
background: @gray-lighter-darker;
}
> .o_field_selector_item_title {
font-size: 0.85em;
}
> .o_field_selector_next_page {
.o-position-absolute(@top: 0, @right: 0, @bottom: 0);
.o-flex-display();
.o-align-items(center);
border-left: 1px solid @gray-lighter-darker;
padding: 0 @mfs-next-page-padding;
background: white;
&:hover {
background: darken(@gray-lighter-darker, 10%);
}
}
}
}
}
.o_field_selector_popover_footer {
background: @brand-primary;
padding: 5px 0.4em;
> input {
width: 100%;
}
}
}
}
}