luci-base: revise array sorting
authorJo-Philipp Wich <jo@mein.io>
Wed, 27 Jul 2022 15:19:08 +0000 (17:19 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 5 Dec 2022 09:46:28 +0000 (10:46 +0100)
commitc02e8dc143d12f9fab1107c258553f9c07a1f9c2
tree24d2e15743f3ffb5f51401dfb477b50077bf5333
parenta19658aa7781f7d5ee6fb4f4e0c3d389e3d94ce3
luci-base: revise array sorting

Refactor various sort operations throughout luci-base to use the new
L.naturalCompare() comparator function.

This primarily ensures that embedded numbers are sorted numerically and
not in a lexicographical way.

It also simplifies some code as a side effect.

Ref: #5899
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 37422e891a47f15659356ce75b6f6cce831e0041)
modules/luci-base/htdocs/luci-static/resources/form.js
modules/luci-base/htdocs/luci-static/resources/network.js
modules/luci-base/htdocs/luci-static/resources/tools/widgets.js
modules/luci-base/htdocs/luci-static/resources/ui.js