mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
MVC: base_dialog: apply collapsible table headers to the standard dialog form as well.
This commit is contained in:
parent
0a0b961e61
commit
1cd2811382
@ -107,10 +107,16 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr{% if field['advanced']|default(false)=='true' %} data-advanced="true"{% endif %}>
|
||||
<th colspan="3"><h2>{{field['label']}}</h2></th>
|
||||
<th colspan="3">
|
||||
<div style="padding-bottom: 5px; padding-top: 5px; font-size: 16px;">
|
||||
<i class="fa fa-angle-down" aria-hidden="true"></i>
|
||||
|
||||
<b>{{field['label']}}</b>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="collapsible">
|
||||
{#- endmacro #}
|
||||
|
||||
{% else %}
|
||||
|
||||
@ -85,13 +85,13 @@
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr {% if field['advanced']|default(false)=='true' %} data-advanced="true"{% endif %}>
|
||||
<td colspan="3">
|
||||
<th colspan="3">
|
||||
<div style="padding-bottom: 5px; padding-top: 5px; font-size: 16px;">
|
||||
<i class="fa fa-angle-down" aria-hidden="true"></i>
|
||||
|
||||
<b>{{field['label']}}</b>
|
||||
</div>
|
||||
</td>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="collapsible">
|
||||
|
||||
@ -112,11 +112,12 @@
|
||||
});
|
||||
}, 500);
|
||||
|
||||
// Register collapsible table headers
|
||||
$('.table').on('click', 'thead', function(event) {
|
||||
let collapse = $(event.currentTarget).next();
|
||||
let id = collapse.attr('class');
|
||||
if (collapse != undefined && id !== undefined && id === "collapsible") {
|
||||
let icon = $('> tr > td > div > i', event.currentTarget);
|
||||
let icon = $('> tr > th > div > i', event.currentTarget);
|
||||
icon.toggleClass("fa-angle-down fa-angle-right");
|
||||
$('> tr > td', collapse).fadeToggle(150);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user