Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/**
2
* Reportbuilder.
3
*/
4
 
5
/* Table */
6
#page-admin-reportbuilder-edit {
7
    background-color: $container-bg;
8
 
9
    &.theme-dark {
10
        background-color: $dm-container-bg;
11
    }
12
 
13
    .page-popup-wrapper {
14
        margin-top: 65px;
15
        padding: 0;
16
    }
17
}
18
 
19
.reportbuilder-table {
20
    td {
21
        @extend .align-middle;
22
    }
23
}
24
 
25
/* Filters */
26
.reportbuilder-wrapper {
27
    .filters-dropdown {
28
        //width: 27rem;
29
        width: max-content;
30
        padding: 0;
31
 
32
        @include media-breakpoint-between(xs, sm) {
33
            width: 100%;
34
        }
35
 
36
        .custom-select {
37
            margin-top: 0!important;
38
            height: 36px;
39
            padding-top: 8px;
40
            padding-bottom: 8px;
41
            padding-left: 1rem;
42
 
43
            font-size: $font-size-xs;
44
 
45
            color: $dm-custom-select-color;
46
            background: $dm-custom-select-bg $dm-custom-select-background;
47
            border-color: $dm-custom-select-border-color;
48
        }
49
 
50
        .filter {
1441 ariadna 51
            padding: 10px 16px 10px;
52
            margin: 0 -16px 0!important;
53
 
54
            &:first-of-type {
55
                padding-top: 0;
56
            }
1 efrain 57
        }
58
 
59
        .btn {
60
            padding: 8px 14px;
61
            font-size: $font-size-xs;
62
        }
63
 
64
        .btn-link {
65
            color: $dropdown-link-color;
66
 
67
            .theme-dark & {
68
                color: $dm-dropdown-link-color;
69
            }
70
 
71
            &:hover {
72
                color: $dropdown-link-hover-color;
73
 
74
                .theme-dark & {
75
                    color: $dm-dropdown-link-hover-color;
76
                }
77
            }
78
        }
79
    }
80
 
81
    .reportbuilder-filters-wrapper,
82
    .reportbuilder-conditions-list {
83
        .mform {
84
            &.full-width-labels {
85
                .fitem.row {
86
 
87
                    >.col-md-3,
88
                    >.col-md-9 {
89
                        flex: 0 0 100%;
90
                        max-width: 100%;
91
                    }
92
 
93
                    .fdate_selector {
94
                        flex-wrap: wrap;
95
                    }
96
                }
97
            }
98
 
99
            .form-group {
100
                margin-bottom: 0!important;
101
                max-width: 100%;
102
 
103
                >span {
104
                    max-width: 100%;
105
                }
106
            }
107
        }
108
 
109
        .filter {
110
            .filter-header {
111
                font-size: $font-size-xs;
112
 
113
                .filter-name {
114
                    white-space: nowrap;
115
                    overflow: hidden;
116
                    text-overflow: ellipsis;
117
                    padding-right: 1rem;
118
                }
119
 
120
                .filter-name:hover {
121
                    white-space: normal;
122
                    text-overflow: clip;
123
                    word-break: break-all;
124
                }
125
            }
126
        }
127
    }
128
}
129
 
130
/**
131
* Styled scrollbar with left padding for webkit browsers.
132
*/
133
@mixin reportbuilder-scrollbar() {
134
    $inner-scrollbar-thumb: $secondary;
135
    $inner-scrollbar-track: lighten($secondary, 40%);
136
 
137
    &::-webkit-scrollbar {
138
        -webkit-appearance: none;
139
        appearance: none;
140
    }
141
 
142
    &::-webkit-scrollbar-thumb {
143
        background-color: $inner-scrollbar-thumb;
144
        border-left: 5px solid $white;
145
    }
146
 
147
    &::-webkit-scrollbar-track {
148
        background-color: $inner-scrollbar-track;
149
        border-left: 5px solid $white;
150
    }
151
}
152
 
153
/**
154
* Custom Reports.
155
*/
156
 
157
$rb-left-sidebar-width: 250px;
1441 ariadna 158
$rb-right-sidebar-width: 320px;
1 efrain 159
 
160
.reportbuilder-report-container {
161
    min-width: 0;
162
}
163
 
164
// Allow horizontal scroll in editor table.
165
.reportbuilder-editor-table-container {
166
    overflow-x: auto;
167
}
168
 
