From 2cd910ef07c5661a602f92d843316d30ce2c6e17 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 4 Oct 2020 14:48:54 +0530 Subject: [PATCH] webapp: fixed issue in sortTable() to allow sorting as per actual value. --- DnsServerCore/www/js/common.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DnsServerCore/www/js/common.js b/DnsServerCore/www/js/common.js index 7fe638f9..eaab3881 100644 --- a/DnsServerCore/www/js/common.js +++ b/DnsServerCore/www/js/common.js @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2019 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2020 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -284,13 +284,13 @@ function sortTable(tableId, n) { /* Check if the two rows should switch place, based on the direction, asc or desc: */ if (dir == "asc") { - if (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase()) { + if (x.innerText.toLowerCase() > y.innerText.toLowerCase()) { // If so, mark as a switch and break the loop: shouldSwitch = true; break; } } else if (dir == "desc") { - if (x.innerHTML.toLowerCase() < y.innerHTML.toLowerCase()) { + if (x.innerText.toLowerCase() < y.innerText.toLowerCase()) { // If so, mark as a switch and break the loop: shouldSwitch = true; break;