[BS5] fix datatables
This commit is contained in:
parent
ad43253a90
commit
c9b883dff5
@ -62,6 +62,12 @@ jQuery(function($){
|
|||||||
$('#' + table_name).DataTable().ajax.reload();
|
$('#' + table_name).DataTable().ajax.reload();
|
||||||
});
|
});
|
||||||
function draw_domain_admins() {
|
function draw_domain_admins() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#domainadminstable') ) {
|
||||||
|
$('#domainadminstable').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#domainadminstable').DataTable({
|
$('#domainadminstable').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -70,6 +76,7 @@ jQuery(function($){
|
|||||||
type: "GET",
|
type: "GET",
|
||||||
url: "/api/v1/get/domain-admin/all",
|
url: "/api/v1/get/domain-admin/all",
|
||||||
dataSrc: function(data){
|
dataSrc: function(data){
|
||||||
|
console.log(data);
|
||||||
return process_table_data(data, 'domainadminstable');
|
return process_table_data(data, 'domainadminstable');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -94,6 +101,11 @@ jQuery(function($){
|
|||||||
data: 'username',
|
data: 'username',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: lang.admin_domains,
|
||||||
|
data: 'selected_domains',
|
||||||
|
defaultContent: '',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "TFA",
|
title: "TFA",
|
||||||
data: 'tfa_active',
|
data: 'tfa_active',
|
||||||
@ -103,14 +115,6 @@ jQuery(function($){
|
|||||||
else return '<i class="bi bi-x-lg"></i>'
|
else return '<i class="bi bi-x-lg"></i>'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.admin_domains,
|
|
||||||
data: 'tfa_active',
|
|
||||||
defaultContent: '',
|
|
||||||
render: function (data, type) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.active,
|
title: lang.active,
|
||||||
data: 'active',
|
data: 'active',
|
||||||
@ -128,11 +132,17 @@ jQuery(function($){
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
initComplete: function(settings, json){
|
initComplete: function(settings, json){
|
||||||
console.log(settings.aoColumns);
|
console.log(settings);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_oauth2_clients() {
|
function draw_oauth2_clients() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#oauth2clientstable') ) {
|
||||||
|
$('#oauth2clientstable').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#oauth2clientstable').DataTable({
|
$('#oauth2clientstable').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -190,6 +200,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_admins() {
|
function draw_admins() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#adminstable') ) {
|
||||||
|
$('#adminstable').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#adminstable').DataTable({
|
$('#adminstable').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -250,6 +266,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_fwd_hosts() {
|
function draw_fwd_hosts() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#forwardinghoststable') ) {
|
||||||
|
$('#forwardinghoststable').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#forwardinghoststable').DataTable({
|
$('#forwardinghoststable').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -302,6 +324,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_relayhosts() {
|
function draw_relayhosts() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#relayhoststable') ) {
|
||||||
|
$('#relayhoststable').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#relayhoststable').DataTable({
|
$('#relayhoststable').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -352,7 +380,11 @@ jQuery(function($){
|
|||||||
{
|
{
|
||||||
title: lang.active,
|
title: lang.active,
|
||||||
data: 'active',
|
data: 'active',
|
||||||
defaultContent: ''
|
defaultContent: '',
|
||||||
|
render: function (data, type) {
|
||||||
|
if(data == 1) return '<i class="bi bi-check-lg"></i>';
|
||||||
|
else return '<i class="bi bi-x-lg"></i>'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.action,
|
title: lang.action,
|
||||||
@ -364,6 +396,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_transport_maps() {
|
function draw_transport_maps() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#transportstable') ) {
|
||||||
|
$('#transportstable').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#transportstable').DataTable({
|
$('#transportstable').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -414,7 +452,11 @@ jQuery(function($){
|
|||||||
{
|
{
|
||||||
title: lang.active,
|
title: lang.active,
|
||||||
data: 'active',
|
data: 'active',
|
||||||
defaultContent: ''
|
defaultContent: '',
|
||||||
|
render: function (data, type) {
|
||||||
|
if(data == 1) return '<i class="bi bi-check-lg"></i>';
|
||||||
|
else return '<i class="bi bi-x-lg"></i>'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.action,
|
title: lang.action,
|
||||||
@ -426,6 +468,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_queue() {
|
function draw_queue() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#queuetable') ) {
|
||||||
|
$('#queuetable').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#queuetable').DataTable({
|
$('#queuetable').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -594,7 +642,6 @@ jQuery(function($){
|
|||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if(entry.intersectionRatio > 0) {
|
if(entry.intersectionRatio > 0) {
|
||||||
callback(element_object);
|
callback(element_object);
|
||||||
observer.disconnect();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).observe(element_object);
|
}).observe(element_object);
|
||||||
@ -687,7 +734,7 @@ jQuery(function($){
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
prev = $('#test_transport').text();
|
prev = $('#test_transport').text();
|
||||||
$(this).prop("disabled",true);
|
$(this).prop("disabled",true);
|
||||||
$(this).html('<i class="bi bi-arrow-repeat icon-spin"></i> ');
|
$(this).html('<div class="spinner-border" role="status"><span class="visually-hidden">Loading...</span></div> ');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
url: 'inc/ajax/transport_check.php',
|
url: 'inc/ajax/transport_check.php',
|
||||||
|
@ -55,6 +55,12 @@ jQuery(function($){
|
|||||||
$('#' + table_name).DataTable().ajax.reload();
|
$('#' + table_name).DataTable().ajax.reload();
|
||||||
});
|
});
|
||||||
function draw_autodiscover_logs() {
|
function draw_autodiscover_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#autodiscover_log') ) {
|
||||||
|
$('#autodiscover_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#autodiscover_log').DataTable({
|
$('#autodiscover_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -101,6 +107,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_postfix_logs() {
|
function draw_postfix_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#postfix_log') ) {
|
||||||
|
$('#postfix_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#postfix_log').DataTable({
|
$('#postfix_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -137,6 +149,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_watchdog_logs() {
|
function draw_watchdog_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#watchdog_log') ) {
|
||||||
|
$('#watchdog_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#watchdog_log').DataTable({
|
$('#watchdog_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -178,6 +196,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_api_logs() {
|
function draw_api_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#api_log') ) {
|
||||||
|
$('#api_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#api_log').DataTable({
|
$('#api_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -224,6 +248,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_rl_logs() {
|
function draw_rl_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#rl_log') ) {
|
||||||
|
$('#rl_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#rl_log').DataTable({
|
$('#rl_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -310,6 +340,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_ui_logs() {
|
function draw_ui_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#ui_logs') ) {
|
||||||
|
$('#ui_logs').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#ui_logs').DataTable({
|
$('#ui_logs').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -371,6 +407,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_sasl_logs() {
|
function draw_sasl_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#sasl_logs') ) {
|
||||||
|
$('#sasl_logs').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#sasl_logs').DataTable({
|
$('#sasl_logs').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -412,6 +454,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_acme_logs() {
|
function draw_acme_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#acme_log') ) {
|
||||||
|
$('#acme_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#acme_log').DataTable({
|
$('#acme_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -443,6 +491,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_netfilter_logs() {
|
function draw_netfilter_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#netfilter_log') ) {
|
||||||
|
$('#netfilter_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#netfilter_log').DataTable({
|
$('#netfilter_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -479,6 +533,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_sogo_logs() {
|
function draw_sogo_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#sogo_log') ) {
|
||||||
|
$('#sogo_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#sogo_log').DataTable({
|
$('#sogo_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -515,6 +575,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_dovecot_logs() {
|
function draw_dovecot_logs() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#dovecot_log') ) {
|
||||||
|
$('#dovecot_log').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#dovecot_log').DataTable({
|
$('#dovecot_log').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -612,6 +678,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_rspamd_history() {
|
function draw_rspamd_history() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#rspamd_history') ) {
|
||||||
|
$('#rspamd_history').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#rspamd_history').DataTable({
|
$('#rspamd_history').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -906,7 +978,6 @@ jQuery(function($){
|
|||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if(entry.intersectionRatio > 0) {
|
if(entry.intersectionRatio > 0) {
|
||||||
callback(element_object);
|
callback(element_object);
|
||||||
observer.disconnect();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).observe(element_object);
|
}).observe(element_object);
|
||||||
|
@ -186,19 +186,25 @@ $(document).ready(function() {
|
|||||||
$("#multiple_bookings").val($("#multiple_bookings_custom").val());
|
$("#multiple_bookings").val($("#multiple_bookings_custom").val());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
||||||
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
|
||||||
function unix_time_format(i){return""==i?'<i class="bi bi-x-lg"></i>':new Date(i?1e3*i:0).toLocaleDateString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}
|
function unix_time_format(i){return""==i?'<i class="bi bi-x"></i>':new Date(i?1e3*i:0).toLocaleDateString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}
|
||||||
|
|
||||||
$(".refresh_table").on('click', function(e) {
|
$(".refresh_table").on('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var table_name = $(this).data('table');
|
var table_name = $(this).data('table');
|
||||||
$('#' + table_name).DataTable().ajax.reload();
|
$('#' + table_name).DataTable().ajax.reload();
|
||||||
});
|
});
|
||||||
function draw_domain_table() {
|
function draw_domain_table() {
|
||||||
$('#domain_table').DataTable({
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#domain_table') ) {
|
||||||
|
$('#domain_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var table = $('#domain_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
language: lang_datatables,
|
language: lang_datatables,
|
||||||
@ -282,12 +288,12 @@ jQuery(function($){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.aliases,
|
title: lang.aliases,
|
||||||
data: 'aliases_in_domain',
|
data: 'aliases',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.mailboxes,
|
title: lang.mailboxes,
|
||||||
data: 'mboxes_in_domain',
|
data: 'mailboxes',
|
||||||
responsivePriority: 4,
|
responsivePriority: 4,
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
@ -346,6 +352,7 @@ jQuery(function($){
|
|||||||
title: lang.active,
|
title: lang.active,
|
||||||
data: 'active',
|
data: 'active',
|
||||||
defaultContent: '',
|
defaultContent: '',
|
||||||
|
responsivePriority: 5,
|
||||||
render: function (data, type) {
|
render: function (data, type) {
|
||||||
return 1==data?'<i class="bi bi-check-lg"></i>':(0==data?'<i class="bi bi-x-lg"></i>':2==data&&'—');
|
return 1==data?'<i class="bi bi-check-lg"></i>':(0==data?'<i class="bi bi-x-lg"></i>':2==data&&'—');
|
||||||
}
|
}
|
||||||
@ -361,6 +368,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_mailbox_table() {
|
function draw_mailbox_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#mailbox_table') ) {
|
||||||
|
$('#mailbox_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#mailbox_table').DataTable({
|
$('#mailbox_table').DataTable({
|
||||||
responsive : true,
|
responsive : true,
|
||||||
processing: true,
|
processing: true,
|
||||||
@ -472,9 +485,43 @@ jQuery(function($){
|
|||||||
{
|
{
|
||||||
title: lang.username,
|
title: lang.username,
|
||||||
data: 'username',
|
data: 'username',
|
||||||
responsivePriority: 3,
|
responsivePriority: 1,
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: lang.domain_quota,
|
||||||
|
data: 'quota',
|
||||||
|
responsivePriority: 2,
|
||||||
|
defaultContent: '',
|
||||||
|
render: function (data, type) {
|
||||||
|
data = data.split("/");
|
||||||
|
var of_q = (data[1] == 0 ? "∞" : humanFileSize(data[1]));
|
||||||
|
return humanFileSize(data[0]) + " / " + of_q;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: lang.last_mail_login,
|
||||||
|
data: 'last_mail_login',
|
||||||
|
defaultContent: '',
|
||||||
|
responsivePriority: 3,
|
||||||
|
render: function (data, type) {
|
||||||
|
res = data.split("/");
|
||||||
|
return '<div class="badge bg-info mb-2">IMAP @ ' + unix_time_format(Number(res[0])) + '</div><br>' +
|
||||||
|
'<div class="badge bg-info mb-2">POP3 @ ' + unix_time_format(Number(res[1])) + '</div><br>' +
|
||||||
|
'<div class="badge bg-info">SMTP @ ' + unix_time_format(Number(res[2])) + '</div>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: lang.last_pw_change,
|
||||||
|
data: 'last_pw_change',
|
||||||
|
defaultContent: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: lang.in_use,
|
||||||
|
data: 'in_use',
|
||||||
|
defaultContent: '',
|
||||||
|
responsivePriority: 4
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: lang.fname,
|
title: lang.fname,
|
||||||
data: 'name',
|
data: 'name',
|
||||||
@ -485,17 +532,6 @@ jQuery(function($){
|
|||||||
data: 'domain',
|
data: 'domain',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.domain_quota,
|
|
||||||
data: 'quota',
|
|
||||||
responsivePriority: 4,
|
|
||||||
defaultContent: '',
|
|
||||||
render: function (data, type) {
|
|
||||||
data = data.split("/");
|
|
||||||
var of_q = (data[1] == 0 ? "∞" : humanFileSize(data[1]));
|
|
||||||
return humanFileSize(data[0]) + " / " + of_q;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.tls_enforce_in,
|
title: lang.tls_enforce_in,
|
||||||
data: 'tls_enforce_in',
|
data: 'tls_enforce_in',
|
||||||
@ -521,16 +557,6 @@ jQuery(function($){
|
|||||||
data: 'pop3_access',
|
data: 'pop3_access',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.last_mail_login,
|
|
||||||
data: 'last_mail_login',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: lang.last_pw_change,
|
|
||||||
data: 'last_pw_change',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.quarantine_notification,
|
title: lang.quarantine_notification,
|
||||||
data: 'quarantine_notification',
|
data: 'quarantine_notification',
|
||||||
@ -541,15 +567,11 @@ jQuery(function($){
|
|||||||
data: 'quarantine_category',
|
data: 'quarantine_category',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.in_use,
|
|
||||||
data: 'in_use',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.msg_num,
|
title: lang.msg_num,
|
||||||
data: 'messages',
|
data: 'messages',
|
||||||
defaultContent: ''
|
defaultContent: '',
|
||||||
|
responsivePriority: 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Tags',
|
title: 'Tags',
|
||||||
@ -560,6 +582,7 @@ jQuery(function($){
|
|||||||
title: lang.active,
|
title: lang.active,
|
||||||
data: 'active',
|
data: 'active',
|
||||||
defaultContent: '',
|
defaultContent: '',
|
||||||
|
responsivePriority: 6,
|
||||||
render: function (data, type) {
|
render: function (data, type) {
|
||||||
return 1==data?'<i class="bi bi-check-lg"></i>':(0==data?'<i class="bi bi-x-lg"></i>':2==data&&'—');
|
return 1==data?'<i class="bi bi-check-lg"></i>':(0==data?'<i class="bi bi-x-lg"></i>':2==data&&'—');
|
||||||
}
|
}
|
||||||
@ -575,6 +598,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_resource_table() {
|
function draw_resource_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#resource_table') ) {
|
||||||
|
$('#resource_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#resource_table').DataTable({
|
$('#resource_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -667,6 +696,40 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_bcc_table() {
|
function draw_bcc_table() {
|
||||||
|
$.get("/api/v1/get/bcc-destination-options", function(data){
|
||||||
|
// Domains
|
||||||
|
var optgroup = "<optgroup label='" + lang.domains + "'>";
|
||||||
|
$.each(data.domains, function(index, domain){
|
||||||
|
optgroup += "<option value='" + domain + "'>" + domain + "</option>"
|
||||||
|
});
|
||||||
|
optgroup += "</optgroup>"
|
||||||
|
$('#bcc-local-dest').append(optgroup);
|
||||||
|
// Alias domains
|
||||||
|
var optgroup = "<optgroup label='" + lang.domain_aliases + "'>";
|
||||||
|
$.each(data.alias_domains, function(index, alias_domain){
|
||||||
|
optgroup += "<option value='" + alias_domain + "'>" + alias_domain + "</option>"
|
||||||
|
});
|
||||||
|
optgroup += "</optgroup>"
|
||||||
|
$('#bcc-local-dest').append(optgroup);
|
||||||
|
// Mailboxes and aliases
|
||||||
|
$.each(data.mailboxes, function(mailbox, aliases){
|
||||||
|
var optgroup = "<optgroup label='" + mailbox + "'>";
|
||||||
|
$.each(aliases, function(index, alias){
|
||||||
|
optgroup += "<option value='" + alias + "'>" + alias + "</option>"
|
||||||
|
});
|
||||||
|
optgroup += "</optgroup>"
|
||||||
|
$('#bcc-local-dest').append(optgroup);
|
||||||
|
});
|
||||||
|
// Finish
|
||||||
|
$('#bcc-local-dest').selectpicker('refresh');
|
||||||
|
});
|
||||||
|
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#bcc_table') ) {
|
||||||
|
$('#bcc_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#bcc_table').DataTable({
|
$('#bcc_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -757,6 +820,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_recipient_map_table() {
|
function draw_recipient_map_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#recipient_map_table') ) {
|
||||||
|
$('#recipient_map_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#recipient_map_table').DataTable({
|
$('#recipient_map_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -833,6 +902,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_tls_policy_table() {
|
function draw_tls_policy_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#tls_policy_table') ) {
|
||||||
|
$('#tls_policy_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#tls_policy_table').DataTable({
|
$('#tls_policy_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -925,6 +1000,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_alias_table() {
|
function draw_alias_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#alias_table') ) {
|
||||||
|
$('#alias_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#alias_table').DataTable({
|
$('#alias_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -1010,15 +1091,24 @@ jQuery(function($){
|
|||||||
data: 'goto',
|
data: 'goto',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: lang.domain,
|
||||||
|
data: 'domain',
|
||||||
|
defaultContent: '',
|
||||||
|
responsivePriority: 5,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: lang.bcc_destinations,
|
title: lang.bcc_destinations,
|
||||||
data: 'bcc_dest',
|
data: 'bcc_dest',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.domain,
|
title: lang.sogo_visible,
|
||||||
data: 'domain',
|
data: 'sogo_visible',
|
||||||
defaultContent: ''
|
defaultContent: '',
|
||||||
|
render: function(data, type){
|
||||||
|
return 1==data?'<i class="bi bi-check-lg"></i>':0==data&&'<i class="bi bi-x-lg"></i>';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.public_comment,
|
title: lang.public_comment,
|
||||||
@ -1030,15 +1120,11 @@ jQuery(function($){
|
|||||||
data: 'private_comment',
|
data: 'private_comment',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.sogo_visible,
|
|
||||||
data: 'sogo_visible',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.active,
|
title: lang.active,
|
||||||
data: 'active',
|
data: 'active',
|
||||||
defaultContent: '',
|
defaultContent: '',
|
||||||
|
responsivePriority: 6,
|
||||||
render: function (data, type) {
|
render: function (data, type) {
|
||||||
return 1==data?'<i class="bi bi-check-lg"></i>':0==data&&'<i class="bi bi-x-lg"></i>';
|
return 1==data?'<i class="bi bi-check-lg"></i>':0==data&&'<i class="bi bi-x-lg"></i>';
|
||||||
}
|
}
|
||||||
@ -1054,6 +1140,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_aliasdomain_table() {
|
function draw_aliasdomain_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#aliasdomain_table') ) {
|
||||||
|
$('#aliasdomain_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#aliasdomain_table').DataTable({
|
$('#aliasdomain_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -1109,21 +1201,6 @@ jQuery(function($){
|
|||||||
responsivePriority: 4,
|
responsivePriority: 4,
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.bcc_local_dest,
|
|
||||||
data: 'local_dest',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: lang.bcc_destinations,
|
|
||||||
data: 'bcc_dest',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: lang.domain,
|
|
||||||
data: 'domain',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.active,
|
title: lang.active,
|
||||||
data: 'active',
|
data: 'active',
|
||||||
@ -1143,6 +1220,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_sync_job_table() {
|
function draw_sync_job_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#sync_job_table') ) {
|
||||||
|
$('#sync_job_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#sync_job_table').DataTable({
|
$('#sync_job_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -1225,16 +1308,6 @@ jQuery(function($){
|
|||||||
data: 'server_w_port',
|
data: 'server_w_port',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.excludes,
|
|
||||||
data: 'exclude',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: lang.mins_interval,
|
|
||||||
data: 'mins_interval',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.last_run,
|
title: lang.last_run,
|
||||||
data: 'last_run',
|
data: 'last_run',
|
||||||
@ -1246,8 +1319,8 @@ jQuery(function($){
|
|||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.status,
|
title: 'Log',
|
||||||
data: 'is_running',
|
data: 'log',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1259,8 +1332,18 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Log',
|
title: lang.status,
|
||||||
data: 'log',
|
data: 'is_running',
|
||||||
|
defaultContent: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: lang.excludes,
|
||||||
|
data: 'exclude',
|
||||||
|
defaultContent: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: lang.mins_interval,
|
||||||
|
data: 'mins_interval',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1274,7 +1357,14 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_filter_table() {
|
function draw_filter_table() {
|
||||||
$('#filter_table').DataTable({
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#filter_table') ) {
|
||||||
|
$('#filter_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var table = $('#filter_table').DataTable({
|
||||||
|
autoWidth: false,
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
language: lang_datatables,
|
language: lang_datatables,
|
||||||
@ -1321,12 +1411,13 @@ jQuery(function($){
|
|||||||
{
|
{
|
||||||
title: 'ID',
|
title: 'ID',
|
||||||
data: 'id',
|
data: 'id',
|
||||||
responsivePriority: 3,
|
responsivePriority: 2,
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.active,
|
title: lang.active,
|
||||||
data: 'active',
|
data: 'active',
|
||||||
|
responsivePriority: 3,
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1348,7 +1439,8 @@ jQuery(function($){
|
|||||||
{
|
{
|
||||||
title: 'Script',
|
title: 'Script',
|
||||||
data: 'script_data',
|
data: 'script_data',
|
||||||
defaultContent: ''
|
defaultContent: '',
|
||||||
|
className: 'none'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.action,
|
title: lang.action,
|
||||||
@ -1371,7 +1463,6 @@ jQuery(function($){
|
|||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if(entry.intersectionRatio > 0) {
|
if(entry.intersectionRatio > 0) {
|
||||||
callback(element_object);
|
callback(element_object);
|
||||||
observer.disconnect();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).observe(element_object);
|
}).observe(element_object);
|
||||||
|
@ -128,6 +128,12 @@ jQuery(function($){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function draw_tla_table() {
|
function draw_tla_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#tla_table') ) {
|
||||||
|
$('#tla_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#tla_table').DataTable({
|
$('#tla_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -184,6 +190,15 @@ jQuery(function($){
|
|||||||
return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});
|
return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: lang.created_on,
|
||||||
|
data: 'created',
|
||||||
|
defaultContent: '',
|
||||||
|
render: function (data, type) {
|
||||||
|
var date = new Date(data.replace(/-/g, "/"));
|
||||||
|
return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: lang.action,
|
title: lang.action,
|
||||||
data: 'action',
|
data: 'action',
|
||||||
@ -194,6 +209,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_sync_job_table() {
|
function draw_sync_job_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#sync_job_table') ) {
|
||||||
|
$('#sync_job_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#sync_job_table').DataTable({
|
$('#sync_job_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -267,33 +288,19 @@ jQuery(function($){
|
|||||||
{
|
{
|
||||||
title: 'ID',
|
title: 'ID',
|
||||||
data: 'id',
|
data: 'id',
|
||||||
defaultContent: ''
|
defaultContent: '',
|
||||||
|
responsivePriority: 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Server',
|
title: 'Server',
|
||||||
data: 'server_w_port',
|
data: 'server_w_port',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.encryption,
|
|
||||||
data: 'enc1',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.username,
|
title: lang.username,
|
||||||
data: 'user1',
|
data: 'user1',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: lang.excludes,
|
|
||||||
data: 'exclude',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: lang.interval + " (min)",
|
|
||||||
data: 'mins_interval',
|
|
||||||
defaultContent: ''
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: lang.last_run,
|
title: lang.last_run,
|
||||||
data: 'last_run',
|
data: 'last_run',
|
||||||
@ -320,18 +327,41 @@ jQuery(function($){
|
|||||||
{
|
{
|
||||||
title: lang.status,
|
title: lang.status,
|
||||||
data: 'is_running',
|
data: 'is_running',
|
||||||
|
defaultContent: '',
|
||||||
|
responsivePriority: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: lang.encryption,
|
||||||
|
data: 'enc1',
|
||||||
|
defaultContent: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: lang.excludes,
|
||||||
|
data: 'exclude',
|
||||||
|
defaultContent: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: lang.interval + " (min)",
|
||||||
|
data: 'mins_interval',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.action,
|
title: lang.action,
|
||||||
data: 'action',
|
data: 'action',
|
||||||
className: 'text-md-end dt-sm-head-hidden dt-body-right',
|
className: 'text-md-end dt-sm-head-hidden dt-body-right',
|
||||||
defaultContent: ''
|
defaultContent: '',
|
||||||
|
responsivePriority: 5
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_app_passwd_table() {
|
function draw_app_passwd_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#app_passwd_table') ) {
|
||||||
|
$('#app_passwd_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#app_passwd_table').DataTable({
|
$('#app_passwd_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -416,6 +446,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_wl_policy_mailbox_table() {
|
function draw_wl_policy_mailbox_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#wl_policy_mailbox_table') ) {
|
||||||
|
$('#wl_policy_mailbox_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#wl_policy_mailbox_table').DataTable({
|
$('#wl_policy_mailbox_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -463,7 +499,7 @@ jQuery(function($){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.spamfilter_table_rule,
|
title: lang.spamfilter_table_rule,
|
||||||
data: 'name',
|
data: 'value',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -475,6 +511,12 @@ jQuery(function($){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function draw_bl_policy_mailbox_table() {
|
function draw_bl_policy_mailbox_table() {
|
||||||
|
// just recalc width if instance already exists
|
||||||
|
if ($.fn.DataTable.isDataTable('#bl_policy_mailbox_table') ) {
|
||||||
|
$('#bl_policy_mailbox_table').DataTable().columns.adjust().responsive.recalc();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$('#bl_policy_mailbox_table').DataTable({
|
$('#bl_policy_mailbox_table').DataTable({
|
||||||
processing: true,
|
processing: true,
|
||||||
serverSide: false,
|
serverSide: false,
|
||||||
@ -522,7 +564,7 @@ jQuery(function($){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: lang.spamfilter_table_rule,
|
title: lang.spamfilter_table_rule,
|
||||||
data: 'name',
|
data: 'value',
|
||||||
defaultContent: ''
|
defaultContent: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -576,7 +618,6 @@ jQuery(function($){
|
|||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if(entry.intersectionRatio > 0) {
|
if(entry.intersectionRatio > 0) {
|
||||||
callback(element_object);
|
callback(element_object);
|
||||||
observer.disconnect();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).observe(element_object);
|
}).observe(element_object);
|
||||||
|
Loading…
Reference in New Issue
Block a user