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.
This commit is contained in:
parent
994d0e8dee
commit
fbf9e9d682
10 changed files with 200 additions and 244 deletions
37
js/plugins/qc.js
Normal file
37
js/plugins/qc.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
/**
|
||||
* 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();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue