xref: /template/sprintdoc/js/plugins/approve.js (revision 434e76cf75bae61d76428f37e7b0c1baf5ac0ac9)
1/**
2 * Approve plugin banner
3 */
4jQuery(function () {
5    const $icon = jQuery('span.plugin_approve-icon');
6    const $metaBox = jQuery('#spr__meta-box');
7    const $banner = jQuery('#plugin__approve');
8    const title = $banner.find('strong').text();
9
10    $icon.addClass($banner.attr('class'));
11    $icon.attr('title', title);
12
13    // anchor to the sprintdoc meta box
14    $metaBox.after($banner);
15
16    $icon.click(function (e) {
17        e.preventDefault();
18        $banner.dw_toggle();
19    });
20
21});
22