modules/admin-full: decouple enable/disable button state from assoc state
[project/luci.git] / modules / admin-full / luasrc / view / admin_network / wifi_overview.htm
index d528876..91d2ff4 100644 (file)
@@ -187,7 +187,7 @@ You may obtain a copy of the License at
                                for( var i = 0; i < st.length; i++ )
                                {
                                        var iw = st[i];
-                                       var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel);
+                                       var is_assoc = (iw.bssid && iw.bssid != '00:00:00:00:00:00' && iw.channel && iw.mode != 'Unknown');
                                        var p = iw.quality;
                                        var q = is_assoc ? p : -1;
 
@@ -218,7 +218,7 @@ You may obtain a copy of the License at
                                        var toggle = document.getElementById(iw.id + '-iw-toggle');
                                        if (toggle)
                                        {
-                                               if (is_assoc)
+                                               if (!iw.disabled)
                                                {
                                                        toggle.className = 'cbi-button cbi-button-reset';
                                                        toggle.value = '<%:Disable%>';