WebAdmin: allow to reorder and search groups and actions

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-02-17 20:37:30 +01:00
parent 162376fd74
commit a45aeb3bd6
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
2 changed files with 12 additions and 13 deletions

View file

@ -252,20 +252,20 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
{
data: "actions",
defaultContent: [],
searchable: false,
orderable: false,
render: function(data, type, row) {
if (type === 'display') {
if (data){
let actions = [];
for (i = 0; i < data.length; i++){
actions.push(data[i].name);
}
return escapeHTML(actions.join(', '));
}
return ""
if (!data){
return "";
}
return "";
let actions = [];
let result = "";
for (i = 0; i < data.length; i++){
actions.push(data[i].name);
}
result = actions.join(", ");
if (type === 'display') {
return escapeHTML(result);
}
return result;
}
},
{

View file

@ -451,7 +451,6 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
{
data: "groups",
visible: false,
orderable: false,
defaultContent: [],
render: function(data, type, row) {
if (!data){