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