Extend integration of approve plugin

This commit is contained in:
Anna Dabrowska 2026-02-13 17:42:31 +01:00
parent 40641dd6f0
commit 434e76cf75
6 changed files with 82 additions and 13 deletions

21
js/plugins/approve.js Normal file
View file

@ -0,0 +1,21 @@
/**
* Approve plugin banner
*/
jQuery(function () {
const $icon = jQuery('span.plugin_approve-icon');
const $metaBox = jQuery('#spr__meta-box');
const $banner = jQuery('#plugin__approve');
const title = $banner.find('strong').text();
$icon.addClass($banner.attr('class'));
$icon.attr('title', title);
// anchor to the sprintdoc meta box
$metaBox.after($banner);
$icon.click(function (e) {
e.preventDefault();
$banner.dw_toggle();
});
});