dokuwiki-template-sprintdoc.../js/plugins/qc.js
Andreas Gohr fbf9e9d682 integrate QC plugin (ajax branch)
This refactors the page-attribute area a bit and intergrates the new
ajax branch of the QC plugin. I'm not really happy about the included
file - it should probably be moved to our Template class instead.
2017-03-09 16:15:10 +01:00

37 lines
923 B
JavaScript

/**
* Add custom QC functionality instead of using the plugin's mechanism
*/
jQuery(function () {
var $panel = jQuery('div.qc-output').hide();
// load summary
jQuery('.page-attributes .plugin_qc a').load(
DOKU_BASE + '/lib/exe/ajax.php',
{
call: 'plugin_qc_short',
id: JSINFO['id']
},
function () {
jQuery(this).find('span span').addClass('num');
}
).click(function (e) {
e.preventDefault();
if ($panel.html() == '') {
// load output
$panel.load(
DOKU_BASE + '/lib/exe/ajax.php',
{
call: 'plugin_qc_long',
id: JSINFO['id']
},
function () {
$panel.dw_show();
}
);
} else {
$panel.dw_toggle();
}
});
});