|
1 | | -.event-rule-detail { |
2 | | - .empty-state-bar { |
3 | | - margin-bottom: 1em; |
| 1 | +.event-rule-config { |
| 2 | + @connectorHeight: .5em; |
| 3 | + @connectorColor: @gray-lighter; |
| 4 | + |
| 5 | + // Style |
| 6 | + |
| 7 | + .connector-line { |
| 8 | + background-color: @connectorColor; |
4 | 9 | } |
5 | | -} |
6 | 10 |
|
7 | | -.new-event-rule { |
8 | | - margin-bottom: 1em; |
9 | | -} |
| 11 | + .filter-controls, |
| 12 | + .dynamic-list:not(.empty, .escalations) { |
| 13 | + padding: .5em; |
| 14 | + border: 1px solid @connectorColor; |
| 15 | + .rounded-corners(); |
| 16 | + } |
| 17 | + |
| 18 | + .add-button, |
| 19 | + .remove-button { |
| 20 | + .event-rule-button(); |
| 21 | + |
| 22 | + &.animated.active { |
| 23 | + .fa::before { |
| 24 | + .animate(spin 2s infinite linear); |
| 25 | + |
| 26 | + // fa spinner |
| 27 | + content: '\f110'; |
| 28 | + } |
| 29 | + } |
| 30 | + } |
| 31 | + |
| 32 | + .remove-button-disabled { |
| 33 | + .event-rule-button(true); |
| 34 | + } |
| 35 | + |
| 36 | + .escalation-condition, |
| 37 | + .escalation-recipient { |
| 38 | + > :first-child, |
| 39 | + > :first-child[type="hidden"] + * { |
| 40 | + .rounded-corners(.25em); |
| 41 | + border-top-right-radius: 0; |
| 42 | + border-bottom-right-radius: 0; |
| 43 | + } |
| 44 | + |
| 45 | + > :last-child { |
| 46 | + .rounded-corners(.25em); |
| 47 | + border-top-left-radius: 0; |
| 48 | + border-bottom-left-radius: 0; |
| 49 | + } |
| 50 | + |
| 51 | + > :not(:first-child, :first-child[type="hidden"] + *, :last-child) { |
| 52 | + .rounded-corners(0); |
| 53 | + |
| 54 | + * { |
| 55 | + // nested inputs as well |
| 56 | + .rounded-corners(0); |
| 57 | + } |
| 58 | + } |
| 59 | + } |
| 60 | + |
| 61 | + // Layout |
| 62 | + |
| 63 | + display: flex; |
| 64 | + |
| 65 | + .connector-line { |
| 66 | + height: @connectorHeight; |
| 67 | + margin-top: 2.75em; |
| 68 | + } |
| 69 | + |
| 70 | + > .connector-line { |
| 71 | + flex: 1 1 auto; |
| 72 | + min-width: 1em; |
| 73 | + } |
| 74 | + |
| 75 | + #object-filter-controls { |
| 76 | + width: 20em; |
| 77 | + height: fit-content; |
| 78 | + |
| 79 | + .filter-controls { |
| 80 | + margin-top: 1.25em; |
| 81 | + display: flex; |
| 82 | + gap: .5em; |
| 83 | + |
| 84 | + input[type="text"] { |
| 85 | + flex: 1 1 auto; |
| 86 | + width: 0; |
| 87 | + } |
| 88 | + } |
| 89 | + } |
| 90 | + |
| 91 | + .dynamic-list.empty .add-button, |
| 92 | + > #object-filter-controls > .add-button-wrapper .add-button { |
| 93 | + align-self: flex-start; |
| 94 | + padding: 1.25em 2em; |
| 95 | + margin-top: 1.25em; |
| 96 | + } |
| 97 | + |
| 98 | + .dynamic-list.empty > .add-button-wrapper, |
| 99 | + > #object-filter-controls > .add-button-wrapper { |
| 100 | + display: flex; |
| 101 | + |
| 102 | + &::before, |
| 103 | + &::after { |
| 104 | + content: ""; |
| 105 | + flex: 1 1 auto; |
| 106 | + height: @connectorHeight; |
| 107 | + margin-top: 2.75em; |
| 108 | + background-color: @connectorColor; |
| 109 | + } |
| 110 | + |
| 111 | + .add-button { |
| 112 | + flex: 0; |
| 113 | + } |
| 114 | + } |
10 | 115 |
|
11 | | -.event-rule-form { |
12 | | - display: inline-flex; |
13 | | - width: fit-content; |
14 | | - max-width: unset; |
15 | | - align-items: flex-start; |
| 116 | + > #object-filter-controls > .add-button-wrapper { |
| 117 | + min-width: 12em; |
| 118 | + } |
16 | 119 |
|
17 | | - > h2 { |
18 | | - margin: 0 0 0.5em 0; |
| 120 | + > .escalations { |
| 121 | + flex: 15 1 auto; |
19 | 122 | } |
20 | 123 |
|
21 | | - .control-group { |
22 | | - display: inline-flex; |
23 | | - margin-right: 2em; |
| 124 | + .escalations { |
| 125 | + display: grid; |
| 126 | + grid-template-columns: min-content minmax(1em, 4em) 1fr minmax(1em, 4em) 1fr; |
| 127 | + |
| 128 | + .escalation { |
| 129 | + display: contents; |
| 130 | + } |
| 131 | + |
| 132 | + .escalation > div:first-child { |
| 133 | + .vertical-line(); |
| 134 | + |
| 135 | + .remove-button { |
| 136 | + margin-top: 2em; |
| 137 | + } |
| 138 | + } |
| 139 | + |
| 140 | + // The first escalation isn't connected to anything on top of it |
| 141 | + .escalation:first-child > div:first-child::before { |
| 142 | + top: 2.75em; |
| 143 | + } |
| 144 | + |
| 145 | + > .add-button-wrapper { |
| 146 | + .vertical-line(); |
| 147 | + |
| 148 | + .add-button { |
| 149 | + margin-top: 2em; |
| 150 | + } |
| 151 | + } |
| 152 | + |
| 153 | + .escalation .dynamic-list { |
| 154 | + position: relative; |
| 155 | + margin-bottom: 1em; |
| 156 | + |
| 157 | + .dynamic-item { |
| 158 | + display: grid; |
| 159 | + align-items: baseline; |
| 160 | + margin-bottom: .5em; |
| 161 | + gap: 1px; |
| 162 | + |
| 163 | + &.escalation-condition { |
| 164 | + grid-template-columns: minmax(8em, 1fr) 0fr 4em minmax(8em, 1fr) min-content; |
| 165 | + |
| 166 | + .age-inputs { |
| 167 | + display: flex; |
| 168 | + gap: 1px; |
| 169 | + |
| 170 | + > * { |
| 171 | + flex: 1 1 auto; |
| 172 | + width: 0; |
| 173 | + } |
| 174 | + } |
| 175 | + } |
| 176 | + |
| 177 | + &.escalation-recipient { |
| 178 | + grid-template-columns: minmax(8em, 1fr) minmax(8em, 1fr) min-content; |
| 179 | + } |
| 180 | + |
| 181 | + input[type="text"], |
| 182 | + .remove-button, |
| 183 | + .remove-button-disabled { |
| 184 | + height: 100%; |
| 185 | + } |
| 186 | + } |
24 | 187 |
|
25 | | - .control-label-group { |
26 | | - width: auto; |
| 188 | + .add-button { |
| 189 | + width: 100%; |
| 190 | + |
| 191 | + > .icon { |
| 192 | + margin: 0 auto; |
| 193 | + } |
| 194 | + } |
27 | 195 | } |
| 196 | + } |
| 197 | + |
| 198 | + select:not([multiple]) + .spinner::before { |
| 199 | + // ipl-web's Icon applies a min-width by default. Since the spinner element is part of a flex container, |
| 200 | + // it will be larger than necessary, covering the select's dropdown arrow. This ensures it doesn't. |
| 201 | + width: 1em; |
| 202 | + } |
| 203 | + |
| 204 | + .vertical-line() { |
| 205 | + position: relative; |
28 | 206 |
|
29 | | - input[type='text'] { |
30 | | - max-width: unset; |
31 | | - width: 25em; |
| 207 | + &::before { |
| 208 | + position: absolute; |
| 209 | + z-index: -1; |
| 210 | + @halfedConnectorHeight: @connectorHeight / 2; |
| 211 | + inset: 0 ~"calc(50% - @{halfedConnectorHeight})" 0 ~"calc(50% - @{halfedConnectorHeight})"; |
| 212 | + |
| 213 | + content: ""; |
| 214 | + width: @connectorHeight; |
| 215 | + |
| 216 | + background-color: @connectorColor; |
32 | 217 | } |
33 | 218 | } |
34 | 219 | } |
35 | 220 |
|
36 | | -.save-config { |
37 | | - display: inline-flex; |
38 | | - float: right; |
39 | | - width: fit-content; |
40 | | - flex-direction: row-reverse; |
| 221 | +#layout.twocols:not(.wide-layout) { |
| 222 | + .event-rule-config { |
| 223 | + #object-filter-controls { |
| 224 | + width: fit-content; |
41 | 225 |
|
42 | | - button[type="submit"] { |
43 | | - margin-right: 1em; |
| 226 | + input[type="text"] { |
| 227 | + display: none; |
| 228 | + } |
| 229 | + } |
44 | 230 |
|
45 | | - &.btn-remove:not([disabled]) { |
46 | | - .button(@body-bg-color, @color-critical, @color-critical-accentuated); |
47 | | - border: none; |
| 231 | + .dynamic-list.empty .add-button, |
| 232 | + > #object-filter-controls > .add-button-wrapper .add-button { |
| 233 | + padding: .5em 1em; |
| 234 | + margin-top: 2em; |
48 | 235 | } |
49 | 236 |
|
50 | | - &.btn-discard-changes { |
51 | | - .event-rule-button(); |
| 237 | + > #object-filter-controls > .add-button-wrapper { |
| 238 | + min-width: fit-content; |
52 | 239 | } |
| 240 | + } |
| 241 | +} |
| 242 | + |
| 243 | +// Other stuff |
| 244 | + |
| 245 | +.event-rule-and-save-forms { |
| 246 | + display: flex; |
| 247 | + justify-content: space-between; |
| 248 | + align-items: baseline; |
| 249 | + margin-bottom: .5em; |
53 | 250 |
|
54 | | - &:disabled { |
55 | | - background: @gray-light; |
56 | | - color: @disabled-gray; |
57 | | - cursor: not-allowed; |
58 | | - border: transparent; |
| 251 | + .event-rule-form { |
| 252 | + display: flex; |
| 253 | + gap: .5em; |
| 254 | + |
| 255 | + h2 { |
| 256 | + margin: 0; |
| 257 | + } |
| 258 | + } |
| 259 | + |
| 260 | + #save-config { |
| 261 | + display: flex; |
| 262 | + gap: .5em; |
| 263 | + max-height: 2em; |
| 264 | + |
| 265 | + .btn-remove { |
| 266 | + .button(@body-bg-color, @color-critical, @color-critical-accentuated); |
59 | 267 | } |
60 | 268 | } |
61 | 269 | } |
0 commit comments