B2G/gaia/apps/settings/js/wifi.js
// display a message on the network item matching the ssid
display a message on the network item matching the ssid
display a message on the network item matching the ssid
function display(network, networkStatus) {
      if (!network) {
        return;
      }
      var key = network.ssid + '+' + network.capabilities.join('+');
      var listItem = index[key];
      var active = list.querySelector('.active');
      if (active && active != listItem) {
        active.classList.remove('active');
        active.querySelector('small').textContent =
            _('shortStatus-disconnected');
        active.querySelector('aside').classList.remove('connecting');
        active.querySelector('aside').classList.remove('connected');
      }
      if (listItem) {
        listItem.classList.add('active');
        listItem.querySelector('small').textContent =
                                            _('shortStatus-' + networkStatus);
        if (networkStatus === 'connecting') {
          listItem.querySelector('aside').classList.add('connecting');
        }
        if (networkStatus === 'connected') {
          listItem.querySelector('aside').classList.remove('connecting');
        }
      }
    }
function display ( network , networkStatus ) { if ( ! network ) { return ; } var key = network . ssid + '+' + network . capabilities . join ( '+' ) ; var listItem = index [ key ] ; var active = list . querySelector ( '.active' ) ; if ( active && active != listItem ) { active . classList . remove ( 'active' ) ; active . querySelector ( 'small' ) . textContent = _ ( 'shortStatus-disconnected' ) ; active . querySelector ( 'aside' ) . classList . remove ( 'connecting' ) ; active . querySelector ( 'aside' ) . classList . remove ( 'connected' ) ; } if ( listItem ) { listItem . classList . add ( 'active' ) ; listItem . querySelector ( 'small' ) . textContent = _ ( 'shortStatus-' + networkStatus ) ; if ( networkStatus === 'connecting' ) { listItem . querySelector ( 'aside' ) . classList . add ( 'connecting' ) ; } if ( networkStatus === 'connected' ) { listItem . querySelector ( 'aside' ) . classList . remove ( 'connecting' ) ; } } }
display a message on the network item matching the ssid
display a message on the network item matching the ssid