Conditions | 1 |
Paths | 1 |
Total Lines | 30 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | public function init(): void |
||
20 | { |
||
21 | $this->view->registerJs( |
||
22 | <<<'JS' |
||
23 | $('.apply-ptr-change').popover({html: true}); |
||
24 | $(document).on('click', function (e) { |
||
25 | $('[data-toggle="popover"], [data-original-title]').each(function () { |
||
26 | if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) { |
||
27 | (($(this).popover('hide').data('bs.popover')||{}).inState||{}).click = false |
||
28 | } |
||
29 | }); |
||
30 | }); |
||
31 | JS |
||
32 | , |
||
33 | View::POS_READY |
||
34 | ); |
||
35 | $this->view->registerCss( |
||
36 | <<<'CSS' |
||
37 | .apply-ptr-change { |
||
38 | border-bottom: 1px #72afd2 dashed; |
||
39 | font-style: italic; |
||
40 | } |
||
41 | |||
42 | .apply-ptr-change:hover { |
||
43 | text-decoration: none; |
||
44 | } |
||
45 | |||
46 | CSS |
||
47 | ); |
||
48 | } |
||
49 | |||
78 |