Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/**
2
* Reportbuilder styles.
3
*/
4
 
5
//
6
// General styles
7
//
8
 
9
// Button styles when a toggle button is active.
10
.reportbuilder-wrapper {
11
    .btn-outline-secondary[data-toggle="collapse"]:not(.collapsed),
12
    .dropdown.show .btn-outline-secondary[data-toggle="dropdown"] {
13
        color: color-yiq($gray-600);
14
        background-color: $gray-600;
15
        border-color: $gray-600;
16
    }
17
}
18
 
19
//
20
// Table
21
//
22
 
23
.reportbuilder-table {
24
    td {
25
        @extend .align-middle;
26
    }
27
    .action-menu .menubar {
28
        justify-content: end;
29
    }
30
}
31
 
32
//
33
// Filters
34
//
35
 
36
$rb-filters-dropdown-width: 27rem !default;
37
$rb-filters-dropdown-height: 30rem !default;
38
$rb-filters-footer-height: 4rem;
39
 
40
.reportbuilder-wrapper .filters-dropdown {
41
    width: $rb-filters-dropdown-width;
42
    padding: 0 0 $rb-filters-footer-height 0;
43
    z-index: $zindex-modal;
44
    overflow: hidden;
45
    @include media-breakpoint-down(sm) {
46
        width: 100%;
47
    }
48
}
49
.reportbuilder-filters-sidebar {
50
    max-height: $rb-filters-dropdown-height;
51
    overflow-y: auto;
52
    border-bottom: 1px solid $dropdown-border-color;
53
    @include thin-scrolls($white);
54
    @include scroll-shadow();
55
 
56
    .filter {
57
        &:not(:nth-last-child(2)) {
58
            border-bottom: 1px solid $dropdown-border-color;
59
        }
60
        .filter-name:hover {
61
            white-space: normal;
62
            text-overflow: clip;
63
            word-break: break-all;
64
        }
65
    }
66
    .fitem[data-groupname="buttonar"] {
67
        position: absolute;
68
        bottom: 0;
69
        height: $rb-filters-footer-height;
70
        align-items: center;
71
        .col-form-label {
72
            display: none !important; /* stylelint-disable-line declaration-no-important */
73
        }
74
    }
75
}
76
 
77
//
78
// Inline forms
79
//
80
 
81
.reportbuilder-filters-wrapper,
82
.reportbuilder-conditions-list {
83
    .mform.full-width-labels {
84
        .fdate_selector {
85
            flex-wrap: wrap;
86
        }
87
        .fitem {
88
            margin-bottom: 0 !important; /* stylelint-disable-line declaration-no-important */
89
            max-width: 100%;
90
        }
91
        .fitem:not(.row):last-child {
92
            flex: 1;
93
            min-width: 0;
94
            span,
95
            .custom-select {
96
                width: 100%;
97
            }
98
        }
99
    }
100
}
101
 
102
//
103
// Custom Reports
104
//
105
 
106
$rb-left-sidebar-width: 250px !default;
107
$rb-right-sidebar-width: 350px !default;
108
 
109
// Reportbuilder full page layout
110
 
111
@include media-breakpoint-up(lg) {
112
    $tabs-height: 83px;
113
    $sidebar-margin-top: $navbar-height + $tabs-height + 20px;
114
    .path-admin-reportbuilder.pagelayout-popup {
115
        // Fix for behat-site defined in theme/boost/scss/moodle/debug.scss:7 is not needed. Override it.
116
        &.behat-site .fixed-top {
117
            position: fixed;
118
        }
119
        #region-main {
120
            border: none;
121
            padding: 0;
122
        }
123
        #maincontent {
124
            visibility: hidden;
125
        }
126
        .dynamictabs .nav-tabs {
127
            position: fixed;
128
            z-index: $zindex-fixed;
129
            width: calc(100% - 35px);
130
            padding-top: 1.25rem;
131
            background-color: $white;
132
            // Small hack to simulate padding bottom after nav-tabs border.
133
            box-shadow: 0 1.25rem 0 $white;
134
        }
135
        .dynamictabs .tab-content {
136
            padding-top: $tabs-height;
137
        }
138
        .reportbuilder-sidebar-menu {
139
            position: fixed;
140
            .reportbuilder-sidebar-menu-cards {
141
                max-height: calc(100vh - #{$sidebar-margin-top} - 52px); // 52px corresponds to "search" input size.
142
            }
143
        }
144
        .reportbuilder-sidebar-settings {
145
            position: fixed;
146
            right: 30px;
147
            max-height: calc(100vh - #{$sidebar-margin-top});
148
        }
149
        .reportbuilder-report[data-editing] .reportbuilder-report-container {
150
            max-height: calc(100vh - #{$sidebar-margin-top});
151
            overflow-y: auto;
152
            @include thin-scrolls($gray-100);
153
            margin-left: calc(#{$rb-left-sidebar-width} + 1rem);
154
            margin-right: calc(#{$rb-right-sidebar-width} + 1rem);
155
        }
156
        .reportbuilder-audiences-container {
157
            margin-left: calc(#{$rb-left-sidebar-width} + 1rem);
158
        }
159
    }
160
}
161
// Fix popper.js behaviour in fullpage report (using 'popup' page layout).
162
#page-admin-reportbuilder-edit #page {
163
    overflow-y: auto;
164
}
165
 
166
// Main content in "Editor" tab (report table)
167
 
168
.reportbuilder-report-container {
169
    @extend .flex-fill;
170
    min-width: 0;
171
    button[data-action="toggle-edit-preview"] .loading-icon {
172
        margin-left: .5rem;
173
    }
174
}
175
// Allow horizontal scroll in editor table.
176
.reportbuilder-editor-table-container {
177
    overflow-x: auto;
178
}
179
// Custom table headers.
180
.reportbuilder-table th {
181
    button[data-action="report-remove-column"],
182
    span[data-drag-type="move"] {
183
        .icon {
184
            width: 12px;
185
            height: 12px;
186
            font-size: 12px;
187
            vertical-align: text-top;
188
            color: $body-color;
189
        }
190
    }
191
    button[data-action="report-remove-column"] .icon {
192
        margin-right: 0;
193
    }
194
}
195
 
196
// Left sidebar menu in "Editor" tab (columns)
197
 
198
.reportbuilder-sidebar-menu {
199
    @include media-breakpoint-up(lg) {
200
        width: $rb-left-sidebar-width;
201
        flex-shrink: 0;
202
    }
203
    .card-body .list-group-item {
204
        padding: .75rem;
205
        .icon {
206
            width: 12px;
207
            height: 12px;
208
            font-size: 12px;
209
        }
210
    }
211
}
212
.reportbuilder-sidebar-menu-cards {
213
    overflow-y: auto;
214
    @include thin-scrolls($gray-100);
215
}
216
 
217
// Right sidebar menu in "Editor" tab  (settings)
218
 
219
.reportbuilder-sidebar-settings {
220
    overflow-y: auto;
221
    @include thin-scrolls($gray-100);
222
    @include media-breakpoint-up(lg) {
223
        width: $rb-right-sidebar-width;
224
        flex-shrink: 0;
225
    }
226
 
227
    // Improve autocomplete styles.
228
    div[data-region="settings-conditions"] .reportbuilder-conditions-select,
229
    div[data-region="settings-filters"] .reportbuilder-filters-select {
230
        .form-autocomplete-selection {
231
            display: none;
232
        }
233
        .form-autocomplete-input {
234
            width: 100%;
235
        }
236
        .form-autocomplete-suggestions {
237
            width: calc(100% - 2 * #{map-get($spacers, 2)});
238
        }
239
    }
240
 
241
    .list-group-item {
242
        padding: .75rem;
243
        .icon {
244
            width: 12px;
245
            height: 12px;
246
            font-size: 12px;
247
            color: $body-color;
248
        }
249
        button[data-action="report-remove-filter"],
250
        button[data-action="report-remove-condition"] {
251
            .icon {
252
                margin-right: 0;
253
                vertical-align: text-top;
254
            }
255
        }
256
        span[data-drag-type="move"] .icon {
257
            vertical-align: text-top;
258
        }
259
    }
260
    div[data-region="settings-sorting"] .list-group-item span[data-drag-type="move"] .icon {
261
        vertical-align: middle;
262
    }
263
    div[data-region="settings-cardview"] form {
264
        .col-md-3,
265
        .col-md-9 {
266
            flex: 1 1;
267
            max-width: initial;
268
        }
269
        div[data-fieldtype="submit"] {
270
            flex-basis: auto;
271
        }
272
    }
273
    .inplaceeditable.inplaceeditingon input {
274
        width: 100%;
275
    }
276
}
277
 
278
// Drag&drop styles
279
 
280
$rb-sortable-list-drag-color: lighten($primary, 40%);
281
 
282
@keyframes sortable-list-drag-color-reset {
283
    from {
284
        background-color: $rb-sortable-list-drag-color;
285
    }
286
    to {
287
        background-color: inherit;
288
    }
289
}
290
 
291
.reportbuilder-sortable-list li,
292
.reportbuilder-table th,
293
.reportbuilder-conditions-list .condition {
294
    &.sortable-list-current-position {
295
        background-color: $rb-sortable-list-drag-color;
296
    }
297
    &.sortable-list-is-dragged {
298
        background-color: $white;
299
        opacity: 0.85;
300
    }
301
    &.sortable-list-is-dropped {
302
        animation: sortable-list-drag-color-reset 1s ease;
303
    }
304
}
305
 
306
// Toggle cards
307
 
308
.reportbuilder-toggle-card {
309
    .card-header {
310
        border-bottom: none;
311
    }
312
    .card-body {
313
        border-top: $card-border-width solid $card-border-color;
314
    }
315
    .toggle-card-button {
316
        i.toggle-card-icon {
317
            color: $gray-600;
318
            font-size: 1.5em;
319
            font-weight: 700;
320
        }
321
        // Toggle icons using standard bootstrap collapse.
322
        .collapsed-icon-container {
323
            display: none;
324
        }
325
        .expanded-icon-container {
326
            display: inline-block;
327
        }
328
        &.collapsed {
329
            .collapsed-icon-container {
330
                display: inline-block;
331
            }
332
            .expanded-icon-container {
333
                display: none;
334
            }
335
        }
336
    }
337
}
338
 
339
// Audiences tab
340
 
341
.reportbuilder-audiences-container {
342
    // 'OR' separator.
343
    .audience-separator {
344
        text-transform: uppercase;
345
        &::before,
346
        &::after {
347
            content: '';
348
            flex: 1;
349
            border-bottom: 1px solid $report-audience-border-color;
350
        }
351
        &:not(:empty)::before {
352
            margin-right: 1rem;
353
        }
354
        &:not(:empty)::after {
355
            margin-left: 1rem;
356
        }
357
    }
358
    // Card action icons.
359
    .instance-card {
360
        .card-header {
361
            i.icon {
362
                margin-right: 0;
363
            }
364
        }
365
    }
366
}
367
 
368
//
369
// Card view.
370
//
371
 
372
// Mixin to covert a report table in a card
373
 
374
@mixin table-cards {
375
    table.reportbuilder-table {
376
        thead {
377
            display: none;
378
        }
379
        tr {
380
            display: flex;
381
            flex-direction: column;
382
            margin: .5rem 0;
383
            padding: .25rem .5rem 0 .5rem;
384
            background-color: $card-bg !important; /* stylelint-disable-line declaration-no-important */
385
            word-wrap: break-word;
386
            background-clip: border-box;
387
            border: $card-border-width solid $card-border-color;
388
            @include border-radius($card-border-radius);
389
            &:hover {
390
                background-color: $card-bg !important; /* stylelint-disable-line declaration-no-important */
391
            }
392
            &.emptyrow {
393
                display: none;
394
            }
395
            &:not(.show) {
396
                td[data-cardviewhidden] {
397
                    display: none;
398
                }
399
            }
400
            td {
401
                display: block;
402
                min-height: 3.6rem;
403
                padding: .5rem .25rem;
404
                border: none;
405
                &::before {
406
                    content: attr(data-cardtitle);
407
                    display: block;
408
                    text-transform: uppercase;
409
                    font-size: 70%;
410
                    color: $gray-800;
411
                }
412
                &:not([data-cardtitle]) {
413
                    min-height: 3rem;
414
                }
415
                &:not(:first-child):not(.card-toggle) {
416
                    border-top: $card-border-width solid $card-border-color;
417
                }
418
                &:first-child {
419
                    padding-right: 2rem;
420
                }
421
            }
422
            td.card-toggle {
423
                display: block !important; /* stylelint-disable-line declaration-no-important */
424
                position: absolute;
425
                right: 10px;
426
                button {
427
                    padding: 0 .5rem;
428
                    color: $gray-600;
429
                    i {
430
                        font-size: 1.5em;
431
                        font-weight: bold;
432
                    }
433
                }
434
            }
435
        }
436
    }
437
}
438
 
439
// Logic to apply card-view mixin when necessary
440
 
441
.reportbuilder-report[data-report-type="0"]:not([data-editing]) {
442
    // Report card view for small screens (if not forcing table).
443
    @include media-breakpoint-down(xs) {
444
        &:not([data-force-table]) {
445
            @include table-cards;
446
        }
447
    }
448
    // Report card view for bigger screens (if forcing card).
449
    @include media-breakpoint-up(sm) {
450
        &[data-force-card] {
451
            @include table-cards;
452
        }
453
    }
454
}