B2G/gaia/apps/keyboard/js/keyboard.js
// have to change anything on the screen.
have to change anything on the screen.
have to change anything on the screen .
function handleNewKeyboards() {
  enabledKeyboardNames = [];
  for (var group in keyboardGroups) {
    if (enabledKeyboardGroups['keyboard.layouts.' + group]) {
      keyboardGroups[group].forEach(function(name) {
        if (enabledKeyboardNames.indexOf(name) === -1)
          enabledKeyboardNames.push(name);
      });
    }
  }
  if (enabledKeyboardNames.length === 0)
    Array.prototype.push.apply(enabledKeyboardNames,
                               defaultKeyboardNames);
  for (var i = 0; i < enabledKeyboardNames.length; i++)
    loadKeyboard(enabledKeyboardNames[i]);
  if (enabledKeyboardNames.indexOf(keyboardName) == -1)
    keyboardName = null;
}
function handleNewKeyboards ( ) { enabledKeyboardNames = [ ] ; for ( var group in keyboardGroups ) { if ( enabledKeyboardGroups [ 'keyboard.layouts.' + group ] ) { keyboardGroups [ group ] . forEach ( function ( name ) { if ( enabledKeyboardNames . indexOf ( name ) === - 1 ) enabledKeyboardNames . push ( name ) ; } ) ; } } if ( enabledKeyboardNames . length === 0 ) Array . prototype . push . apply ( enabledKeyboardNames , defaultKeyboardNames ) ; for ( var i = 0 ; i < enabledKeyboardNames . length ; i ++ ) loadKeyboard ( enabledKeyboardNames [ i ] ) ; if ( enabledKeyboardNames . indexOf ( keyboardName ) == - 1 ) keyboardName = null ; }
have to change anything on the screen.
have to change anything on the screen .
// If no keyboards were selected, use a default // Now load each of these keyboards and their input methods // If the keyboard has been disabled, reset keyboardName allowing it to be // properly set when showing the keyboard