From bbb1d7aa39d612c428d02c2d51b948d1368d8224 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 23 May 2021 23:09:37 +0200 Subject: [PATCH] [Web] Small UI fixes --- data/web/css/build/008-mailcow.css | 2 +- data/web/inc/footer.inc.php | 1 + data/web/js/site/admin.js | 5 +++++ data/web/js/site/mailbox.js | 16 ++++++++-------- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/data/web/css/build/008-mailcow.css b/data/web/css/build/008-mailcow.css index 8af1f96a..cdd44817 100644 --- a/data/web/css/build/008-mailcow.css +++ b/data/web/css/build/008-mailcow.css @@ -241,4 +241,4 @@ table.footable>tbody>tr.footable-empty>td { } legend > [class^="bi-"]::before, legend > [class*=" bi-"]::before { vertical-align: 0em !important; -} \ No newline at end of file +} diff --git a/data/web/inc/footer.inc.php b/data/web/inc/footer.inc.php index 3d0389f2..f99c86db 100644 --- a/data/web/inc/footer.inc.php +++ b/data/web/inc/footer.inc.php @@ -79,6 +79,7 @@ $(document).ready(function() { foreach($alertbox_log_parser as $log) { $alerts[$log['type']][] = $log['msg']; } + $alerts = array_filter(array_unique($alerts)); foreach($alerts as $alert_type => $alert_msg) { ?> mailcow_alert_box(', $alert_msg));?>, ); diff --git a/data/web/js/site/admin.js b/data/web/js/site/admin.js index dd9ba83e..ffaf5dff 100644 --- a/data/web/js/site/admin.js +++ b/data/web/js/site/admin.js @@ -358,6 +358,11 @@ jQuery(function($){ draw_oauth2_clients(); draw_transport_maps(); draw_queue(); + + $('body').on('click', 'span.footable-toggle', function () { + event.stopPropagation(); + }) + // API IP check toggle $("#skip_ip_check_ro").click(function( event ) { $("#skip_ip_check_ro").not(this).prop('checked', false); diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index ee488670..b7896f8d 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -235,7 +235,7 @@ jQuery(function($){ function draw_domain_table() { ft_domain_table = FooTable.init('#domain_table', { "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"}}, {"name":"aliases","title":lang.aliases,"breakpoints":"xs sm"}, {"name":"mailboxes","title":lang.mailboxes}, @@ -340,7 +340,7 @@ jQuery(function($){ function draw_mailbox_table() { ft_mailbox_table = FooTable.init('#mailbox_table', { "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}, {"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"}, @@ -491,7 +491,7 @@ jQuery(function($){ function draw_resource_table() { ft_resource_table = FooTable.init('#resource_table', { "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"}}, {"name":"name","title":lang.alias}, {"name":"kind","title":lang.kind}, @@ -564,7 +564,7 @@ jQuery(function($){ function draw_bcc_table() { ft_bcc_table = FooTable.init('#bcc_table', { "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"}}, {"name":"type","title":lang.bcc_type}, {"name":"local_dest","title":lang.bcc_local_dest}, @@ -633,7 +633,7 @@ jQuery(function($){ function draw_recipient_map_table() { ft_recipient_map_table = FooTable.init('#recipient_map_table', { "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"}}, {"name":"recipient_map_old","title":lang.recipient_map_old}, {"name":"recipient_map_new","title":lang.recipient_map_new}, @@ -697,7 +697,7 @@ jQuery(function($){ function draw_tls_policy_table() { ft_tls_policy_table = FooTable.init('#tls_policy_table', { "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"}}, {"name":"dest","title":lang.tls_map_dest}, {"name":"policy","title":lang.tls_map_policy}, @@ -767,7 +767,7 @@ jQuery(function($){ function draw_alias_table() { ft_alias_table = FooTable.init('#alias_table', { "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"}}, {"sorted": true,"name":"address","title":lang.alias,"style":{"width":"250px"}}, {"name":"goto","title":lang.target_address}, @@ -866,7 +866,7 @@ jQuery(function($){ function draw_aliasdomain_table() { ft_aliasdomain_table = FooTable.init('#aliasdomain_table', { "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"}}, {"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?'':0==value&&'';}},