• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

divio / django-cms / #30120

14 Nov 2025 01:00AM UTC coverage: 89.921%. Remained the same
#30120

push

travis-ci

web-flow
Merge 73415788f into c38b75715

1333 of 2144 branches covered (62.17%)

416 of 567 new or added lines in 27 files covered. (73.37%)

421 existing lines in 12 files now uncovered.

9207 of 10239 relevant lines covered (89.92%)

11.18 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/cms/static/cms/js/modules/loader.js
1

2
// Loader mit Vanilla JS, nutzt die vorhandenen Styles aus _toolbar.scss
3
let debounceTimeout = null;
1✔
4
const LOADER_ID = 'cms-loading-bar';
1✔
5
const removeDelay = 300; // Time [ms] to wait before removing the loader from DOM
1✔
6

7
function createLoaderBar() {
NEW
8
    if (document.getElementById(LOADER_ID)) {
×
NEW
9
        return;
×
10
    }
NEW
11
    const cmsTop = document.getElementById('cms-top');
×
NEW
12
    const bar = document.createElement('div');
×
13

NEW
14
    bar.id = LOADER_ID;
×
NEW
15
    bar.className = 'cms-loading-bar';
×
NEW
16
    bar.setAttribute('role', 'bar');
×
NEW
17
    bar.innerHTML = '<div class="cms-loading-peg"></div>';
×
NEW
18
    cmsTop.appendChild(bar);
×
19
}
20

21
function removeLoaderBar() {
22
    const bar = document.getElementById(LOADER_ID);
9✔
23

24
    if (bar) {
9!
NEW
25
        bar.style.opacity = '0';
×
NEW
26
        setTimeout(() => {
×
NEW
27
            if (bar.parentNode) {
×
NEW
28
                bar.parentNode.removeChild(bar);
×
29
            }
30
        }, removeDelay);
31
    }
32
}
33

34
/**
35
 * Zeigt den Loader-Balken oben im Viewport an (debounced).
36
 */
37
export const showLoader = () => {
1✔
NEW
38
    if (debounceTimeout) {
×
NEW
39
        clearTimeout(debounceTimeout);
×
40
    }
NEW
41
    debounceTimeout = setTimeout(() => {
×
NEW
42
        createLoaderBar();
×
43
    }, 0);
44
};
45

46
/**
47
 * Versteckt den Loader-Balken.
48
 */
49
export const hideLoader = () => {
1✔
50
    if (debounceTimeout) {
9!
NEW
51
        clearTimeout(debounceTimeout);
×
52
    }
53
    removeLoaderBar();
9✔
54
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc