datatable sur tableau des groupes rattachables à un user (ref #142)

This commit is contained in:
afornerot 2020-06-09 15:29:47 +02:00
parent 6baed4dea7
commit 2a1179ae9a
1 changed files with 10 additions and 2 deletions

View File

@ -295,7 +295,7 @@
<table id="tbllistgroup" class="table table-striped table-bordered table-hover" style="width:100%"> <table id="tbllistgroup" class="table table-striped table-bordered table-hover" style="width:100%">
<thead> <thead>
<tr> <tr>
<th width="70px">Action</th> <th width="70px" class="no-sort">Action</th>
<th>Groupe</th> <th>Groupe</th>
</tr> </tr>
</thead> </thead>
@ -314,7 +314,7 @@
{% endif %} {% endif %}
<tr id="listgroup{{ group.id }}" style="{{ style }}"> <tr id="listgroup{{ group.id }}" style="{{ style }}">
<td><a style="cursor:pointer"><i class="fa fa-plus fa-fw" onclick="addLinkGroup({{ group.id }})"></i></a></td> <td width="70px"><a style="cursor:pointer"><i class="fa fa-plus fa-fw" onclick="addLinkGroup({{ group.id }})"></i></a></td>
<td id="listgrouplabel{{ group.id }}"> <td id="listgrouplabel{{ group.id }}">
{{ group.label }} {{ group.label }}
</td> </td>
@ -480,6 +480,14 @@
linkmodos+={{ modo.niveau01.id }}+","; linkmodos+={{ modo.niveau01.id }}+",";
{% endfor %} {% endfor %}
$("#user_linkmodos").val(linkmodos); $("#user_linkmodos").val(linkmodos);
$('#tbllistgroup').DataTable({
columnDefs: [ { "targets": 'no-sort', "orderable": false },{ "targets": 'no-visible', "visible": false } ],
responsive: true,
iDisplayLength: 100,
processing: true,
order: [[ 1, "asc" ]],
});
}); });
function removeLinkGroup(id) { function removeLinkGroup(id) {