From 730ddcb909ac8a37cf5da4e12d03025760a3fc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Cort=C3=A9s=20Cano?= <38475681+TrapoSAMA@users.noreply.github.com> Date: Sun, 28 Jun 2026 03:49:53 -0400 Subject: [PATCH] Improve virtual list responsiveness and quota tooltip (#1050) This PR includes two small UI improvements: * Add horizontal scroll wrappers to virtual mailbox/alias lists so action buttons and table content do not overflow narrow desktop/tablet widths. * Add a domain quota tooltip showing assigned quota and real used quota, while preserving the existing visible assigned quota text and usage-based bar color. Tested locally with PHP lint for DomainHandler.php. thanks @trapoSAMA --- languages/en.lang | 2 ++ languages/es.lang | 2 ++ model/DomainHandler.php | 1 + public/css/bootstrap.css | 5 +++++ templates/list-virtual_mailbox.tpl | 2 ++ templates/list.tpl | 14 +++++++++++--- 6 files changed, 23 insertions(+), 3 deletions(-) diff --git a/languages/en.lang b/languages/en.lang index 69000967..bae2da1a 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -102,6 +102,8 @@ $PALANG['and_x_more'] = '[and %s more...]'; $PALANG['pOverview_mailbox_username'] = 'Email'; $PALANG['name'] = 'Name'; $PALANG['pOverview_mailbox_quota'] = 'Quota (MB)'; +$PALANG['quota_assigned'] = 'Assigned'; +$PALANG['quota_used'] = 'Used'; $PALANG['pOverview_vacation_edit'] = 'VACATION IS ON'; $PALANG['pOverview_vacation_option'] = 'Set Vacation'; $PALANG['no_domains_for_this_admin'] = 'You don\'t have permissions for any domains.'; diff --git a/languages/es.lang b/languages/es.lang index 4e8e38bd..b7bd9888 100644 --- a/languages/es.lang +++ b/languages/es.lang @@ -94,6 +94,8 @@ $PALANG['and_x_more'] = '[y %s más...]'; $PALANG['pOverview_mailbox_username'] = 'E-mail'; $PALANG['name'] = 'Nombre'; $PALANG['pOverview_mailbox_quota'] = 'Cuota (MB)'; +$PALANG['quota_assigned'] = 'Asignado'; +$PALANG['quota_used'] = 'Usado'; $PALANG['pOverview_vacation_edit'] = 'AUTORESPUESTA ESTÁ ACTIVADO'; $PALANG['pOverview_vacation_option'] = 'Autorespuesta'; $PALANG['no_domains_for_this_admin'] = 'No tienes permisos sobre ningún dominio.'; diff --git a/model/DomainHandler.php b/model/DomainHandler.php index d5287714..b2324256 100644 --- a/model/DomainHandler.php +++ b/model/DomainHandler.php @@ -121,6 +121,7 @@ class DomainHandler extends PFAHandler # Domain quota 'quota' => self::pacol($edit_dom_q,$edit_dom_q, 0, 'num', 'pAdminEdit_domain_quota' , 'pAdminEdit_domain_maxquota_text' , $domain_quota_default), 'total_quota' => self::pacol(0, 0, 1, 'vnum', '' , '' , '', array(), 0, 0, "$query_used_domainquota AS total_quota" /*extrafrom*//* already in mailbox_count */), + 'total_quota_used' => self::pacol(0, 0, 1, 'vnum', '' , '' , '', array(), 0, 0, "$query_display_domainquota AS total_quota_used" /*extrafrom*//* already in mailbox_count */), 'total_quot' => self::pacol(0, 0, $dom_q, 'quot', 'pAdminEdit_domain_quota' , '' , 0, array(), 0, 0, db_quota_text($query_used_domainquota, 'quota', 'total_quot')), '_total_quot_percent' => self::pacol(0, 0, $dom_q, 'vnum', '' , '' , 0, array(), 0, 0, db_quota_percent($query_display_domainquota, 'quota', '_total_quot_percent')), diff --git a/public/css/bootstrap.css b/public/css/bootstrap.css index 29ba8a5c..b9a201aa 100644 --- a/public/css/bootstrap.css +++ b/public/css/bootstrap.css @@ -151,3 +151,8 @@ div#login{ max-width: 35em; } #admin_table td.list-col-action { width: 46px; } #admin_table .list-action-icon, #mailbox_table .list-action-icon { width: 34px; padding-left: 0; padding-right: 0; } + +.mailbox-list-scroll { display: block; width: 100%; overflow-x: auto; } +.mailbox-list-scroll > #mailbox_table { min-width: 820px; margin-bottom: 0; } +.virtual-list-scroll { display: block; width: 100%; overflow-x: auto; } +.virtual-list-scroll > #admin_table { min-width: 720px; margin-bottom: 0; } diff --git a/templates/list-virtual_mailbox.tpl b/templates/list-virtual_mailbox.tpl index fc54ffa8..f36bac32 100644 --- a/templates/list-virtual_mailbox.tpl +++ b/templates/list-virtual_mailbox.tpl @@ -9,6 +9,7 @@