function attachListeners() {
  var radioEls = document.querySelectorAll('input[type="radio"]');
  for (var i = 0; i < radioEls.length; ++i) {
    radioEls[i].addEventListener('click', onRadioClicked);
  }

  function addEventListenerToButton(parentId, func) {
    document.querySelector('#' + parentId + ' button')
        .addEventListener('click', func);
  }

  addEventListenerToButton('saveFile', saveFile);
  addEventListenerToButton('loadFile', loadFile);
  addEventListenerToButton('delete', deleteFileOrDirectory);
  addEventListenerToButton('listDir', listDir);
  addEventListenerToButton('makeDir', makeDir);
  addEventListenerToButton('rename', rename);
}
// Called by the common.js module.
Called by the common.js module.
Called by the common . js module .
function attachListeners() {
  var radioEls = document.querySelectorAll('input[type="radio"]');
  for (var i = 0; i < radioEls.length; ++i) {
    radioEls[i].addEventListener('click', onRadioClicked);
  }
  function addEventListenerToButton(parentId, func) {
    document.querySelector('#' + parentId + ' button')
        .addEventListener('click', func);
  }
  addEventListenerToButton('saveFile', saveFile);
  addEventListenerToButton('loadFile', loadFile);
  addEventListenerToButton('delete', deleteFileOrDirectory);
  addEventListenerToButton('listDir', listDir);
  addEventListenerToButton('makeDir', makeDir);
  addEventListenerToButton('rename', rename);
}
function attachListeners ( ) { var radioEls = document . querySelectorAll ( 'input[type="radio"]' ) ; for ( var i = 0 ; i < radioEls . length ; ++ i ) { radioEls [ i ] . addEventListener ( 'click' , onRadioClicked ) ; } function addEventListenerToButton ( parentId , func ) { document . querySelector ( '#' + parentId + ' button' ) . addEventListener ( 'click' , func ) ; } addEventListenerToButton ( 'saveFile' , saveFile ) ; addEventListenerToButton ( 'loadFile' , loadFile ) ; addEventListenerToButton ( 'delete' , deleteFileOrDirectory ) ; addEventListenerToButton ( 'listDir' , listDir ) ; addEventListenerToButton ( 'makeDir' , makeDir ) ; addEventListenerToButton ( 'rename' , rename ) ; }
Called by the common.js module.
Called by the common . js module .