xref: /plugin/acknowledge/script.js (revision 5773dd375a3cbf135e65b74d1b5793a79b587f9e) !
1jQuery(function () {
2
3    jQuery('.plugin-acknowledge-assign').load(
4        DOKU_BASE + 'lib/exe/ajax.php',
5        {
6            call: 'plugin_acknowledge_assign',
7            id: JSINFO.id
8        },
9        function () {
10            jQuery("#ackForm").submit(function(event) {
11                event.preventDefault();
12                var $form = jQuery( this ),
13                    ack = $form.find( "input[name='ack']" )[0];
14
15                jQuery(".plugin-acknowledge-assign").load(
16                    DOKU_BASE + "lib/exe/ajax.php",
17                    {
18                        call: "plugin_acknowledge_assign",
19                        id: JSINFO.id,
20                        ack: ack.checked
21                    }
22                );
23            });
24        }
25    );
26});
27