public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Web] fix mailboxtable sort by quota
e501642b
data/web/js/site/mailbox.js | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
Diff
diff --git a/data/web/js/site/mailbox.js b/data/web/js/site/mailbox.js
index 2bdd5bf1..83e0d032 100644
--- a/data/web/js/site/mailbox.js
+++ b/data/web/js/site/mailbox.js
@@ -838,7 +838,13 @@ jQuery(function($){
url: "/api/v1/get/mailbox/reduced",
dataSrc: function(json){
$.each(json, function (i, item) {
- item.quota = item.quota_used + "/" + item.quota;
+ item.quota = {
+ sortBy: item.quota_used,
+ value: item.quota
+ }
+ item.quota.value = (item.quota.value == 0 ? "∞" : humanFileSize(item.quota.value));
+ item.quota.value = humanFileSize(item.quota_used) + "/" + item.quota.value;
+
item.max_quota_for_mbox = humanFileSize(item.max_quota_for_mbox);
item.last_mail_login = item.last_imap_login + '/' + item.last_pop3_login + '/' + item.last_smtp_login;
/*
@@ -943,14 +949,10 @@ jQuery(function($){
},
{
title: lang.domain_quota,
- data: 'quota',
+ data: 'quota.value',
responsivePriority: 8,
- defaultContent: '',
- render: function (data, type) {
- data = data.split("/");
- var of_q = (data[1] == 0 ? "∞" : humanFileSize(data[1]));
- return humanFileSize(data[0]) + " / " + of_q;
- }
+ defaultContent: '',
+ orderData: 23
},
{
title: lang.last_mail_login,
@@ -1076,6 +1078,13 @@ jQuery(function($){
responsivePriority: 6,
defaultContent: ''
},
+ {
+ title: "",
+ data: 'quota.sortBy',
+ responsivePriority: 8,
+ defaultContent: '',
+ className: "d-none"
+ },
]
});
}