Go to file
Tom Udding 240b2c63f6
Fix timestamps not sorting in datatables
Timestamps retrieved from the API were always converted to a browser
local format. The format specified for moment.js added in
5160eff294 did not work because of this.

Additionally, the format specified used `dd` which looks for two letter
days, such as "Mo", "Tu", "We", etc. Furthermore, `mm` is used for
minutes, not months.

Because the locale formatted datetime can vary a lot, it is not easy to
get this into moment.js to enable the sorting of datetimes in the
datatables. In other words, there is no conversion from an
`Intl.DateTimeFormat` specifier string to moment.js. Adding many
`$.fn.dataTable.moment(format);` with different `format`s is not useful.

I have fixed this rewriting how the timestamps from the API are added
to the tables. It still uses the locale of the browser, because not
everyone wants to use ISO 8601, but no longer requires moment.js (which
has been removed).

Two data attributes are added to the `td`s of the timestamps:
- `data-order`
- `data-sort`

The values of these are the timestamps as returned by the server, which
are very easily sorted (as they are just UNIX timestamps). Then, when
creating the cell in the table, it will be converted to what the locale
of the browser specified (this has not changed).
2022-12-24 17:35:31 +01:00
.github Merge pull request #4900 from ethrgeist/chore/fix-github-template 2022-12-23 16:08:42 +01:00
data Fix timestamps not sorting in datatables 2022-12-24 17:35:31 +01:00
helper-scripts Merge pull request #4888 from mailcow/feature/helper-scripts_nextcloud25 2022-12-23 16:07:28 +01:00
.editorconfig [SSL] create individual domain certificates, add SNI configs for Postfix/Dovecot/Nginx 2019-10-19 12:48:56 +02:00
.env Docs 2017-03-02 11:23:23 +01:00
.gitignore Jan(moo)uary Update 2022 - Revision A (2022-01a) (#4445) 2022-02-01 15:26:48 +01:00
CODE_OF_CONDUCT.md Update CODE_OF_CONDUCT.md 2017-06-30 07:03:10 +08:00
CONTRIBUTING.md Update CONTRIBUTING.md 2021-10-25 21:01:51 +02:00
create_cold_standby.sh Fix permissions chmod +x 2022-07-08 18:29:34 +02:00
docker-compose.yml Merge remote-tracking branch 'origin/feature/bootstrap5' into staging 2022-12-23 16:46:00 +01:00
generate_config.sh Update generate_config.sh 2022-09-05 09:41:19 +02:00
LICENSE License 2017-05-18 09:48:22 +02:00
README.md Updated README.md 2022-12-12 16:29:33 +01:00
SECURITY.md Create SECURITY.md 2022-07-11 21:06:23 +02:00
update.sh [Update.sh] Increased Timeout for online status check 2022-12-13 11:52:04 +01:00

mailcow: dockerized - 🐮 + 🐋 = 💕

Mailcow Integration Tests Translation status Twitter URL

Want to support mailcow?

Please consider a support contract with Servercow to support further development. We support you while you support us. :)

You can also get a SAL which is a one-time payment with no liabilities or returning fees.

Or just spread the word: moo.

Info, documentation and support

Please see the official documentation for installation and support instructions. 🐄

🐛 If you found a critical security issue, please mail us to info at servercow.de.

Cowmunity

mailcow community

Telegram mailcow channel

Telegram mailcow Off-Topic channel

Official Twitter Account

Telegram desktop clients are available for multiple platforms. You can search the groups history for keywords.

Misc

Important: mailcow makes use of various open-source software. Please assure you agree with their license before using mailcow. Any part of mailcow itself is released under GNU General Public License, Version 3.

mailcow is a registered word mark of The Infrastructure Company GmbH, Parkstr. 42, 47877 Willich, Germany.

The project is managed and maintained by The Infrastructure Company GmbH.

Originated from @andryyy (André)