-
Notifications
You must be signed in to change notification settings - Fork 4
/
action.php
65 lines (55 loc) · 2.13 KB
/
action.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Plugin for making callflow diagrams
*
* @note the js uses SVG/VXML from Raphaël.js @link:raphaeljs.com
* @note config options added by Michael Bohn
*
* @author Bojidar Marinov <bojidar.marinov.bg@gmail.com>
*
*
*/
if(!defined('DOKU_INC')) die(); // no Dokuwiki, no go
class action_plugin_callflow extends DokuWiki_Action_Plugin
{
/**
* Register the handle function in the controller
*
* @param Doku_event_handler $controller The event controller
*/
function register(Doku_Event_Handler $controller)
{
$controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'addconfig2js');
}
/**
* @param $event
* @param $params
*/
function addconfig2js ($event, $params) {
global $JSINFO;
$JSINFO['plugin_callflow'] = array(
'margin' => $this->getConf('margin'),
'txtsize' => $this->getConf('txtsize'),
'titlesize' => $this->getConf('titlesize'),
'linespacing' => $this->getConf('linespacing'),
'colspacing' => $this->getConf('colspacing'),
'strokewidth' => $this->getConf('strokewidth'),
'strokecolor' => $this->getConf('strokecolor'),
'txtcolor' => $this->getConf('txtcolor'),
'bgr' => $this->getConf('bgr'),
'cols_minlen' => $this->getConf('cols_minlen'),
'cols_height' => $this->getConf('cols_height'),
'cols_rectradius' => $this->getConf('cols_rectradius'),
'cols_fill' => $this->getConf('cols_fill'),
'cols_txtcolor' => $this->getConf('cols_txtcolor'),
'note_margin' => $this->getConf('note_margin'),
'note_rectradius' => $this->getConf('note_rectradius'),
'note_fill' => $this->getConf('note_fill'),
'note_align' => $this->getConf('note_align'),
'tooltip_txtcolor' => $this->getConf('tooltip_txtcolor'),
'tooltip_txtsize' => $this->getConf('tooltip_txtsize'),
'tooltip_border' => $this->getConf('tooltip_border'),
'tooltip_background' => $this->getConf('tooltip_background')
);
}
}