xref: /template/sprintdoc/js/plugins/qc.js (revision fbf9e9d682e580dc2d020d23ecc173315327ec1e)
1/**
2 * Add custom QC functionality instead of using the plugin's mechanism
3 */
4jQuery(function () {
5    var $panel = jQuery('div.qc-output').hide();
6
7    // load summary
8    jQuery('.page-attributes .plugin_qc a').load(
9        DOKU_BASE + '/lib/exe/ajax.php',
10        {
11            call: 'plugin_qc_short',
12            id: JSINFO['id']
13        },
14        function () {
15            jQuery(this).find('span span').addClass('num');
16        }
17    ).click(function (e) {
18        e.preventDefault();
19
20        if ($panel.html() == '') {
21            // load output
22            $panel.load(
23                DOKU_BASE + '/lib/exe/ajax.php',
24                {
25                    call: 'plugin_qc_long',
26                    id: JSINFO['id']
27                },
28                function () {
29                    $panel.dw_show();
30                }
31            );
32        } else {
33            $panel.dw_toggle();
34        }
35    });
36
37});
38