From 581f8c77c7a4f235e1027fe201475ebe2a8a2fb0 Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Sat, 27 Jul 2019 16:49:53 +0200 Subject: [PATCH 1/8] Restrict quarantine table row toggle --- data/web/js/site/quarantine.js | 1 + 1 file changed, 1 insertion(+) diff --git a/data/web/js/site/quarantine.js b/data/web/js/site/quarantine.js index 2c6f58c1..9d762f2c 100644 --- a/data/web/js/site/quarantine.js +++ b/data/web/js/site/quarantine.js @@ -59,6 +59,7 @@ jQuery(function($){ "paging": {"enabled": true,"limit": 5,"size": pagination_size}, "sorting": {"enabled": true}, "filtering": {"enabled": true,"position": "left","connectors": false,"placeholder": lang.filter_table}, + "toggleSelector": "table tbody span.footable-toggle" }); } From abf0548ca495852730a147486b5cfde6cb85a619 Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Sat, 27 Jul 2019 17:14:56 +0200 Subject: [PATCH 2/8] Prevent event propagation for footable toggle --- data/web/js/site/quarantine.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/web/js/site/quarantine.js b/data/web/js/site/quarantine.js index 9d762f2c..d0dfc5aa 100644 --- a/data/web/js/site/quarantine.js +++ b/data/web/js/site/quarantine.js @@ -114,6 +114,10 @@ jQuery(function($){ }); }); + $('table tbody').on('click', 'span.footable-toggle', function () { + event.stopPropagation(); + }) + // Initial table drawings draw_quarantine_table(); }); From fb1307daa9275aab4ade14cffbfb24b2409f9884 Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Sat, 27 Jul 2019 17:16:59 +0200 Subject: [PATCH 3/8] Set proper cursor for footable toggle --- data/web/css/site/quarantine.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/web/css/site/quarantine.css b/data/web/css/site/quarantine.css index 3a3718d1..e9789513 100644 --- a/data/web/css/site/quarantine.css +++ b/data/web/css/site/quarantine.css @@ -57,3 +57,7 @@ span.mail-address-item { padding: 2px 7px; margin-right: 7px; } + +table tbody span.footable-toggle { + cursor: pointer; +} From 36888645bc0f67048ac84a6e07c22d45d18736fe Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Sat, 27 Jul 2019 17:17:56 +0200 Subject: [PATCH 4/8] Set proper cursor for quarantine table rows --- data/web/css/site/quarantine.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/web/css/site/quarantine.css b/data/web/css/site/quarantine.css index e9789513..944e7c41 100644 --- a/data/web/css/site/quarantine.css +++ b/data/web/css/site/quarantine.css @@ -61,3 +61,7 @@ span.mail-address-item { table tbody span.footable-toggle { cursor: pointer; } + +#quarantinetable tbody tr { + cursor: pointer; +} From bcad71cfaa7fc0443d1461f147d97b3d8b1421d7 Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Sat, 27 Jul 2019 18:50:58 +0200 Subject: [PATCH 5/8] Add proper cursor to remaining UI tables --- data/web/css/site/mailbox.css | 8 ++++++++ data/web/css/site/quarantine.css | 4 ++-- data/web/css/site/user.css | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/data/web/css/site/mailbox.css b/data/web/css/site/mailbox.css index 61b6cfcf..50c09344 100644 --- a/data/web/css/site/mailbox.css +++ b/data/web/css/site/mailbox.css @@ -53,3 +53,11 @@ table.footable>tbody>tr.footable-empty>td { font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace; font-size:smaller; } + +table tbody tr { + cursor: pointer; +} + +table tbody tr td input[type="checkbox"] { + cursor: pointer; +} diff --git a/data/web/css/site/quarantine.css b/data/web/css/site/quarantine.css index 944e7c41..0ea3eeb8 100644 --- a/data/web/css/site/quarantine.css +++ b/data/web/css/site/quarantine.css @@ -58,10 +58,10 @@ span.mail-address-item { margin-right: 7px; } -table tbody span.footable-toggle { +table tbody tr { cursor: pointer; } -#quarantinetable tbody tr { +table tbody tr td input[type="checkbox"] { cursor: pointer; } diff --git a/data/web/css/site/user.css b/data/web/css/site/user.css index aa3ddad7..62428d0c 100644 --- a/data/web/css/site/user.css +++ b/data/web/css/site/user.css @@ -39,4 +39,12 @@ table.footable>tbody>tr.footable-empty>td { } body { overflow-y:scroll; +} + +table tbody tr { + cursor: pointer; +} + +table tbody tr td input[type="checkbox"] { + cursor: pointer; } \ No newline at end of file From 1b54d757161b241537021d13d7eec97033523907 Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Sat, 27 Jul 2019 18:56:51 +0200 Subject: [PATCH 6/8] Prevent event propagation for remaining tables --- data/web/js/site/mailbox.js | 12 ++++++++---- data/web/js/site/quarantine.js | 2 +- data/web/js/site/user.js | 5 +++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index 03086d49..588c5570 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -52,12 +52,12 @@ $(document).ready(function() { auto_fill_quota = function(domain) { $.get("/api/v1/get/domain/" + domain, function(data){ var result = $.parseJSON(JSON.stringify(data)); - def_new_mailbox_quota = ( result.def_new_mailbox_quota / 1048576); + def_new_mailbox_quota = ( result.def_new_mailbox_quota / 1048576); max_new_mailbox_quota = ( result.max_new_mailbox_quota / 1048576); if (max_new_mailbox_quota != '0') { $("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB'); $('#addInputQuota').attr({"disabled": false, "value": "", "type": "number", "max": max_new_mailbox_quota}); - $('#addInputQuota').val(def_new_mailbox_quota); + $('#addInputQuota').val(def_new_mailbox_quota); } else { $("#quotaBadge").html('max. ' + max_new_mailbox_quota + ' MiB'); @@ -230,7 +230,7 @@ jQuery(function($){ return Number(res[0]); }, }, - {"name":"def_quota_for_mbox","title":lang.mailbox_defquota,"breakpoints":"xs sm md","style":{"width":"125px"}}, + {"name":"def_quota_for_mbox","title":lang.mailbox_defquota,"breakpoints":"xs sm md","style":{"width":"125px"}}, {"name":"max_quota_for_mbox","title":lang.mailbox_quota,"breakpoints":"xs sm","style":{"width":"125px"}}, {"name":"rl","title":"RL","breakpoints":"xs sm md lg","style":{"maxWidth":"100px","width":"100px"}}, {"name":"backupmx","filterable": false,"style":{"maxWidth":"120px","width":"120px"},"title":lang.backup_mx,"breakpoints":"xs sm md lg"}, @@ -256,7 +256,7 @@ jQuery(function($){ return e; }).join('/1'); } - item.def_quota_for_mbox = humanFileSize(item.def_quota_for_mbox); + item.def_quota_for_mbox = humanFileSize(item.def_quota_for_mbox); item.max_quota_for_mbox = humanFileSize(item.max_quota_for_mbox); item.chkbox = ''; item.action = '
'; @@ -1068,6 +1068,10 @@ jQuery(function($){ }); }; + $('body').on('click', 'span.footable-toggle', function () { + event.stopPropagation(); + }) + draw_domain_table(); draw_mailbox_table(); draw_resource_table(); diff --git a/data/web/js/site/quarantine.js b/data/web/js/site/quarantine.js index d0dfc5aa..cfc6d8b6 100644 --- a/data/web/js/site/quarantine.js +++ b/data/web/js/site/quarantine.js @@ -114,7 +114,7 @@ jQuery(function($){ }); }); - $('table tbody').on('click', 'span.footable-toggle', function () { + $('body').on('click', 'span.footable-toggle', function () { event.stopPropagation(); }) diff --git a/data/web/js/site/user.js b/data/web/js/site/user.js index 505da772..bb458daa 100644 --- a/data/web/js/site/user.js +++ b/data/web/js/site/user.js @@ -236,6 +236,11 @@ jQuery(function($){ } }); } + + $('body').on('click', 'span.footable-toggle', function () { + event.stopPropagation(); + }) + draw_sync_job_table(); draw_tla_table(); draw_wl_policy_mailbox_table(); From d1153b470f6a2fad5b71e44446e1e94ad44c6d7a Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Sat, 27 Jul 2019 18:57:58 +0200 Subject: [PATCH 7/8] Restrict row toggle for remaing tables --- data/web/js/site/mailbox.js | 12 ++++++++---- data/web/js/site/user.js | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index 588c5570..8864d651 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -419,7 +419,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'mailbox_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_resource_table() { @@ -854,7 +855,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'alias_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } @@ -995,7 +997,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'sync_job_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } @@ -1064,7 +1067,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'filter_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); }; diff --git a/data/web/js/site/user.js b/data/web/js/site/user.js index bb458daa..12340d1f 100644 --- a/data/web/js/site/user.js +++ b/data/web/js/site/user.js @@ -151,7 +151,8 @@ jQuery(function($){ "state": {"enabled": true}, "sorting": { "enabled": true - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_wl_policy_mailbox_table() { From c48ae234cebc96260baca88c3e67523ce52c7591 Mon Sep 17 00:00:00 2001 From: friedPotat0 <5374007+friedPotat0@users.noreply.github.com> Date: Sat, 27 Jul 2019 19:07:01 +0200 Subject: [PATCH 8/8] Restrict toggle for tbl with specific breakpoints --- data/web/js/site/mailbox.js | 21 ++++++++++++++------- data/web/js/site/user.js | 3 ++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js index 8864d651..50b5956d 100644 --- a/data/web/js/site/mailbox.js +++ b/data/web/js/site/mailbox.js @@ -300,7 +300,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'domain_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_mailbox_table() { @@ -492,7 +493,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'resource_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_bcc_table() { @@ -560,7 +562,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'bcc_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_recipient_map_table() { @@ -623,7 +626,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'recipient_map_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_tls_policy_table() { @@ -692,7 +696,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'tls_policy_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_transport_maps_table() { @@ -759,7 +764,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'transport_maps_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_alias_table() { @@ -916,7 +922,8 @@ jQuery(function($){ "after.ft.filtering": function(e, ft){ table_mailbox_ready(ft, 'aliasdomain_table'); } - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } diff --git a/data/web/js/site/user.js b/data/web/js/site/user.js index 12340d1f..a976dd85 100644 --- a/data/web/js/site/user.js +++ b/data/web/js/site/user.js @@ -84,7 +84,8 @@ jQuery(function($){ "state": {"enabled": true}, "sorting": { "enabled": true - } + }, + "toggleSelector": "table tbody span.footable-toggle" }); } function draw_sync_job_table() {