169
/* Custom table headers */
170
.reportbuilder-table th {
171
 
172
    button[data-action="report-remove-column"],
173
    span[data-drag-type="move"] {
174
        .icon {
175
            width: 18px;
176
            height: 18px;
177
            vertical-align: text-top;
1441 ariadna 178
            margin: 0;
1 efrain 179
        }
180
    }
181
 
182
    button[data-action="report-remove-column"] .icon {
1441 ariadna 183
        margin: 0;
1 efrain 184
    }
185
}
186
 
187
/* Sidebar menu */
188
.reportbuilder-sidebar-menu {
189
    @include media-breakpoint-up(lg) {
190
        width: $rb-left-sidebar-width;
191
        flex-shrink: 0;
192
    }
193
 
194
    .card-body .list-group-item-action {
195
        border: 1px solid $border-color;
1441 ariadna 196
        border-radius: $border-radius;
1 efrain 197
 
198
        width: calc(100% - 4px);
199
        margin: 1px 2px;
200
        padding: 4px 4px 4px 11px !important;
201
 
202
        &.text-muted {
203
            margin-top: 10px;
204
            border: 0;
205
        }
206
 
207
        .theme-dark & {
208
            border-color: $dm-border-color;
209
        }
210
 
211
        .icon {
1441 ariadna 212
            margin: 0!important;
1 efrain 213
            width: 18px;
214
            height: 18px;
215
        }
1441 ariadna 216
 
1 efrain 217
    }
1441 ariadna 218
 
219
    a.list-group-item-action:hover {
220
        box-shadow: $box-shadow-sm;
221
    }
1 efrain 222
}
223
 
224
.reportbuilder-sidebar-menu-cards {
225
    overflow-y: auto;
226
    @include thin-scrolls($scroll-bg-track);
227
 
228
    .theme-dark & {
229
        @include thin-scrolls($dm-drawer-scroll-bg-track);
230
    }
231
}
232
 
233
/* Settings sidebar */
234
.reportbuilder-sidebar-settings {
1441 ariadna 235
 
236
    .condition-header {
237
        background-color: $gray-100;
238
        .theme-dark & {
239
            background-color: $dm-gray-200;
240
        }
241
    }
242
 
1 efrain 243
    overflow-y: auto;
244
    @include thin-scrolls($scroll-bg-track);
245
 
246
    .theme-dark & {
247
        @include thin-scrolls($dm-drawer-scroll-bg-track);
248
    }
249
 
250
    @include media-breakpoint-up(lg) {
251
        width: $rb-right-sidebar-width;
252
        flex-shrink: 0;
253
    }
254
 
255
    .list-group-item {
1441 ariadna 256
        padding: 7px;
257
        margin: 2px 0;
258
        width: 100%;
259
        border: 1px solid $border-color;
260
        border-radius: $border-radius;
1 efrain 261
 
1441 ariadna 262
        .theme-dark & {
263
            border-color: $dm-border-color;
264
        }
265
 
1 efrain 266
        .icon {
1441 ariadna 267
            margin: 0;
1 efrain 268
            width: 18px;
269
            height: 18px;
270
        }
271
 
272
        button[data-action="report-remove-filter"],
273
        button[data-action="report-remove-condition"] {
274
            .icon {
275
                margin-right: 0;
276
                vertical-align: text-top;
277
            }
278
        }
279
 
280
        span[data-drag-type="move"] .icon {
281
            vertical-align: text-top;
282
        }
283
    }
284
 
285
    div[data-region="settings-sorting"] .list-group-item span[data-drag-type="move"] .icon {
286
        vertical-align: middle;
287
    }
288
 
289
    div[data-region="settings-cardview"] form {
290
 
291
        .col-md-3,
292
        .col-md-9 {
293
            flex: 1 1;
294
            max-width: initial;
295
        }
296
 
297
        div[data-fieldtype="submit"] {
298
            flex-basis: auto;
299
        }
300
    }
301
 
302
    .inplaceeditable.inplaceeditingon input {
303
        width: 100%;
304
    }
305
}
306
 
307
/* Drag&drop styles. */
308
.reportbuilder-sortable-list li,
309
.reportbuilder-table th,
310
.reportbuilder-conditions-list .condition {
311
    &.sortable-list-current-position {
312
        background-color: lighten($primary, 40%);
313
    }
314
 
315
    &.sortable-list-is-dragged {
316
        background-color: $white;
317
        opacity: 0.85;
318
    }
319
}
320
 
321
/* Reportbuilder full page styles. */
322
@include media-breakpoint-up(lg) {
323
    $tabs-height: 60px;
324
    $sidebar-margin-top: $navbar-height + $tabs-height + 20px;
325
 
326
    .path-admin-reportbuilder.pagelayout-popup {
327
 
328
        // Fix for behat-site defined in theme/alpha/scss/moodle/debug.scss:7 is not needed. Override it.
329
        &.behat-site .fixed-top {
330
            position: fixed;
331
        }
332
 
333
        #region-main {
334
            border: none;
335
            padding: 0;
336
        }
337
 
338
        #maincontent {
339
            visibility: hidden;
340
        }
341
 
342
        .dynamictabs .nav-tabs {
1441 ariadna 343
            margin: 0 16px;
1 efrain 344
            background-color: $gray-100;
345
            position: fixed;
346
            top: 70px;
347
            z-index: $zindex-fixed;
348
            max-width: calc(100% - 40px);
349
            width: max-content;
1441 ariadna 350
            border-radius: $border-radius;
1 efrain 351
            padding-top: 0;
352
            margin-bottom: 0 !important;
353
        }
354
 
355
        .dynamictabs .tab-content {
1441 ariadna 356
            padding-top: 85px;
1 efrain 357
        }
358
 
359
        .reportbuilder-sidebar-menu {
360
            position: absolute;
361
 
362
            .reportbuilder-sidebar-menu-cards {
363
                max-height: calc(100vh - #{$sidebar-margin-top} - 52px); // 52px corresponds to "search" input size.
364
            }
365
        }
366
 
367
        .reportbuilder-sidebar-settings {
368
            position: absolute;
1441 ariadna 369
            right: 0;
1 efrain 370
            max-height: calc(100vh - #{$sidebar-margin-top});
371
        }
372
 
373
        .reportbuilder-report[data-editing] .reportbuilder-report-container {
1441 ariadna 374
            width: 100%;
375
            max-height: calc(100vh - 150px);
1 efrain 376
            overflow-y: auto;
377
            @include thin-scrolls($scroll-bg-track);
378
 
379
            .theme-dark & {
380
                @include thin-scrolls($dm-drawer-scroll-bg-track);
381
            }
382
 
383
            margin-left: calc(#{$rb-left-sidebar-width} + 1rem);
384
            margin-right: calc(#{$rb-right-sidebar-width} + 1rem);
385
        }
386
 
387
        .reportbuilder-audiences-container {
388
            margin-left: calc(#{$rb-left-sidebar-width} + 1rem);
389
        }
390
    }
391
}
392
 
393
.theme-dark.path-admin-reportbuilder .nav-tabs {
394
    background-color: $dm-gray-100!important;
395
}
396
 
397
/* Toggle cards. */
1441 ariadna 398
.path-admin-reportbuilder .card-header {
399
    .inplaceeditable .quickeditlink {
400
        margin-left: 0!important;
401
    }
402
}
403
 
1 efrain 404
.reportbuilder-toggle-card {
405
    .card-header {
1441 ariadna 406
        .card-header {
407
            border-bottom: none;
408
 
409
            .inplaceeditable .quickeditlink {
410
                margin-left: 0!important;
411
            }
412
        }
1 efrain 413
    }
414
 
415
    .card-body {
416
        border-top: $card-border-width solid $card-border-color;
417
 
418
        .theme-dark & {
419
            border-color: $dm-border-color;
420
        }
421
    }
422
 
423
    .toggle-card-button {
424
        i.toggle-card-icon {
1441 ariadna 425
            font-size: 14px;
1 efrain 426
            font-weight: 700;
427
        }
428
 
429
        // Toggle icons using standard bootstrap collapse.
430
        .collapsed-icon-container {
431
            display: none;
432
        }
433
 
434
        .expanded-icon-container {
435
            display: inline-block;
436
        }
437
 
438
        &.collapsed {
439
            .collapsed-icon-container {
440
                display: inline-block;
441
            }
442
 
443
            .expanded-icon-container {
444
                display: none;
445
            }
446
        }
447
    }
448
}
449
 
450
/**
451
* Audiences.
452
*/
453
 
454
.reportbuilder-audiences-container {
455
 
456
    /* 'OR' separator. */
457
    .audience-separator {
458
        text-transform: uppercase;
459
 
460
        &::before,
461
        &::after {
462
            content: '';
463
            flex: 1;
464
            border-bottom: 1px solid rgba(0, 0, 0, .125);
465
        }
466
 
467
        &:not(:empty)::before {
468
            margin-right: 1rem;
469
        }
470
 
471
        &:not(:empty)::after {
472
            margin-left: 1rem;
473
        }
474
    }
475
 
476
    /* Card action icons. */
477
    .instance-card {
478
        .card-header {
479
            i.icon {
480
                margin-right: 0;
481
            }
482
        }
483
    }
484
}
485
 
486
/* Report table card view styles */
487
@mixin table-cards {
488
    table.reportbuilder-table {
489
        thead {
490
            display: none;
491
        }
492
 
493
        tr {
494
            display: flex;
495
            flex-direction: column;
496
            margin: .5rem 0;
497
            padding: .25rem .5rem 0 .5rem;
498
            background-color: $card-bg !important;
499
            /* stylelint-disable-line declaration-no-important */
500
            word-wrap: break-word;
501
            background-clip: border-box;
502
            border: $card-border-width solid $card-border-color;
503
            @include border-radius($card-border-radius);
504
 
505
            &:hover {
506
                background-color: $card-bg !important;
507
                /* stylelint-disable-line declaration-no-important */
508
            }
509
 
510
            &.emptyrow {
511
                display: none;
512
            }
513
 
514
            &:not(.show) {
515
                td[data-cardviewhidden] {
516
                    display: none;
517
                }
518
            }
519
 
520
            td {
521
                display: block;
522
                min-height: 3.6rem;
523
                padding: .5rem .25rem;
524
                border: none;
525
 
526
                &::before {
527
                    content: attr(data-cardtitle);
528
                    display: block;
529
                    text-transform: uppercase;
530
                    font-size: 70%;
531
                    color: $gray-800;
532
                }
533
 
534
                &:not([data-cardtitle]) {
535
                    min-height: 3rem;
536
                }
537
 
538
                &:not(:first-child):not(.card-toggle) {
539
                    border-top: $card-border-width solid $card-border-color;
540
                }
541
 
542
                &:first-child {
543
                    padding-right: 2rem;
544
                }
545
            }
546
 
547
            td.card-toggle {
548
                display: block !important;
549
                /* stylelint-disable-line declaration-no-important */
550
                position: absolute;
551
                right: 10px;
552
 
553
                button {
554
                    padding: 0 .5rem;
1441 ariadna 555
                    color: $gray-800;
1 efrain 556
 
557
                    i {
558
                        font-size: 1.5em;
559
                        font-weight: bold;
560
                    }
561
                }
562
            }
563
        }
564
    }
565
}
566
 
567
/* Report table card view for small screens */
568
.reportbuilder-report[data-report-type="0"]:not([data-editing]) {
569
    @include media-breakpoint-down(xs) {
570
        @include table-cards;
571
    }
572
}
1441 ariadna 573
 
574
#page-admin-reportbuilder-edit {
575
    #darkModeBtn {
576
        position: fixed;
577
        top: 58px;
578
        right: 0;
579
        z-index: $zindex-fixed;
580
    }
581
}
582
 
583
//
584
// Filters
585
//
586
 
587
$rb-filters-dropdown-width: 24rem !default;
588
$rb-filters-dropdown-height: 30rem !default;
589
$rb-filters-footer-height: 55px;
590
 
591
.reportbuilder-wrapper .filters-dropdown {
592
    width: $rb-filters-dropdown-width;
593
    max-width: inherit;
594
    padding: 0 0 $rb-filters-footer-height 0;
595
    z-index: $zindex-modal;
596
    overflow: hidden;
597
    @include media-breakpoint-down(sm) {
598
        width: 100%;
599
    }
600
 
601
    .custom-select, select.quickgrade {
602
        padding: 6px 20px 6px 10px;
603
        height: auto;
604
        font-size: $font-size-xs;
605
    }
606
 
607
    .form-control {
608
        padding: 6px 10px;
609
        height: auto;
610
        font-size: $font-size-xs;
611
    }
612
 
613
    .filter-name {
614
        margin-top: 4px;
615
        font-size: $font-size-xs;
616
    }
617
    .btn {
618
        padding: 6px 11px;
619
        font-size: $font-size-xs;
620
    }
621
}
622
.reportbuilder-filters-sidebar {
623
    max-height: $rb-filters-dropdown-height;
624
    overflow-y: auto;
625
    border-bottom: 1px solid $dropdown-border-color;
626
 
627
    .filter {
628
        &:not(:nth-last-child(2)) {
629
            border-bottom: 1px solid $dropdown-border-color;
630
        }
631
        .filter-name:hover {
632
            white-space: normal;
633
            text-overflow: clip;
634
            word-break: break-all;
635
        }
636
    }
637
    .fitem[data-groupname="buttonar"] {
638
        position: absolute;
639
        bottom: 0;
640
        height: $rb-filters-footer-height;
641
        align-items: center;
642
        background: #141414;
643
        left: 0;
644
        padding: 0 16px!important;
645
        width: 100%;
646
        align-items: center;
647
        .btn-link {
648
            color: #fff;
649
        }
650
        .col-form-label {
651
            display: none !important; /* stylelint-disable-line declaration-no-important */
652
        }
653
    }
654
}