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

divio / django-cms / #28319

10 Jan 2024 10:43AM UTC coverage: 76.775%. Remained the same
#28319

push

travis-ci

web-flow
Merge branch 'develop-4' into remove-delete-page-from-toolbar

1042 of 1539 branches covered (0.0%)

2519 of 3281 relevant lines covered (76.78%)

32.53 hits per line

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

83.33
/cms/static/cms/js/modules/loader.js
1
import Nprogress from 'nprogress';
2
import { debounce } from 'lodash';
3

4
Nprogress.configure({
1✔
5
    showSpinner: false,
6
    parent: '#cms-top',
7
    trickleSpeed: 200,
8
    minimum: 0.3,
9
    template: `
10
        <div class="cms-loading-bar" role="bar">
11
            <div class="cms-loading-peg"></div>
12
        </div>
13
    `
14
});
15

16
/**
17
 * Shows the loader spinner on the trigger knob for the toolbar.
18
 *
19
 * @method showLoader
20
 */
21
// instanbul ignore next
22
export const showLoader = debounce(() => {
1✔
23
    // due to this being animated loader we don't want things that show and hide loader
24
    // in one frame to actually show it, for example when setSettings is called in a browser
25
    // that supports localStorage. (it happens every time you click on a plugin for example)
26
    // we want to debounce the call and cancel it if it's in the same frame
27
    Nprogress.start();
×
28
}, 0);
29

30
/**
31
 * Hides the loader spinner on the trigger knob for the toolbar.
32
 *
33
 * @method hideLoader
34
 */
35
// instanbul ignore next
36
export const hideLoader = () => {
1✔
37
    showLoader.cancel();
10✔
38
    Nprogress.done();
10✔
39
};
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