From 3909cf79dcee55c90dc3dd50af619fbb63290b65 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Mon, 31 Jul 2017 23:07:11 +0200 Subject: luci-app-travelmate: rework wireless station re-ordering * rework wireless station re-ordering code, now complete uci index based, therefore no longer tied to a definite order of wifi-iface sections Signed-off-by: Dirk Brenken --- .../luasrc/view/travelmate/stations.htm | 29 +++++++++------------- 1 file changed, 12 insertions(+), 17 deletions(-) (limited to 'applications/luci-app-travelmate/luasrc/view') diff --git a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm index d8ca96607..f1f26801c 100644 --- a/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm +++ b/applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm @@ -26,32 +26,27 @@ This is free software, licensed under the Apache License, Version 2.0 <%:Actions%> <% - local pos = -1 - uci:foreach("wireless", "wifi-device", function(s) - pos = pos + 1 - end) uci:foreach("wireless", "wifi-iface", function(s) - pos = pos + 1 - local section = s['.name'] - local device = s.device or "" - local mode = s.mode or "" local iface = s.network or "" - local ssid = s.ssid or "" - local encryption = s.encryption or "" - local disabled = s.disabled or "" - local style = "color:#000000" - if disabled == "0" then - style = "color:#0069d6;font-weight:bold" - end if iface == trmiface then + local section = s['.name'] + local device = s.device or "" + local mode = s.mode or "" + local ssid = s.ssid or "" + local encryption = s.encryption or "" + local disabled = s.disabled or "" + local style = "color:#000000" + if disabled == "0" then + style = "color:#0069d6;font-weight:bold" + end %> <%=device%> <%=ssid%> <%=encryption%> - - + + -- cgit v1.2.3