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