[Web] persist table settings + fix quarantine sort

This commit is contained in:
FreddleSpl0it 2023-01-06 13:45:52 +01:00
parent c928948b15
commit b22f74cb59
7 changed files with 87 additions and 6 deletions

View File

@ -70,8 +70,10 @@ jQuery(function($){
} }
$('#domainadminstable').DataTable({ $('#domainadminstable').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -143,8 +145,10 @@ jQuery(function($){
} }
$('#oauth2clientstable').DataTable({ $('#oauth2clientstable').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -206,8 +210,10 @@ jQuery(function($){
} }
$('#adminstable').DataTable({ $('#adminstable').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -272,8 +278,10 @@ jQuery(function($){
} }
$('#forwardinghoststable').DataTable({ $('#forwardinghoststable').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -330,8 +338,10 @@ jQuery(function($){
} }
$('#relayhoststable').DataTable({ $('#relayhoststable').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -402,8 +412,10 @@ jQuery(function($){
} }
$('#transportstable').DataTable({ $('#transportstable').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",

View File

@ -119,8 +119,10 @@ jQuery(function($){
} }
$('#autodiscover_log').DataTable({ $('#autodiscover_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -176,8 +178,10 @@ jQuery(function($){
} }
$('#postfix_log').DataTable({ $('#postfix_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -218,8 +222,10 @@ jQuery(function($){
} }
$('#watchdog_log').DataTable({ $('#watchdog_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -264,8 +270,10 @@ jQuery(function($){
} }
$('#api_log').DataTable({ $('#api_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -317,8 +325,10 @@ jQuery(function($){
} }
$('#rl_log').DataTable({ $('#rl_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -408,8 +418,10 @@ jQuery(function($){
} }
$('#ui_logs').DataTable({ $('#ui_logs').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -479,8 +491,10 @@ jQuery(function($){
} }
$('#sasl_logs').DataTable({ $('#sasl_logs').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -527,8 +541,10 @@ jQuery(function($){
} }
$('#acme_log').DataTable({ $('#acme_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -564,8 +580,10 @@ jQuery(function($){
} }
$('#netfilter_log').DataTable({ $('#netfilter_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -606,8 +624,10 @@ jQuery(function($){
} }
$('#sogo_log').DataTable({ $('#sogo_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -648,8 +668,10 @@ jQuery(function($){
} }
$('#dovecot_log').DataTable({ $('#dovecot_log').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {
@ -751,8 +773,10 @@ jQuery(function($){
} }
$('#rspamd_history').DataTable({ $('#rspamd_history').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
order: [[0, 'desc']], order: [[0, 'desc']],
ajax: { ajax: {

View File

@ -78,8 +78,10 @@ jQuery(function($){
} }
function draw_wl_policy_domain_table() { function draw_wl_policy_domain_table() {
$('#wl_policy_domain_table').DataTable({ $('#wl_policy_domain_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -133,8 +135,10 @@ jQuery(function($){
} }
function draw_bl_policy_domain_table() { function draw_bl_policy_domain_table() {
$('#bl_policy_domain_table').DataTable({ $('#bl_policy_domain_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",

View File

@ -433,8 +433,10 @@ jQuery(function($){
} }
var table = $('#domain_table').DataTable({ var table = $('#domain_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -619,9 +621,10 @@ jQuery(function($){
} }
$('#templates_domain_table').DataTable({ $('#templates_domain_table').DataTable({
responsive : true, responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -816,9 +819,10 @@ jQuery(function($){
} }
$('#mailbox_table').DataTable({ $('#mailbox_table').DataTable({
responsive : true, responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -1074,9 +1078,10 @@ jQuery(function($){
} }
$('#templates_mbox_table').DataTable({ $('#templates_mbox_table').DataTable({
responsive : true, responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -1285,8 +1290,10 @@ jQuery(function($){
} }
$('#resource_table').DataTable({ $('#resource_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -1411,8 +1418,10 @@ jQuery(function($){
} }
$('#bcc_table').DataTable({ $('#bcc_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -1507,8 +1516,10 @@ jQuery(function($){
} }
$('#recipient_map_table').DataTable({ $('#recipient_map_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -1590,8 +1601,10 @@ jQuery(function($){
} }
$('#tls_policy_table').DataTable({ $('#tls_policy_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -1683,8 +1696,10 @@ jQuery(function($){
} }
$('#alias_table').DataTable({ $('#alias_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -1823,8 +1838,10 @@ jQuery(function($){
} }
$('#aliasdomain_table').DataTable({ $('#aliasdomain_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -1905,8 +1922,10 @@ jQuery(function($){
} }
$('#sync_job_table').DataTable({ $('#sync_job_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -2044,9 +2063,11 @@ jQuery(function($){
} }
var table = $('#filter_table').DataTable({ var table = $('#filter_table').DataTable({
responsive: true,
autoWidth: false, autoWidth: false,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",

View File

@ -14,8 +14,10 @@ jQuery(function($){
}); });
function draw_quarantine_table() { function draw_quarantine_table() {
$('#quarantinetable').DataTable({ $('#quarantinetable').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -129,9 +131,15 @@ jQuery(function($){
title: lang.received, title: lang.received,
data: 'created', data: 'created',
defaultContent: '', defaultContent: '',
render: function (data,type) { createdCell: function(td, cellData) {
var date = new Date(data ? data * 1000 : 0); $(td).attr({
return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"}); "data-order": cellData,
"data-sort": cellData
});
var date = new Date(cellData ? cellData * 1000 : 0);
var dateString = date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});
$(td).html(dateString);
} }
}, },
{ {

View File

@ -35,8 +35,10 @@ jQuery(function($){
} }
$('#queuetable').DataTable({ $('#queuetable').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",

View File

@ -135,8 +135,10 @@ jQuery(function($){
} }
$('#tla_table').DataTable({ $('#tla_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -216,8 +218,10 @@ jQuery(function($){
} }
$('#sync_job_table').DataTable({ $('#sync_job_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -366,8 +370,10 @@ jQuery(function($){
} }
$('#app_passwd_table').DataTable({ $('#app_passwd_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -456,8 +462,10 @@ jQuery(function($){
} }
$('#wl_policy_mailbox_table').DataTable({ $('#wl_policy_mailbox_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",
@ -521,8 +529,10 @@ jQuery(function($){
} }
$('#bl_policy_mailbox_table').DataTable({ $('#bl_policy_mailbox_table').DataTable({
responsive: true,
processing: true, processing: true,
serverSide: false, serverSide: false,
stateSave: true,
language: lang_datatables, language: lang_datatables,
ajax: { ajax: {
type: "GET", type: "GET",