Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | protected function setupScript() |
||
32 | { |
||
33 | $script = <<<EOT |
||
34 | |||
35 | $('.grid-expand').on('click', function () { |
||
36 | |||
37 | if ($(this).data('inserted') == '0') { |
||
38 | |||
39 | var key = $(this).data('key'); |
||
40 | var row = $(this).closest('tr'); |
||
41 | var html = $('template.grid-expand-'+key).html(); |
||
42 | |||
43 | row.after("<tr style='background-color: #ecf0f5;'><td colspan='"+(row.find('td').length)+"' style='padding:0 !important; border:0;'>"+html+"</td></tr>"); |
||
44 | |||
45 | $(this).data('inserted', 1); |
||
46 | } |
||
47 | |||
48 | $("i", this).toggleClass("fa-angle-double-down fa-angle-double-up"); |
||
49 | }); |
||
50 | EOT; |
||
51 | Admin::script($script); |
||
52 | } |
||
53 | } |