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 = '