[Web] Small UI fixes

master
andryyy 2021-05-23 23:09:37 +02:00
parent 233179daf1
commit bbb1d7aa39
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
4 changed files with 15 additions and 9 deletions

View File

@ -241,4 +241,4 @@ table.footable>tbody>tr.footable-empty>td {
} }
legend > [class^="bi-"]::before, legend > [class*=" bi-"]::before { legend > [class^="bi-"]::before, legend > [class*=" bi-"]::before {
vertical-align: 0em !important; vertical-align: 0em !important;
} }

View File

@ -79,6 +79,7 @@ $(document).ready(function() {
foreach($alertbox_log_parser as $log) { foreach($alertbox_log_parser as $log) {
$alerts[$log['type']][] = $log['msg']; $alerts[$log['type']][] = $log['msg'];
} }
$alerts = array_filter(array_unique($alerts));
foreach($alerts as $alert_type => $alert_msg) { foreach($alerts as $alert_type => $alert_msg) {
?> ?>
mailcow_alert_box(<?=json_encode(implode('<hr class="alert-hr">', $alert_msg));?>, <?=$alert_type;?>); mailcow_alert_box(<?=json_encode(implode('<hr class="alert-hr">', $alert_msg));?>, <?=$alert_type;?>);

View File

@ -358,6 +358,11 @@ jQuery(function($){
draw_oauth2_clients(); draw_oauth2_clients();
draw_transport_maps(); draw_transport_maps();
draw_queue(); draw_queue();
$('body').on('click', 'span.footable-toggle', function () {
event.stopPropagation();
})
// API IP check toggle // API IP check toggle
$("#skip_ip_check_ro").click(function( event ) { $("#skip_ip_check_ro").click(function( event ) {
$("#skip_ip_check_ro").not(this).prop('checked', false); $("#skip_ip_check_ro").not(this).prop('checked', false);

View File

@ -235,7 +235,7 @@ jQuery(function($){
function draw_domain_table() { function draw_domain_table() {
ft_domain_table = FooTable.init('#domain_table', { ft_domain_table = FooTable.init('#domain_table', {
"columns": [ "columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"sorted": true,"name":"domain_name","title":lang.domain,"style":{"width":"250px"}}, {"sorted": true,"name":"domain_name","title":lang.domain,"style":{"width":"250px"}},
{"name":"aliases","title":lang.aliases,"breakpoints":"xs sm"}, {"name":"aliases","title":lang.aliases,"breakpoints":"xs sm"},
{"name":"mailboxes","title":lang.mailboxes}, {"name":"mailboxes","title":lang.mailboxes},
@ -340,7 +340,7 @@ jQuery(function($){
function draw_mailbox_table() { function draw_mailbox_table() {
ft_mailbox_table = FooTable.init('#mailbox_table', { ft_mailbox_table = FooTable.init('#mailbox_table', {
"columns": [ "columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"sorted": true,"name":"username","style":{"word-break":"break-all","min-width":"120px"},"title":lang.username}, {"sorted": true,"name":"username","style":{"word-break":"break-all","min-width":"120px"},"title":lang.username},
{"name":"name","title":lang.fname,"style":{"word-break":"break-all","min-width":"120px"},"breakpoints":"xs sm md lg"}, {"name":"name","title":lang.fname,"style":{"word-break":"break-all","min-width":"120px"},"breakpoints":"xs sm md lg"},
{"name":"domain","title":lang.domain,"breakpoints":"xs sm md lg"}, {"name":"domain","title":lang.domain,"breakpoints":"xs sm md lg"},
@ -491,7 +491,7 @@ jQuery(function($){
function draw_resource_table() { function draw_resource_table() {
ft_resource_table = FooTable.init('#resource_table', { ft_resource_table = FooTable.init('#resource_table', {
"columns": [ "columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"sorted": true,"name":"description","title":lang.description,"style":{"width":"250px"}}, {"sorted": true,"name":"description","title":lang.description,"style":{"width":"250px"}},
{"name":"name","title":lang.alias}, {"name":"name","title":lang.alias},
{"name":"kind","title":lang.kind}, {"name":"kind","title":lang.kind},
@ -564,7 +564,7 @@ jQuery(function($){
function draw_bcc_table() { function draw_bcc_table() {
ft_bcc_table = FooTable.init('#bcc_table', { ft_bcc_table = FooTable.init('#bcc_table', {
"columns": [ "columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}}, {"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}},
{"name":"type","title":lang.bcc_type}, {"name":"type","title":lang.bcc_type},
{"name":"local_dest","title":lang.bcc_local_dest}, {"name":"local_dest","title":lang.bcc_local_dest},
@ -633,7 +633,7 @@ jQuery(function($){
function draw_recipient_map_table() { function draw_recipient_map_table() {
ft_recipient_map_table = FooTable.init('#recipient_map_table', { ft_recipient_map_table = FooTable.init('#recipient_map_table', {
"columns": [ "columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}}, {"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}},
{"name":"recipient_map_old","title":lang.recipient_map_old}, {"name":"recipient_map_old","title":lang.recipient_map_old},
{"name":"recipient_map_new","title":lang.recipient_map_new}, {"name":"recipient_map_new","title":lang.recipient_map_new},
@ -697,7 +697,7 @@ jQuery(function($){
function draw_tls_policy_table() { function draw_tls_policy_table() {
ft_tls_policy_table = FooTable.init('#tls_policy_table', { ft_tls_policy_table = FooTable.init('#tls_policy_table', {
"columns": [ "columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}}, {"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}},
{"name":"dest","title":lang.tls_map_dest}, {"name":"dest","title":lang.tls_map_dest},
{"name":"policy","title":lang.tls_map_policy}, {"name":"policy","title":lang.tls_map_policy},
@ -767,7 +767,7 @@ jQuery(function($){
function draw_alias_table() { function draw_alias_table() {
ft_alias_table = FooTable.init('#alias_table', { ft_alias_table = FooTable.init('#alias_table', {
"columns": [ "columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}}, {"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}},
{"sorted": true,"name":"address","title":lang.alias,"style":{"width":"250px"}}, {"sorted": true,"name":"address","title":lang.alias,"style":{"width":"250px"}},
{"name":"goto","title":lang.target_address}, {"name":"goto","title":lang.target_address},
@ -866,7 +866,7 @@ jQuery(function($){
function draw_aliasdomain_table() { function draw_aliasdomain_table() {
ft_aliasdomain_table = FooTable.init('#aliasdomain_table', { ft_aliasdomain_table = FooTable.init('#aliasdomain_table', {
"columns": [ "columns": [
{"name":"chkbox","title":"","style":{"maxWidth":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"}, {"name":"chkbox","title":"","style":{"min-width":"60px","width":"60px"},"filterable": false,"sortable": false,"type":"html"},
{"sorted": true,"name":"alias_domain","title":lang.alias,"style":{"width":"250px"}}, {"sorted": true,"name":"alias_domain","title":lang.alias,"style":{"width":"250px"}},
{"name":"target_domain","title":lang.target_domain,"type":"html"}, {"name":"target_domain","title":lang.target_domain,"type":"html"},
{"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'<i class="bi bi-check-lg"></i>':0==value&&'<i class="bi bi-x-lg"></i>';}}, {"name":"active","filterable": false,"style":{"maxWidth":"80px","width":"80px"},"title":lang.active,"formatter": function(value){return 1==value?'<i class="bi bi-check-lg"></i>':0==value&&'<i class="bi bi-x-lg"></i>';}},