X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci2%2Fui.git;a=blobdiff_plain;f=luci2%2Fhtdocs%2Fluci2%2Fwireless.js;fp=luci2%2Fhtdocs%2Fluci2%2Fwireless.js;h=4d7892a4519c7a278a363a6cd555311e07a8f938;hp=c724f85b4c555ab3abf721d5784838f4f5f2058e;hb=a1cdbfc59a1212b585a4ea3dca49c189c360a8e5;hpb=6c317248bae87fb7e9edeba351d328907f346cc4 diff --git a/luci2/htdocs/luci2/wireless.js b/luci2/htdocs/luci2/wireless.js index c724f85..4d7892a 100644 --- a/luci2/htdocs/luci2/wireless.js +++ b/luci2/htdocs/luci2/wireless.js @@ -129,7 +129,7 @@ Class.extend({ }); }, - formatEncryption: function(enc) + formatEncryption: function(enc, condensed) { var format_list = function(l, s) { @@ -144,7 +144,9 @@ Class.extend({ if (enc.wep) { - if (enc.wep.length == 2) + if (condensed) + return L.tr('WEP'); + else if (enc.wep.length == 2) return L.tr('WEP Open/Shared') + ' (%s)'.format(format_list(enc.ciphers, ', ')); else if (enc.wep[0] == 'shared') return L.tr('WEP Shared Auth') + ' (%s)'.format(format_list(enc.ciphers, ', ')); @@ -153,7 +155,11 @@ Class.extend({ } else if (enc.wpa) { - if (enc.wpa.length == 2) + if (condensed && enc.wpa.length == 2) + return L.tr('WPA mixed'); + else if (condensed) + return (enc.wpa[0] == 2) ? L.tr('WPA2') : L.tr('WPA'); + else if (enc.wpa.length == 2) return L.tr('mixed WPA/WPA2') + ' %s (%s)'.format( format_list(enc.authentication, '/'), format_list(enc.ciphers, ', ')