1
|
// styles for custom fields
|
2
|
|
3
|
// ===================== Mixins ==============================//
|
4
|
|
5
|
@mixin composite-field-wrapper() {
|
6
|
border: valo-border($border: $v-border, $color: $v-background-color, $strength: 0.7);
|
7
|
border-radius: $v-border-radius;
|
8
|
background-color: $v-app-background-color;
|
9
|
padding: round($v-unit-size / 4);
|
10
|
}
|
11
|
|
12
|
@mixin icon-button-field-button($button-style-name, $button-count: 1, $button-alignment: 'right', $button-width: $v-unit-size, $button-index: 0){
|
13
|
|
14
|
$sibling-selector:'';
|
15
|
@if $button-index > 0 {
|
16
|
$sibling-selector:'+';
|
17
|
}
|
18
|
|
19
|
#{$sibling-selector} .#{$button-style-name} {
|
20
|
z-index: 10;
|
21
|
width: $button-width;
|
22
|
position: absolute;
|
23
|
@if $button-alignment == 'left' {
|
24
|
left: $button-width * $button-index + 1px;
|
25
|
}
|
26
|
@if $button-alignment == 'right' {
|
27
|
right: $button-width * ($button-count - 1 - $button-index) + 1px;
|
28
|
}
|
29
|
@if $button-index < $button-count - 1 {
|
30
|
$button-index: $button-index + 1;
|
31
|
@include icon-button-field-button($button-style-name, $button-count, $button-alignment, $button-width, $button-index);
|
32
|
}
|
33
|
}
|
34
|
}
|
35
|
|
36
|
|
37
|
@mixin icon-button-field($field-stylename, $button-style-name, $button-count: 1, $button-alignment: 'right', $button-width: $v-unit-size) {
|
38
|
position: relative; // needs to be a positioned element
|
39
|
height: $v-line-height * 2;
|
40
|
.v-caption {
|
41
|
display: block;
|
42
|
}
|
43
|
.#{$field-stylename} {
|
44
|
@if $button-alignment == 'left' {
|
45
|
padding-left: $button-count * $button-width;
|
46
|
}
|
47
|
@if $button-alignment == 'right' {
|
48
|
$more-padding: 0px;
|
49
|
@if $field-stylename == 'v-select' {
|
50
|
$more-padding: 8px;
|
51
|
}
|
52
|
padding-right: $button-count * $button-width + $more-padding;
|
53
|
}
|
54
|
}
|
55
|
// recursive include
|
56
|
@include icon-button-field-button($button-style-name, $button-count, $button-alignment, $button-width);
|
57
|
}
|
58
|
|
59
|
// ===================== Styles ===================== //
|
60
|
|
61
|
body .edit-valo { // increasing specifity to allow overriding the valo default field themes
|
62
|
|
63
|
.composite-field-wrapper {
|
64
|
@include composite-field-wrapper;
|
65
|
}
|
66
|
|
67
|
// ------------ TimePeriodField ------------ //
|
68
|
.v-time-period-field {
|
69
|
.margin-wrapper {
|
70
|
@include composite-field-wrapper;
|
71
|
}
|
72
|
.to-label {
|
73
|
padding: 0 round($v-unit-size / 2);
|
74
|
}
|
75
|
}
|
76
|
|
77
|
.v-textfield-helper-field {
|
78
|
@if is-dark-color($v-background-color) {
|
79
|
$helper-color: lighten($v-background-color, 20%);
|
80
|
} @else {
|
81
|
$helper-color: lighten($v-background-color, -20%);
|
82
|
}
|
83
|
color: $helper-color;
|
84
|
background-color: valo-font-color($helper-color);
|
85
|
border-radius: $v-border-radius;
|
86
|
}
|
87
|
|
88
|
// ------------ v-switchable-textfield ------------ //
|
89
|
.v-switchable-textfield {
|
90
|
@include icon-button-field('v-textfield', 'v-switch', 1, 'right');
|
91
|
.v-switch-icon{
|
92
|
height: 1.3em; // TODO fix in addon
|
93
|
font-size: $v-unit-size; // 40px
|
94
|
width: 54px;
|
95
|
top: 10px;
|
96
|
}
|
97
|
}
|
98
|
|
99
|
// ------------ v-person-field ------------ //
|
100
|
.v-person-field {
|
101
|
.v-caption {
|
102
|
display: block;
|
103
|
}
|
104
|
.cache-field, .details-fields {
|
105
|
padding-right: $v-unit-size;
|
106
|
}
|
107
|
.v-switch {
|
108
|
z-index: 10;
|
109
|
width: $v-unit-size;
|
110
|
position: absolute;
|
111
|
right: 1px;
|
112
|
bottom: 1px;
|
113
|
}
|
114
|
}
|
115
|
.v-person-field-cache-mode {
|
116
|
.cache-field {
|
117
|
display: block;
|
118
|
}
|
119
|
.details-fields {
|
120
|
display: none;
|
121
|
}
|
122
|
}
|
123
|
.v-person-field-details-mode {
|
124
|
.cache-field {
|
125
|
display: none;
|
126
|
}
|
127
|
.details-fields {
|
128
|
display: block;
|
129
|
}
|
130
|
}
|
131
|
|
132
|
// ------------ team-or-person-field ------------ //
|
133
|
.v-team-or-person-field {
|
134
|
|
135
|
.toolbar {
|
136
|
float: right;
|
137
|
height: $v-unit-size;
|
138
|
}
|
139
|
.margin-wrapper {
|
140
|
@include composite-field-wrapper;
|
141
|
|
142
|
}
|
143
|
}
|
144
|
|
145
|
// ------------ v-related-entity-list-select ------------ //
|
146
|
|
147
|
.v-related-entity-list-select {
|
148
|
@include icon-button-field('v-select', 'v-button', 2, 'right', $v-unit-size);
|
149
|
}
|
150
|
|
151
|
// ------------ v-related-entity-combobox ------------ //
|
152
|
.v-related-entity-combobox {
|
153
|
@include icon-button-field('v-filterselect', 'v-button', 2, 'right', $v-unit-size);
|
154
|
.v-filterselect-button {
|
155
|
right: $v-unit-size * 2 + 1px;
|
156
|
}
|
157
|
}
|
158
|
|
159
|
// ------------ minMaxTextField ------------ //
|
160
|
.v-min-max-text-field {
|
161
|
@include composite-field-wrapper;
|
162
|
}
|
163
|
|
164
|
// ------------ v-geolocation-field ------------- //
|
165
|
.v-geolocation-field {
|
166
|
.wrapper{
|
167
|
@include composite-field-wrapper;
|
168
|
}
|
169
|
}
|
170
|
|
171
|
}
|