tranzito_utils 1.1.11 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/builds/tranzito_utils-compiled.css +921 -0
- data/app/assets/images/dropdown.svg +3 -0
- data/app/assets/stylesheets/tranzito_utils/_period_selection.scss +21 -0
- data/app/assets/stylesheets/tranzito_utils.scss +1 -0
- data/app/views/tranzito_utils/_pagination.html.haml +1 -1
- data/app/views/tranzito_utils/_period_select.html.haml +5 -41
- data/app/views/tranzito_utils/_period_select_dropdown.html.haml +26 -0
- data/app/views/tranzito_utils/_period_select_list.html.haml +41 -0
- data/lib/tranzito_utils/helpers/helpers.rb +15 -0
- data/lib/tranzito_utils/version.rb +1 -1
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 122dd1fc8e93ac70a1f33f4c284b60e6c04d5e33571563a231481175d0ab9d72
|
4
|
+
data.tar.gz: 00c6cb246bbad57d5ebb155fe2cf0786fe77d59327716b5982cdec20aa6a2e1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98ddbdd2ee84b5f685d1a6caa43139140b04086639b12dc4c9044bde561a935133ca87d14dfba61083c3d62e8a8ebba61e021cc4081601aea9ad8737d1916939
|
7
|
+
data.tar.gz: ef1ae50d044e96a2cc8734f1155b0086a6043169518b454b9ed5ae8edbce17b88b3fb635d0d5a7d99df3a79ecadbf2dff858cdd717a48309e6b93e3edb53ed01
|
@@ -1,3 +1,909 @@
|
|
1
|
+
.flatpickr-calendar {
|
2
|
+
background: transparent;
|
3
|
+
opacity: 0;
|
4
|
+
display: none;
|
5
|
+
text-align: center;
|
6
|
+
visibility: hidden;
|
7
|
+
padding: 0;
|
8
|
+
-webkit-animation: none;
|
9
|
+
animation: none;
|
10
|
+
direction: ltr;
|
11
|
+
border: 0;
|
12
|
+
font-size: 14px;
|
13
|
+
line-height: 24px;
|
14
|
+
border-radius: 5px;
|
15
|
+
position: absolute;
|
16
|
+
width: 307.875px;
|
17
|
+
-webkit-box-sizing: border-box;
|
18
|
+
box-sizing: border-box;
|
19
|
+
-ms-touch-action: manipulation;
|
20
|
+
touch-action: manipulation;
|
21
|
+
background: #fff;
|
22
|
+
-webkit-box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);
|
23
|
+
box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);
|
24
|
+
}
|
25
|
+
|
26
|
+
.flatpickr-calendar.open,
|
27
|
+
.flatpickr-calendar.inline {
|
28
|
+
opacity: 1;
|
29
|
+
max-height: 640px;
|
30
|
+
visibility: visible;
|
31
|
+
}
|
32
|
+
|
33
|
+
.flatpickr-calendar.open {
|
34
|
+
display: inline-block;
|
35
|
+
z-index: 99999;
|
36
|
+
}
|
37
|
+
|
38
|
+
.flatpickr-calendar.animate.open {
|
39
|
+
-webkit-animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
40
|
+
animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
|
41
|
+
}
|
42
|
+
|
43
|
+
.flatpickr-calendar.inline {
|
44
|
+
display: block;
|
45
|
+
position: relative;
|
46
|
+
top: 2px;
|
47
|
+
}
|
48
|
+
|
49
|
+
.flatpickr-calendar.static {
|
50
|
+
position: absolute;
|
51
|
+
top: calc(100% + 2px);
|
52
|
+
}
|
53
|
+
|
54
|
+
.flatpickr-calendar.static.open {
|
55
|
+
z-index: 999;
|
56
|
+
display: block;
|
57
|
+
}
|
58
|
+
|
59
|
+
.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7) {
|
60
|
+
-webkit-box-shadow: none !important;
|
61
|
+
box-shadow: none !important;
|
62
|
+
}
|
63
|
+
|
64
|
+
.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) {
|
65
|
+
-webkit-box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
66
|
+
box-shadow: -2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
67
|
+
}
|
68
|
+
|
69
|
+
.flatpickr-calendar .hasWeeks .dayContainer,
|
70
|
+
.flatpickr-calendar .hasTime .dayContainer {
|
71
|
+
border-bottom: 0;
|
72
|
+
border-bottom-right-radius: 0;
|
73
|
+
border-bottom-left-radius: 0;
|
74
|
+
}
|
75
|
+
|
76
|
+
.flatpickr-calendar .hasWeeks .dayContainer {
|
77
|
+
border-left: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
.flatpickr-calendar.hasTime .flatpickr-time {
|
81
|
+
height: 40px;
|
82
|
+
border-top: 1px solid #e6e6e6;
|
83
|
+
}
|
84
|
+
|
85
|
+
.flatpickr-calendar.noCalendar.hasTime .flatpickr-time {
|
86
|
+
height: auto;
|
87
|
+
}
|
88
|
+
|
89
|
+
.flatpickr-calendar:before,
|
90
|
+
.flatpickr-calendar:after {
|
91
|
+
position: absolute;
|
92
|
+
display: block;
|
93
|
+
pointer-events: none;
|
94
|
+
border: solid transparent;
|
95
|
+
content: "";
|
96
|
+
height: 0;
|
97
|
+
width: 0;
|
98
|
+
left: 22px;
|
99
|
+
}
|
100
|
+
|
101
|
+
.flatpickr-calendar.rightMost:before,
|
102
|
+
.flatpickr-calendar.arrowRight:before,
|
103
|
+
.flatpickr-calendar.rightMost:after,
|
104
|
+
.flatpickr-calendar.arrowRight:after {
|
105
|
+
left: auto;
|
106
|
+
right: 22px;
|
107
|
+
}
|
108
|
+
|
109
|
+
.flatpickr-calendar.arrowCenter:before,
|
110
|
+
.flatpickr-calendar.arrowCenter:after {
|
111
|
+
left: 50%;
|
112
|
+
right: 50%;
|
113
|
+
}
|
114
|
+
|
115
|
+
.flatpickr-calendar:before {
|
116
|
+
border-width: 5px;
|
117
|
+
margin: 0 -5px;
|
118
|
+
}
|
119
|
+
|
120
|
+
.flatpickr-calendar:after {
|
121
|
+
border-width: 4px;
|
122
|
+
margin: 0 -4px;
|
123
|
+
}
|
124
|
+
|
125
|
+
.flatpickr-calendar.arrowTop:before,
|
126
|
+
.flatpickr-calendar.arrowTop:after {
|
127
|
+
bottom: 100%;
|
128
|
+
}
|
129
|
+
|
130
|
+
.flatpickr-calendar.arrowTop:before {
|
131
|
+
border-bottom-color: #e6e6e6;
|
132
|
+
}
|
133
|
+
|
134
|
+
.flatpickr-calendar.arrowTop:after {
|
135
|
+
border-bottom-color: #fff;
|
136
|
+
}
|
137
|
+
|
138
|
+
.flatpickr-calendar.arrowBottom:before,
|
139
|
+
.flatpickr-calendar.arrowBottom:after {
|
140
|
+
top: 100%;
|
141
|
+
}
|
142
|
+
|
143
|
+
.flatpickr-calendar.arrowBottom:before {
|
144
|
+
border-top-color: #e6e6e6;
|
145
|
+
}
|
146
|
+
|
147
|
+
.flatpickr-calendar.arrowBottom:after {
|
148
|
+
border-top-color: #fff;
|
149
|
+
}
|
150
|
+
|
151
|
+
.flatpickr-calendar:focus {
|
152
|
+
outline: 0;
|
153
|
+
}
|
154
|
+
|
155
|
+
.flatpickr-wrapper {
|
156
|
+
position: relative;
|
157
|
+
display: inline-block;
|
158
|
+
}
|
159
|
+
|
160
|
+
.flatpickr-months {
|
161
|
+
display: -webkit-box;
|
162
|
+
display: -webkit-flex;
|
163
|
+
display: -ms-flexbox;
|
164
|
+
display: flex;
|
165
|
+
}
|
166
|
+
|
167
|
+
.flatpickr-months .flatpickr-month {
|
168
|
+
background: transparent;
|
169
|
+
color: rgba(0, 0, 0, 0.9);
|
170
|
+
fill: rgba(0, 0, 0, 0.9);
|
171
|
+
height: 34px;
|
172
|
+
line-height: 1;
|
173
|
+
text-align: center;
|
174
|
+
position: relative;
|
175
|
+
-webkit-user-select: none;
|
176
|
+
-moz-user-select: none;
|
177
|
+
-ms-user-select: none;
|
178
|
+
user-select: none;
|
179
|
+
overflow: hidden;
|
180
|
+
-webkit-box-flex: 1;
|
181
|
+
-webkit-flex: 1;
|
182
|
+
-ms-flex: 1;
|
183
|
+
flex: 1;
|
184
|
+
}
|
185
|
+
|
186
|
+
.flatpickr-months .flatpickr-prev-month,
|
187
|
+
.flatpickr-months .flatpickr-next-month {
|
188
|
+
-webkit-user-select: none;
|
189
|
+
-moz-user-select: none;
|
190
|
+
-ms-user-select: none;
|
191
|
+
user-select: none;
|
192
|
+
text-decoration: none;
|
193
|
+
cursor: pointer;
|
194
|
+
position: absolute;
|
195
|
+
top: 0;
|
196
|
+
height: 34px;
|
197
|
+
padding: 10px;
|
198
|
+
z-index: 3;
|
199
|
+
color: rgba(0, 0, 0, 0.9);
|
200
|
+
fill: rgba(0, 0, 0, 0.9);
|
201
|
+
}
|
202
|
+
|
203
|
+
.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
|
204
|
+
.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
|
205
|
+
display: none;
|
206
|
+
}
|
207
|
+
|
208
|
+
.flatpickr-months .flatpickr-prev-month i,
|
209
|
+
.flatpickr-months .flatpickr-next-month i {
|
210
|
+
position: relative;
|
211
|
+
}
|
212
|
+
|
213
|
+
.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,
|
214
|
+
.flatpickr-months .flatpickr-next-month.flatpickr-prev-month {
|
215
|
+
/*
|
216
|
+
/*rtl:begin:ignore*/
|
217
|
+
/*
|
218
|
+
*/
|
219
|
+
left: 0;
|
220
|
+
/*
|
221
|
+
/*rtl:end:ignore*/
|
222
|
+
/*
|
223
|
+
*/
|
224
|
+
}
|
225
|
+
|
226
|
+
/*
|
227
|
+
/*rtl:begin:ignore*/
|
228
|
+
/*
|
229
|
+
/*rtl:end:ignore*/
|
230
|
+
.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,
|
231
|
+
.flatpickr-months .flatpickr-next-month.flatpickr-next-month {
|
232
|
+
/*
|
233
|
+
/*rtl:begin:ignore*/
|
234
|
+
/*
|
235
|
+
*/
|
236
|
+
right: 0;
|
237
|
+
/*
|
238
|
+
/*rtl:end:ignore*/
|
239
|
+
/*
|
240
|
+
*/
|
241
|
+
}
|
242
|
+
|
243
|
+
/*
|
244
|
+
/*rtl:begin:ignore*/
|
245
|
+
/*
|
246
|
+
/*rtl:end:ignore*/
|
247
|
+
.flatpickr-months .flatpickr-prev-month:hover,
|
248
|
+
.flatpickr-months .flatpickr-next-month:hover {
|
249
|
+
color: #959ea9;
|
250
|
+
}
|
251
|
+
|
252
|
+
.flatpickr-months .flatpickr-prev-month:hover svg,
|
253
|
+
.flatpickr-months .flatpickr-next-month:hover svg {
|
254
|
+
fill: #f64747;
|
255
|
+
}
|
256
|
+
|
257
|
+
.flatpickr-months .flatpickr-prev-month svg,
|
258
|
+
.flatpickr-months .flatpickr-next-month svg {
|
259
|
+
width: 14px;
|
260
|
+
height: 14px;
|
261
|
+
}
|
262
|
+
|
263
|
+
.flatpickr-months .flatpickr-prev-month svg path,
|
264
|
+
.flatpickr-months .flatpickr-next-month svg path {
|
265
|
+
-webkit-transition: fill 0.1s;
|
266
|
+
transition: fill 0.1s;
|
267
|
+
fill: inherit;
|
268
|
+
}
|
269
|
+
|
270
|
+
.numInputWrapper {
|
271
|
+
position: relative;
|
272
|
+
height: auto;
|
273
|
+
}
|
274
|
+
|
275
|
+
.numInputWrapper input,
|
276
|
+
.numInputWrapper span {
|
277
|
+
display: inline-block;
|
278
|
+
}
|
279
|
+
|
280
|
+
.numInputWrapper input {
|
281
|
+
width: 100%;
|
282
|
+
}
|
283
|
+
|
284
|
+
.numInputWrapper input::-ms-clear {
|
285
|
+
display: none;
|
286
|
+
}
|
287
|
+
|
288
|
+
.numInputWrapper input::-webkit-outer-spin-button,
|
289
|
+
.numInputWrapper input::-webkit-inner-spin-button {
|
290
|
+
margin: 0;
|
291
|
+
-webkit-appearance: none;
|
292
|
+
}
|
293
|
+
|
294
|
+
.numInputWrapper span {
|
295
|
+
position: absolute;
|
296
|
+
right: 0;
|
297
|
+
width: 14px;
|
298
|
+
padding: 0 4px 0 2px;
|
299
|
+
height: 50%;
|
300
|
+
line-height: 50%;
|
301
|
+
opacity: 0;
|
302
|
+
cursor: pointer;
|
303
|
+
border: 1px solid rgba(57, 57, 57, 0.15);
|
304
|
+
-webkit-box-sizing: border-box;
|
305
|
+
box-sizing: border-box;
|
306
|
+
}
|
307
|
+
|
308
|
+
.numInputWrapper span:hover {
|
309
|
+
background: rgba(0, 0, 0, 0.1);
|
310
|
+
}
|
311
|
+
|
312
|
+
.numInputWrapper span:active {
|
313
|
+
background: rgba(0, 0, 0, 0.2);
|
314
|
+
}
|
315
|
+
|
316
|
+
.numInputWrapper span:after {
|
317
|
+
display: block;
|
318
|
+
content: "";
|
319
|
+
position: absolute;
|
320
|
+
}
|
321
|
+
|
322
|
+
.numInputWrapper span.arrowUp {
|
323
|
+
top: 0;
|
324
|
+
border-bottom: 0;
|
325
|
+
}
|
326
|
+
|
327
|
+
.numInputWrapper span.arrowUp:after {
|
328
|
+
border-left: 4px solid transparent;
|
329
|
+
border-right: 4px solid transparent;
|
330
|
+
border-bottom: 4px solid rgba(57, 57, 57, 0.6);
|
331
|
+
top: 26%;
|
332
|
+
}
|
333
|
+
|
334
|
+
.numInputWrapper span.arrowDown {
|
335
|
+
top: 50%;
|
336
|
+
}
|
337
|
+
|
338
|
+
.numInputWrapper span.arrowDown:after {
|
339
|
+
border-left: 4px solid transparent;
|
340
|
+
border-right: 4px solid transparent;
|
341
|
+
border-top: 4px solid rgba(57, 57, 57, 0.6);
|
342
|
+
top: 40%;
|
343
|
+
}
|
344
|
+
|
345
|
+
.numInputWrapper span svg {
|
346
|
+
width: inherit;
|
347
|
+
height: auto;
|
348
|
+
}
|
349
|
+
|
350
|
+
.numInputWrapper span svg path {
|
351
|
+
fill: rgba(0, 0, 0, 0.5);
|
352
|
+
}
|
353
|
+
|
354
|
+
.numInputWrapper:hover {
|
355
|
+
background: rgba(0, 0, 0, 0.05);
|
356
|
+
}
|
357
|
+
|
358
|
+
.numInputWrapper:hover span {
|
359
|
+
opacity: 1;
|
360
|
+
}
|
361
|
+
|
362
|
+
.flatpickr-current-month {
|
363
|
+
font-size: 135%;
|
364
|
+
line-height: inherit;
|
365
|
+
font-weight: 300;
|
366
|
+
color: inherit;
|
367
|
+
position: absolute;
|
368
|
+
width: 75%;
|
369
|
+
left: 12.5%;
|
370
|
+
padding: 7.48px 0 0 0;
|
371
|
+
line-height: 1;
|
372
|
+
height: 34px;
|
373
|
+
display: inline-block;
|
374
|
+
text-align: center;
|
375
|
+
-webkit-transform: translate3d(0px, 0px, 0px);
|
376
|
+
transform: translate3d(0px, 0px, 0px);
|
377
|
+
}
|
378
|
+
|
379
|
+
.flatpickr-current-month span.cur-month {
|
380
|
+
font-family: inherit;
|
381
|
+
font-weight: 700;
|
382
|
+
color: inherit;
|
383
|
+
display: inline-block;
|
384
|
+
margin-left: 0.5ch;
|
385
|
+
padding: 0;
|
386
|
+
}
|
387
|
+
|
388
|
+
.flatpickr-current-month span.cur-month:hover {
|
389
|
+
background: rgba(0, 0, 0, 0.05);
|
390
|
+
}
|
391
|
+
|
392
|
+
.flatpickr-current-month .numInputWrapper {
|
393
|
+
width: 6ch;
|
394
|
+
width: 7ch\0 ;
|
395
|
+
display: inline-block;
|
396
|
+
}
|
397
|
+
|
398
|
+
.flatpickr-current-month .numInputWrapper span.arrowUp:after {
|
399
|
+
border-bottom-color: rgba(0, 0, 0, 0.9);
|
400
|
+
}
|
401
|
+
|
402
|
+
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
|
403
|
+
border-top-color: rgba(0, 0, 0, 0.9);
|
404
|
+
}
|
405
|
+
|
406
|
+
.flatpickr-current-month input.cur-year {
|
407
|
+
background: transparent;
|
408
|
+
-webkit-box-sizing: border-box;
|
409
|
+
box-sizing: border-box;
|
410
|
+
color: inherit;
|
411
|
+
cursor: text;
|
412
|
+
padding: 0 0 0 0.5ch;
|
413
|
+
margin: 0;
|
414
|
+
display: inline-block;
|
415
|
+
font-size: inherit;
|
416
|
+
font-family: inherit;
|
417
|
+
font-weight: 300;
|
418
|
+
line-height: inherit;
|
419
|
+
height: auto;
|
420
|
+
border: 0;
|
421
|
+
border-radius: 0;
|
422
|
+
vertical-align: initial;
|
423
|
+
-webkit-appearance: textfield;
|
424
|
+
-moz-appearance: textfield;
|
425
|
+
appearance: textfield;
|
426
|
+
}
|
427
|
+
|
428
|
+
.flatpickr-current-month input.cur-year:focus {
|
429
|
+
outline: 0;
|
430
|
+
}
|
431
|
+
|
432
|
+
.flatpickr-current-month input.cur-year[disabled],
|
433
|
+
.flatpickr-current-month input.cur-year[disabled]:hover {
|
434
|
+
font-size: 100%;
|
435
|
+
color: rgba(0, 0, 0, 0.5);
|
436
|
+
background: transparent;
|
437
|
+
pointer-events: none;
|
438
|
+
}
|
439
|
+
|
440
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months {
|
441
|
+
appearance: menulist;
|
442
|
+
background: transparent;
|
443
|
+
border: none;
|
444
|
+
border-radius: 0;
|
445
|
+
box-sizing: border-box;
|
446
|
+
color: inherit;
|
447
|
+
cursor: pointer;
|
448
|
+
font-size: inherit;
|
449
|
+
font-family: inherit;
|
450
|
+
font-weight: 300;
|
451
|
+
height: auto;
|
452
|
+
line-height: inherit;
|
453
|
+
margin: -1px 0 0 0;
|
454
|
+
outline: none;
|
455
|
+
padding: 0 0 0 0.5ch;
|
456
|
+
position: relative;
|
457
|
+
vertical-align: initial;
|
458
|
+
-webkit-box-sizing: border-box;
|
459
|
+
-webkit-appearance: menulist;
|
460
|
+
-moz-appearance: menulist;
|
461
|
+
width: auto;
|
462
|
+
}
|
463
|
+
|
464
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
|
465
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months:active {
|
466
|
+
outline: none;
|
467
|
+
}
|
468
|
+
|
469
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
|
470
|
+
background: rgba(0, 0, 0, 0.05);
|
471
|
+
}
|
472
|
+
|
473
|
+
.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
|
474
|
+
background-color: transparent;
|
475
|
+
outline: none;
|
476
|
+
padding: 0;
|
477
|
+
}
|
478
|
+
|
479
|
+
.flatpickr-weekdays {
|
480
|
+
background: transparent;
|
481
|
+
text-align: center;
|
482
|
+
overflow: hidden;
|
483
|
+
width: 100%;
|
484
|
+
display: -webkit-box;
|
485
|
+
display: -webkit-flex;
|
486
|
+
display: -ms-flexbox;
|
487
|
+
display: flex;
|
488
|
+
-webkit-box-align: center;
|
489
|
+
-webkit-align-items: center;
|
490
|
+
-ms-flex-align: center;
|
491
|
+
align-items: center;
|
492
|
+
height: 28px;
|
493
|
+
}
|
494
|
+
|
495
|
+
.flatpickr-weekdays .flatpickr-weekdaycontainer {
|
496
|
+
display: -webkit-box;
|
497
|
+
display: -webkit-flex;
|
498
|
+
display: -ms-flexbox;
|
499
|
+
display: flex;
|
500
|
+
-webkit-box-flex: 1;
|
501
|
+
-webkit-flex: 1;
|
502
|
+
-ms-flex: 1;
|
503
|
+
flex: 1;
|
504
|
+
}
|
505
|
+
|
506
|
+
span.flatpickr-weekday {
|
507
|
+
cursor: default;
|
508
|
+
font-size: 90%;
|
509
|
+
background: transparent;
|
510
|
+
color: rgba(0, 0, 0, 0.54);
|
511
|
+
line-height: 1;
|
512
|
+
margin: 0;
|
513
|
+
text-align: center;
|
514
|
+
display: block;
|
515
|
+
-webkit-box-flex: 1;
|
516
|
+
-webkit-flex: 1;
|
517
|
+
-ms-flex: 1;
|
518
|
+
flex: 1;
|
519
|
+
font-weight: bolder;
|
520
|
+
}
|
521
|
+
|
522
|
+
.dayContainer,
|
523
|
+
.flatpickr-weeks {
|
524
|
+
padding: 1px 0 0 0;
|
525
|
+
}
|
526
|
+
|
527
|
+
.flatpickr-days {
|
528
|
+
position: relative;
|
529
|
+
overflow: hidden;
|
530
|
+
display: -webkit-box;
|
531
|
+
display: -webkit-flex;
|
532
|
+
display: -ms-flexbox;
|
533
|
+
display: flex;
|
534
|
+
-webkit-box-align: start;
|
535
|
+
-webkit-align-items: flex-start;
|
536
|
+
-ms-flex-align: start;
|
537
|
+
align-items: flex-start;
|
538
|
+
width: 307.875px;
|
539
|
+
}
|
540
|
+
|
541
|
+
.flatpickr-days:focus {
|
542
|
+
outline: 0;
|
543
|
+
}
|
544
|
+
|
545
|
+
.dayContainer {
|
546
|
+
padding: 0;
|
547
|
+
outline: 0;
|
548
|
+
text-align: left;
|
549
|
+
width: 307.875px;
|
550
|
+
min-width: 307.875px;
|
551
|
+
max-width: 307.875px;
|
552
|
+
-webkit-box-sizing: border-box;
|
553
|
+
box-sizing: border-box;
|
554
|
+
display: inline-block;
|
555
|
+
display: -ms-flexbox;
|
556
|
+
display: -webkit-box;
|
557
|
+
display: -webkit-flex;
|
558
|
+
display: flex;
|
559
|
+
-webkit-flex-wrap: wrap;
|
560
|
+
flex-wrap: wrap;
|
561
|
+
-ms-flex-wrap: wrap;
|
562
|
+
-ms-flex-pack: justify;
|
563
|
+
-webkit-justify-content: space-around;
|
564
|
+
justify-content: space-around;
|
565
|
+
-webkit-transform: translate3d(0px, 0px, 0px);
|
566
|
+
transform: translate3d(0px, 0px, 0px);
|
567
|
+
opacity: 1;
|
568
|
+
}
|
569
|
+
|
570
|
+
.dayContainer + .dayContainer {
|
571
|
+
-webkit-box-shadow: -1px 0 0 #e6e6e6;
|
572
|
+
box-shadow: -1px 0 0 #e6e6e6;
|
573
|
+
}
|
574
|
+
|
575
|
+
.flatpickr-day {
|
576
|
+
background: none;
|
577
|
+
border: 1px solid transparent;
|
578
|
+
border-radius: 150px;
|
579
|
+
-webkit-box-sizing: border-box;
|
580
|
+
box-sizing: border-box;
|
581
|
+
color: #393939;
|
582
|
+
cursor: pointer;
|
583
|
+
font-weight: 400;
|
584
|
+
width: 14.2857143%;
|
585
|
+
-webkit-flex-basis: 14.2857143%;
|
586
|
+
-ms-flex-preferred-size: 14.2857143%;
|
587
|
+
flex-basis: 14.2857143%;
|
588
|
+
max-width: 39px;
|
589
|
+
height: 39px;
|
590
|
+
line-height: 39px;
|
591
|
+
margin: 0;
|
592
|
+
display: inline-block;
|
593
|
+
position: relative;
|
594
|
+
-webkit-box-pack: center;
|
595
|
+
-webkit-justify-content: center;
|
596
|
+
-ms-flex-pack: center;
|
597
|
+
justify-content: center;
|
598
|
+
text-align: center;
|
599
|
+
}
|
600
|
+
|
601
|
+
.flatpickr-day.inRange,
|
602
|
+
.flatpickr-day.prevMonthDay.inRange,
|
603
|
+
.flatpickr-day.nextMonthDay.inRange,
|
604
|
+
.flatpickr-day.today.inRange,
|
605
|
+
.flatpickr-day.prevMonthDay.today.inRange,
|
606
|
+
.flatpickr-day.nextMonthDay.today.inRange,
|
607
|
+
.flatpickr-day:hover,
|
608
|
+
.flatpickr-day.prevMonthDay:hover,
|
609
|
+
.flatpickr-day.nextMonthDay:hover,
|
610
|
+
.flatpickr-day:focus,
|
611
|
+
.flatpickr-day.prevMonthDay:focus,
|
612
|
+
.flatpickr-day.nextMonthDay:focus {
|
613
|
+
cursor: pointer;
|
614
|
+
outline: 0;
|
615
|
+
background: #e6e6e6;
|
616
|
+
border-color: #e6e6e6;
|
617
|
+
}
|
618
|
+
|
619
|
+
.flatpickr-day.today {
|
620
|
+
border-color: #959ea9;
|
621
|
+
}
|
622
|
+
|
623
|
+
.flatpickr-day.today:hover,
|
624
|
+
.flatpickr-day.today:focus {
|
625
|
+
border-color: #959ea9;
|
626
|
+
background: #959ea9;
|
627
|
+
color: #fff;
|
628
|
+
}
|
629
|
+
|
630
|
+
.flatpickr-day.selected,
|
631
|
+
.flatpickr-day.startRange,
|
632
|
+
.flatpickr-day.endRange,
|
633
|
+
.flatpickr-day.selected.inRange,
|
634
|
+
.flatpickr-day.startRange.inRange,
|
635
|
+
.flatpickr-day.endRange.inRange,
|
636
|
+
.flatpickr-day.selected:focus,
|
637
|
+
.flatpickr-day.startRange:focus,
|
638
|
+
.flatpickr-day.endRange:focus,
|
639
|
+
.flatpickr-day.selected:hover,
|
640
|
+
.flatpickr-day.startRange:hover,
|
641
|
+
.flatpickr-day.endRange:hover,
|
642
|
+
.flatpickr-day.selected.prevMonthDay,
|
643
|
+
.flatpickr-day.startRange.prevMonthDay,
|
644
|
+
.flatpickr-day.endRange.prevMonthDay,
|
645
|
+
.flatpickr-day.selected.nextMonthDay,
|
646
|
+
.flatpickr-day.startRange.nextMonthDay,
|
647
|
+
.flatpickr-day.endRange.nextMonthDay {
|
648
|
+
background: #569ff7;
|
649
|
+
-webkit-box-shadow: none;
|
650
|
+
box-shadow: none;
|
651
|
+
color: #fff;
|
652
|
+
border-color: #569ff7;
|
653
|
+
}
|
654
|
+
|
655
|
+
.flatpickr-day.selected.startRange,
|
656
|
+
.flatpickr-day.startRange.startRange,
|
657
|
+
.flatpickr-day.endRange.startRange {
|
658
|
+
border-radius: 50px 0 0 50px;
|
659
|
+
}
|
660
|
+
|
661
|
+
.flatpickr-day.selected.endRange,
|
662
|
+
.flatpickr-day.startRange.endRange,
|
663
|
+
.flatpickr-day.endRange.endRange {
|
664
|
+
border-radius: 0 50px 50px 0;
|
665
|
+
}
|
666
|
+
|
667
|
+
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
|
668
|
+
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
|
669
|
+
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
|
670
|
+
-webkit-box-shadow: -10px 0 0 #569ff7;
|
671
|
+
box-shadow: -10px 0 0 #569ff7;
|
672
|
+
}
|
673
|
+
|
674
|
+
.flatpickr-day.selected.startRange.endRange,
|
675
|
+
.flatpickr-day.startRange.startRange.endRange,
|
676
|
+
.flatpickr-day.endRange.startRange.endRange {
|
677
|
+
border-radius: 50px;
|
678
|
+
}
|
679
|
+
|
680
|
+
.flatpickr-day.inRange {
|
681
|
+
border-radius: 0;
|
682
|
+
-webkit-box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
683
|
+
box-shadow: -5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;
|
684
|
+
}
|
685
|
+
|
686
|
+
.flatpickr-day.flatpickr-disabled,
|
687
|
+
.flatpickr-day.flatpickr-disabled:hover,
|
688
|
+
.flatpickr-day.prevMonthDay,
|
689
|
+
.flatpickr-day.nextMonthDay,
|
690
|
+
.flatpickr-day.notAllowed,
|
691
|
+
.flatpickr-day.notAllowed.prevMonthDay,
|
692
|
+
.flatpickr-day.notAllowed.nextMonthDay {
|
693
|
+
color: rgba(57, 57, 57, 0.3);
|
694
|
+
background: transparent;
|
695
|
+
border-color: transparent;
|
696
|
+
cursor: default;
|
697
|
+
}
|
698
|
+
|
699
|
+
.flatpickr-day.flatpickr-disabled,
|
700
|
+
.flatpickr-day.flatpickr-disabled:hover {
|
701
|
+
cursor: not-allowed;
|
702
|
+
color: rgba(57, 57, 57, 0.1);
|
703
|
+
}
|
704
|
+
|
705
|
+
.flatpickr-day.week.selected {
|
706
|
+
border-radius: 0;
|
707
|
+
-webkit-box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;
|
708
|
+
box-shadow: -5px 0 0 #569ff7, 5px 0 0 #569ff7;
|
709
|
+
}
|
710
|
+
|
711
|
+
.flatpickr-day.hidden {
|
712
|
+
visibility: hidden;
|
713
|
+
}
|
714
|
+
|
715
|
+
.rangeMode .flatpickr-day {
|
716
|
+
margin-top: 1px;
|
717
|
+
}
|
718
|
+
|
719
|
+
.flatpickr-weekwrapper {
|
720
|
+
float: left;
|
721
|
+
}
|
722
|
+
|
723
|
+
.flatpickr-weekwrapper .flatpickr-weeks {
|
724
|
+
padding: 0 12px;
|
725
|
+
-webkit-box-shadow: 1px 0 0 #e6e6e6;
|
726
|
+
box-shadow: 1px 0 0 #e6e6e6;
|
727
|
+
}
|
728
|
+
|
729
|
+
.flatpickr-weekwrapper .flatpickr-weekday {
|
730
|
+
float: none;
|
731
|
+
width: 100%;
|
732
|
+
line-height: 28px;
|
733
|
+
}
|
734
|
+
|
735
|
+
.flatpickr-weekwrapper span.flatpickr-day,
|
736
|
+
.flatpickr-weekwrapper span.flatpickr-day:hover {
|
737
|
+
display: block;
|
738
|
+
width: 100%;
|
739
|
+
max-width: none;
|
740
|
+
color: rgba(57, 57, 57, 0.3);
|
741
|
+
background: transparent;
|
742
|
+
cursor: default;
|
743
|
+
border: none;
|
744
|
+
}
|
745
|
+
|
746
|
+
.flatpickr-innerContainer {
|
747
|
+
display: block;
|
748
|
+
display: -webkit-box;
|
749
|
+
display: -webkit-flex;
|
750
|
+
display: -ms-flexbox;
|
751
|
+
display: flex;
|
752
|
+
-webkit-box-sizing: border-box;
|
753
|
+
box-sizing: border-box;
|
754
|
+
overflow: hidden;
|
755
|
+
}
|
756
|
+
|
757
|
+
.flatpickr-rContainer {
|
758
|
+
display: inline-block;
|
759
|
+
padding: 0;
|
760
|
+
-webkit-box-sizing: border-box;
|
761
|
+
box-sizing: border-box;
|
762
|
+
}
|
763
|
+
|
764
|
+
.flatpickr-time {
|
765
|
+
text-align: center;
|
766
|
+
outline: 0;
|
767
|
+
display: block;
|
768
|
+
height: 0;
|
769
|
+
line-height: 40px;
|
770
|
+
max-height: 40px;
|
771
|
+
-webkit-box-sizing: border-box;
|
772
|
+
box-sizing: border-box;
|
773
|
+
overflow: hidden;
|
774
|
+
display: -webkit-box;
|
775
|
+
display: -webkit-flex;
|
776
|
+
display: -ms-flexbox;
|
777
|
+
display: flex;
|
778
|
+
}
|
779
|
+
|
780
|
+
.flatpickr-time:after {
|
781
|
+
content: "";
|
782
|
+
display: table;
|
783
|
+
clear: both;
|
784
|
+
}
|
785
|
+
|
786
|
+
.flatpickr-time .numInputWrapper {
|
787
|
+
-webkit-box-flex: 1;
|
788
|
+
-webkit-flex: 1;
|
789
|
+
-ms-flex: 1;
|
790
|
+
flex: 1;
|
791
|
+
width: 40%;
|
792
|
+
height: 40px;
|
793
|
+
float: left;
|
794
|
+
}
|
795
|
+
|
796
|
+
.flatpickr-time .numInputWrapper span.arrowUp:after {
|
797
|
+
border-bottom-color: #393939;
|
798
|
+
}
|
799
|
+
|
800
|
+
.flatpickr-time .numInputWrapper span.arrowDown:after {
|
801
|
+
border-top-color: #393939;
|
802
|
+
}
|
803
|
+
|
804
|
+
.flatpickr-time.hasSeconds .numInputWrapper {
|
805
|
+
width: 26%;
|
806
|
+
}
|
807
|
+
|
808
|
+
.flatpickr-time.time24hr .numInputWrapper {
|
809
|
+
width: 49%;
|
810
|
+
}
|
811
|
+
|
812
|
+
.flatpickr-time input {
|
813
|
+
background: transparent;
|
814
|
+
-webkit-box-shadow: none;
|
815
|
+
box-shadow: none;
|
816
|
+
border: 0;
|
817
|
+
border-radius: 0;
|
818
|
+
text-align: center;
|
819
|
+
margin: 0;
|
820
|
+
padding: 0;
|
821
|
+
height: inherit;
|
822
|
+
line-height: inherit;
|
823
|
+
color: #393939;
|
824
|
+
font-size: 14px;
|
825
|
+
position: relative;
|
826
|
+
-webkit-box-sizing: border-box;
|
827
|
+
box-sizing: border-box;
|
828
|
+
-webkit-appearance: textfield;
|
829
|
+
-moz-appearance: textfield;
|
830
|
+
appearance: textfield;
|
831
|
+
}
|
832
|
+
|
833
|
+
.flatpickr-time input.flatpickr-hour {
|
834
|
+
font-weight: bold;
|
835
|
+
}
|
836
|
+
|
837
|
+
.flatpickr-time input.flatpickr-minute,
|
838
|
+
.flatpickr-time input.flatpickr-second {
|
839
|
+
font-weight: 400;
|
840
|
+
}
|
841
|
+
|
842
|
+
.flatpickr-time input:focus {
|
843
|
+
outline: 0;
|
844
|
+
border: 0;
|
845
|
+
}
|
846
|
+
|
847
|
+
.flatpickr-time .flatpickr-time-separator,
|
848
|
+
.flatpickr-time .flatpickr-am-pm {
|
849
|
+
height: inherit;
|
850
|
+
float: left;
|
851
|
+
line-height: inherit;
|
852
|
+
color: #393939;
|
853
|
+
font-weight: bold;
|
854
|
+
width: 2%;
|
855
|
+
-webkit-user-select: none;
|
856
|
+
-moz-user-select: none;
|
857
|
+
-ms-user-select: none;
|
858
|
+
user-select: none;
|
859
|
+
-webkit-align-self: center;
|
860
|
+
-ms-flex-item-align: center;
|
861
|
+
align-self: center;
|
862
|
+
}
|
863
|
+
|
864
|
+
.flatpickr-time .flatpickr-am-pm {
|
865
|
+
outline: 0;
|
866
|
+
width: 18%;
|
867
|
+
cursor: pointer;
|
868
|
+
text-align: center;
|
869
|
+
font-weight: 400;
|
870
|
+
}
|
871
|
+
|
872
|
+
.flatpickr-time input:hover,
|
873
|
+
.flatpickr-time .flatpickr-am-pm:hover,
|
874
|
+
.flatpickr-time input:focus,
|
875
|
+
.flatpickr-time .flatpickr-am-pm:focus {
|
876
|
+
background: #eee;
|
877
|
+
}
|
878
|
+
|
879
|
+
.flatpickr-input[readonly] {
|
880
|
+
cursor: pointer;
|
881
|
+
}
|
882
|
+
|
883
|
+
@-webkit-keyframes fpFadeInDown {
|
884
|
+
from {
|
885
|
+
opacity: 0;
|
886
|
+
-webkit-transform: translate3d(0, -20px, 0);
|
887
|
+
transform: translate3d(0, -20px, 0);
|
888
|
+
}
|
889
|
+
to {
|
890
|
+
opacity: 1;
|
891
|
+
-webkit-transform: translate3d(0, 0, 0);
|
892
|
+
transform: translate3d(0, 0, 0);
|
893
|
+
}
|
894
|
+
}
|
895
|
+
@keyframes fpFadeInDown {
|
896
|
+
from {
|
897
|
+
opacity: 0;
|
898
|
+
-webkit-transform: translate3d(0, -20px, 0);
|
899
|
+
transform: translate3d(0, -20px, 0);
|
900
|
+
}
|
901
|
+
to {
|
902
|
+
opacity: 1;
|
903
|
+
-webkit-transform: translate3d(0, 0, 0);
|
904
|
+
transform: translate3d(0, 0, 0);
|
905
|
+
}
|
906
|
+
}
|
1
907
|
.less-strong, table .less-strong-right, .less-less-strong {
|
2
908
|
opacity: 0.65;
|
3
909
|
}
|
@@ -168,6 +1074,21 @@ input[type=radio] {
|
|
168
1074
|
}
|
169
1075
|
}
|
170
1076
|
|
1077
|
+
#periodSelectDropdown {
|
1078
|
+
display: flex;
|
1079
|
+
}
|
1080
|
+
#periodSelectDropdown #periodSelectDropdownButton svg {
|
1081
|
+
width: 16px;
|
1082
|
+
margin-left: 4px;
|
1083
|
+
}
|
1084
|
+
#periodSelectDropdown .dropdown-menu {
|
1085
|
+
position: absolute;
|
1086
|
+
display: none;
|
1087
|
+
}
|
1088
|
+
#periodSelectDropdown .rotate-icon svg {
|
1089
|
+
transform: rotate(180deg);
|
1090
|
+
}
|
1091
|
+
|
171
1092
|
.full-screen-table-overflown {
|
172
1093
|
overflow-x: scroll;
|
173
1094
|
margin-left: -15px;
|
@@ -51,3 +51,24 @@
|
|
51
51
|
}
|
52
52
|
}
|
53
53
|
}
|
54
|
+
|
55
|
+
#periodSelectDropdown {
|
56
|
+
#periodSelectDropdownButton {
|
57
|
+
svg {
|
58
|
+
width: 16px;
|
59
|
+
margin-left: 4px;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
display: flex;
|
63
|
+
|
64
|
+
.dropdown-menu {
|
65
|
+
position: absolute;
|
66
|
+
display: none;
|
67
|
+
}
|
68
|
+
|
69
|
+
.rotate-icon {
|
70
|
+
svg {
|
71
|
+
transform: rotate(180deg);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
@@ -25,7 +25,7 @@
|
|
25
25
|
= humanized_time_range(@time_range)
|
26
26
|
- unless skip_pagination
|
27
27
|
.pagination-flex.justify-content-md-end{class: (skip_total ? "col-12" : "col-md-7")}
|
28
|
-
= paginate collection
|
28
|
+
= paginate collection, outer_window: 1
|
29
29
|
- if count > @per_page.to_i
|
30
30
|
- per_pages = [10, 25, 50, 100, @per_page.to_i].uniq.sort
|
31
31
|
= select_tag :per_page_select, options_for_select(per_pages.map { |i| ["#{i} / page", i] }, selected: @per_page), { class: "form-control per-page-select" }
|
@@ -1,45 +1,9 @@
|
|
1
1
|
- skip_submission ||= false
|
2
2
|
- include_future ||= false
|
3
3
|
- prepend_text ||= nil
|
4
|
+
- dropdown ||= false
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
- if include_future
|
11
|
-
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "next_week")), class: ("active" if @period == "next_week"), data: { period: "next_week" } }
|
12
|
-
%span.d-none.d-md-inline-block next
|
13
|
-
seven days
|
14
|
-
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "next_month")), class: ("active" if @period == "next_month"), data: { period: "next_month" } }
|
15
|
-
%span.d-none.d-md-inline-block next
|
16
|
-
thirty days
|
17
|
-
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "hour")), class: ("active" if @period == "hour"), data: { period: "hour" } }
|
18
|
-
%span.d-none.d-md-inline-block past
|
19
|
-
hour
|
20
|
-
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "day")), class: ("active" if @period == "day"), data: { period: "day" } }
|
21
|
-
%span.d-none.d-md-inline-block past
|
22
|
-
day
|
23
|
-
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "week")), class: ("active" if @period == "week"), data: { period: "week" } }
|
24
|
-
%span.d-none.d-md-inline-block past
|
25
|
-
seven days
|
26
|
-
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "month")), class: ("active" if @period == "month"), data: { period: "month" } }
|
27
|
-
%span.d-none.d-md-inline-block past
|
28
|
-
thirty days
|
29
|
-
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "year")), class: ("active" if @period == "year"), data: { period: "year" } }
|
30
|
-
%span.d-none.d-md-inline-block past
|
31
|
-
year
|
32
|
-
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "all")), class: ("active" if @period == "all"), data: { period: "all" } }
|
33
|
-
all
|
34
|
-
%button#periodSelectCustom.btn.btn-secondary.btn-sm.ml-2{ class: ("active" if @period == "custom"), data: { period: "custom" } }
|
35
|
-
custom
|
36
|
-
|
37
|
-
%form#timeSelectionCustom.custom-time-selection.row.mt-2.collapse{ class: @period == "custom" ? "in show" : "" }
|
38
|
-
.form-group
|
39
|
-
= label_tag :start_time_selector, "from", class: "control-label mr-2"
|
40
|
-
= datetime_local_field_tag :start_time_selector, @start_time.strftime("%Y-%m-%dT%H:%M"), step: 60, class: "form-control"
|
41
|
-
.form-group.end-time-control
|
42
|
-
= label_tag :end_time_selector, "to", class: "control-label mr-2 ml-2"
|
43
|
-
= datetime_local_field_tag :end_time_selector, @end_time.strftime("%Y-%m-%dT%H:%M"), step: 60, class: "form-control"
|
44
|
-
%button#updatePeriodSelectCustom.btn.btn-primary.btn-sm.ml-2
|
45
|
-
update
|
6
|
+
- if dropdown
|
7
|
+
= render 'tranzito_utils/period_select_dropdown'
|
8
|
+
- else
|
9
|
+
= render 'tranzito_utils/period_select_list', skip_submission: skip_submission, include_future: include_future, prepend_text: prepend_text
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#periodSelectDropdown
|
2
|
+
.dropdown
|
3
|
+
%button.btn.btn-secondary#periodSelectDropdownButton{type: "button"}
|
4
|
+
= set_active_period(@period)
|
5
|
+
= inline_svg_tag "dropdown.svg"
|
6
|
+
#periodSelectDropdownMenu.dropdown-menu.hidden.text-left
|
7
|
+
.dropdown-item{ class: ("active" if @period == "all") }
|
8
|
+
= link_to "All Time", url_for(sortable_search_params.merge(period: "all")), data: { period: "all" }
|
9
|
+
.dropdown-item{ class: ("active" if @period == "hour")}
|
10
|
+
= link_to "Past hour", url_for(sortable_search_params.merge(period: "hour")), data: { period: "hour" }
|
11
|
+
.dropdown-item{ class: ("active" if @period == "day")}
|
12
|
+
= link_to "Past day", url_for(sortable_search_params.merge(period: "day")), data: { period: "day" }
|
13
|
+
.dropdown-item{ class: ("active" if @period == "week")}
|
14
|
+
= link_to "Past seven days", url_for(sortable_search_params.merge(period: "week")), data: { period: "week" }
|
15
|
+
.dropdown-item{ class: ("active" if @period == "month")}
|
16
|
+
= link_to "Past thirty days", url_for(sortable_search_params.merge(period: "month")), data: { period: "month" }
|
17
|
+
.dropdown-item{ class: ("active" if @period == "year")}
|
18
|
+
= link_to "Past year", url_for(sortable_search_params.merge(period: "year")), data: { period: "year" }
|
19
|
+
.dropdown-item{ class: ("active" if @period == "custom")}
|
20
|
+
%a#showDateField{ href: "", data: { period: "custom" }}
|
21
|
+
Custom date range
|
22
|
+
|
23
|
+
%form#dropdownCustomSelectionForm
|
24
|
+
= hidden_field_tag :start_time_selector, (@period == "custom" ? @start_time : Date.today).strftime("%Y-%m-%d")
|
25
|
+
= hidden_field_tag :end_time_selector, (@period == "custom" ? @end_time : Date.today).strftime("%Y-%m-%d")
|
26
|
+
%input#customPeriodSelectDatePicker.hidden{type: "text"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#timeSelectionBtnGroup.text-right{ role: "group", class: (@period == "custom" ? "custom-period-selected" : ""), "data-nosubmit" => "#{skip_submission}" }
|
2
|
+
- if prepend_text.present?
|
3
|
+
%span.mr-2.less-strong.d-block.d-lg-inline-block
|
4
|
+
= prepend_text
|
5
|
+
|
6
|
+
- if include_future
|
7
|
+
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "next_week")), class: ("active" if @period == "next_week"), data: { period: "next_week" } }
|
8
|
+
%span.d-none.d-md-inline-block next
|
9
|
+
seven days
|
10
|
+
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "next_month")), class: ("active" if @period == "next_month"), data: { period: "next_month" } }
|
11
|
+
%span.d-none.d-md-inline-block next
|
12
|
+
thirty days
|
13
|
+
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "hour")), class: ("active" if @period == "hour"), data: { period: "hour" } }
|
14
|
+
%span.d-none.d-md-inline-block past
|
15
|
+
hour
|
16
|
+
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "day")), class: ("active" if @period == "day"), data: { period: "day" } }
|
17
|
+
%span.d-none.d-md-inline-block past
|
18
|
+
day
|
19
|
+
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "week")), class: ("active" if @period == "week"), data: { period: "week" } }
|
20
|
+
%span.d-none.d-md-inline-block past
|
21
|
+
seven days
|
22
|
+
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "month")), class: ("active" if @period == "month"), data: { period: "month" } }
|
23
|
+
%span.d-none.d-md-inline-block past
|
24
|
+
thirty days
|
25
|
+
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "year")), class: ("active" if @period == "year"), data: { period: "year" } }
|
26
|
+
%span.d-none.d-md-inline-block past
|
27
|
+
year
|
28
|
+
%a.btn.btn-secondary.btn-sm.period-select-standard{ href: url_for(sortable_search_params.merge(period: "all")), class: ("active" if @period == "all"), data: { period: "all" } }
|
29
|
+
all
|
30
|
+
%button#periodSelectCustom.btn.btn-secondary.btn-sm.ml-2{ class: ("active" if @period == "custom"), data: { period: "custom" } }
|
31
|
+
custom
|
32
|
+
|
33
|
+
%form#timeSelectionCustom.custom-time-selection.row.mt-2.collapse{ class: @period == "custom" ? "in show" : "" }
|
34
|
+
.form-group
|
35
|
+
= label_tag :start_time_selector, "from", class: "control-label mr-2"
|
36
|
+
= datetime_local_field_tag :start_time_selector, @start_time.strftime("%Y-%m-%dT%H:%M"), step: 60, class: "form-control"
|
37
|
+
.form-group.end-time-control
|
38
|
+
= label_tag :end_time_selector, "to", class: "control-label mr-2 ml-2"
|
39
|
+
= datetime_local_field_tag :end_time_selector, @end_time.strftime("%Y-%m-%dT%H:%M"), step: 60, class: "form-control"
|
40
|
+
%button#updatePeriodSelectCustom.btn.btn-primary.btn-sm.ml-2
|
41
|
+
update
|
@@ -65,6 +65,21 @@ module TranzitoUtils
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
def set_active_period(period)
|
69
|
+
periods = {
|
70
|
+
hour: "Past hour",
|
71
|
+
day: "Past day",
|
72
|
+
month: "Past thirty days",
|
73
|
+
year: "Past year",
|
74
|
+
week: "Past seven days",
|
75
|
+
next_month: "next thirty days",
|
76
|
+
next_week: "next seven days",
|
77
|
+
all: "All Time",
|
78
|
+
custom: @start_time.strftime("%Y/%m/%d") + " ~ " + @end_time.strftime("%Y/%m/%d")
|
79
|
+
}
|
80
|
+
periods[period.to_sym] || periods[:all]
|
81
|
+
end
|
82
|
+
|
68
83
|
private
|
69
84
|
|
70
85
|
def default_action_name_title
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tranzito_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- willbarrettdev
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -54,6 +54,20 @@ dependencies:
|
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: inline_svg
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
type: :runtime
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
57
71
|
description: Ruby gem contain several modules mainly containing the helpers, concerns
|
58
72
|
and services for personal use by Tranzito
|
59
73
|
email:
|
@@ -66,6 +80,7 @@ files:
|
|
66
80
|
- README.md
|
67
81
|
- Rakefile
|
68
82
|
- app/assets/builds/tranzito_utils-compiled.css
|
83
|
+
- app/assets/images/dropdown.svg
|
69
84
|
- app/assets/stylesheets/tranzito_utils.scss
|
70
85
|
- app/assets/stylesheets/tranzito_utils/_admin_header.scss
|
71
86
|
- app/assets/stylesheets/tranzito_utils/_alerts.scss
|
@@ -83,6 +98,8 @@ files:
|
|
83
98
|
- app/views/tranzito_utils/_flash_messages.html.haml
|
84
99
|
- app/views/tranzito_utils/_pagination.html.haml
|
85
100
|
- app/views/tranzito_utils/_period_select.html.haml
|
101
|
+
- app/views/tranzito_utils/_period_select_dropdown.html.haml
|
102
|
+
- app/views/tranzito_utils/_period_select_list.html.haml
|
86
103
|
- config/locales/en.yml
|
87
104
|
- lib/generators/tranzito_utils/install_generator.rb
|
88
105
|
- lib/generators/tranzito_utils/templates/tranzito_utils.rb
|