web client: save/restore file list preferences

This commit is contained in:
Nicola Murino 2021-12-04 07:58:49 +01:00
parent 30d98326ca
commit 3f5451eab6
No known key found for this signature in database
GPG key ID: 2F1FB59433D5A8CB
5 changed files with 16 additions and 4 deletions

View file

@ -168,7 +168,7 @@
"blurable": true
},
"stateSave": true,
"stateDuration": 3600,
"stateDuration": 0,
"buttons": [],
"columnDefs": [
{

View file

@ -223,7 +223,7 @@ function deleteAction() {
"blurable": true
},
"stateSave": true,
"stateDuration": 3600,
"stateDuration": 0,
"buttons": [],
"columnDefs": [
{

View file

@ -245,7 +245,7 @@
"blurable": true
},
"stateSave": true,
"stateDuration": 3600,
"stateDuration": 0,
"buttons": [],
"columnDefs": [
{

View file

@ -798,6 +798,18 @@
},
"deferRender": true,
"processing": true,
"lengthMenu": [ 10, 25, 50, 100, 250, 500 ],
"stateSave": true,
"stateDuration": 0,
"stateSaveParams": function (settings, data) {
data.sftpgo_dir = '{{.CurrentDir}}';
},
"stateLoadParams": function (settings, data) {
if (!data.sftpgo_dir || data.sftpgo_dir != '{{.CurrentDir}}'){
data.start = 0;
data.search.search = "";
}
},
"columns": [
{ "data": "meta" },
{ "data": "type" },

View file

@ -235,7 +235,7 @@
"blurable": true
},
"stateSave": true,
"stateDuration": 3600,
"stateDuration": 0,
"buttons": [],
"columnDefs": [
{