luci-mod-status: persist sorting of Wi-Fi associated stations table
authorThomas Schröder <tschroeder_github@outlook.com>
Wed, 27 Mar 2024 17:17:51 +0000 (18:17 +0100)
committerPaul Donald <itsascambutmailmeanyway+github@gmail.com>
Sun, 31 Mar 2024 19:53:43 +0000 (21:53 +0200)
Similar to commit 6039925 from @jow-

Add an ID attribute to the dynamically generated Wi-Fi associated
stations table to persist row ordering choice across reloads.

At the luci-mod-network view, the Wi-Fi associated stations table
already has the same id.

Signed-off-by: Thomas Schröder <tschroeder_github@outlook.com>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/60_wifi.js

index c4fa31fcf60290031a898d0d6480722355f4e4ce..5804100db45bb05cc43a8a007a5254ea60a810ba 100644 (file)
@@ -227,7 +227,7 @@ return baseclass.extend({
                if (!table.lastElementChild)
                        return null;
 
-               var assoclist = E('table', { 'class': 'table assoclist' }, [
+               var assoclist = E('table', { 'class': 'table assoclist', 'id': 'wifi_assoclist_table' }, [
                        E('tr', { 'class': 'tr table-titles' }, [
                                E('th', { 'class': 'th nowrap' }, _('Network')),
                                E('th', { 'class': 'th hide-xs' }, _('MAC address')),