summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-11-21 17:04:12 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-11-21 17:04:12 +0000
commit9aad27f48eb5e101dafb7802f1c21a37fb5f205c (patch)
tree45d2015476b3a6753d8940f8cc574967481597b5
parentdfdd128c4badd0f27958fef4692dcef761de14dd (diff)
modules/admin-full: fix word wrapping in wifi overview page when using bootstrap theme
-rw-r--r--modules/admin-full/luasrc/view/admin_network/wifi_overview.htm20
1 files changed, 11 insertions, 9 deletions
diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm
index 1f59a1830..ab5d7a213 100644
--- a/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm
+++ b/modules/admin-full/luasrc/view/admin_network/wifi_overview.htm
@@ -9,8 +9,6 @@ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
-$Id$
-
-%>
<%-
@@ -124,6 +122,10 @@ $Id$
var is_reconnecting = false;
+ function nowrap(s) {
+ return s.replace(/ /g, '&#160;');
+ }
+
function wifi_shutdown(id, toggle) {
var reconnect = (toggle.getAttribute('active') == 'false');
@@ -300,24 +302,24 @@ $Id$
icon, assoclist[j].signal, assoclist[j].noise
);
- tr.insertCell(-1).innerHTML = String.format('%h', iw.ssid ? iw.ssid : '?');
+ tr.insertCell(-1).innerHTML = nowrap(String.format('%h', iw.ssid ? iw.ssid : '?'));
tr.insertCell(-1).innerHTML = assoclist[j].bssid;
tr.insertCell(-1).innerHTML = arptable[assoclist[j].bssid]
? arptable[assoclist[j].bssid] : '?';
- tr.insertCell(-1).innerHTML = String.format('%d <%:dBm%>', assoclist[j].signal);
- tr.insertCell(-1).innerHTML = String.format('%d <%:dBm%>', assoclist[j].noise);
+ tr.insertCell(-1).innerHTML = nowrap(String.format('%d <%:dBm%>', assoclist[j].signal));
+ tr.insertCell(-1).innerHTML = nowrap(String.format('%d <%:dBm%>', assoclist[j].noise));
- tr.insertCell(-1).innerHTML = (assoclist[j].rx_mcs > -1)
+ tr.insertCell(-1).innerHTML = nowrap((assoclist[j].rx_mcs > -1)
? String.format('%.1f <%:Mbit/s%>, MCS %d, %d<%:MHz%>', assoclist[j].rx_rate / 1000, assoclist[j].rx_mcs, assoclist[j].rx_40mhz ? 40 : 20)
: String.format('%.1f <%:Mbit/s%>', assoclist[j].rx_rate / 1000)
- ;
+ );
- tr.insertCell(-1).innerHTML = (assoclist[j].tx_mcs > -1)
+ tr.insertCell(-1).innerHTML = nowrap((assoclist[j].tx_mcs > -1)
? String.format('%.1f <%:Mbit/s%>, MCS %d, %d<%:MHz%>', assoclist[j].tx_rate / 1000, assoclist[j].tx_mcs, assoclist[j].tx_40mhz ? 40 : 20)
: String.format('%.1f <%:Mbit/s%>', assoclist[j].tx_rate / 1000)
- ;
+ );
rowstyle = (rowstyle == 1) ? 2 : 1;
}