1/**
2 * Javascript for index view
3 *
4 * @author Gerrit Uitslag <klapinklapin@gmail.com>
5 */
6
7jQuery(function () {
8
9    jQuery('.indexmenu_nojs').each(function () {
10        let $tree = jQuery(this);
11        let jsajax = $tree.data('jsajax');
12
13        $tree.dw_tree({
14            toggle_selector: 'a.indexmenu_idx',
15            load_data: function (show_sublist, $clicky) {
16
17                jQuery.post(
18                    DOKU_BASE + 'lib/exe/ajax.php',
19                    'call=indexmenu&req=index&nojs=1&' + $clicky[0].search.substring(1) + '&max=1' + decodeURIComponent(jsajax),
20                    show_sublist,
21                    'html'
22                );
23            }
24        });
25    });
26
27});
28