static/js/interface.js
/**
 * Let user select from a list displayed in a dropdown menu.
 * @function listSelect
 * @param {string[]} lst - list of options
 * @param {Object} src - source DOM
 * @param {string} direc - direction of list expansion
 * @param {boolean} same - keep same dimension
 */
Let user select from a list displayed in a dropdown menu.
Let user select from a list displayed in a dropdown menu .
function listSelect(lst, src, direc, same) {
  const div = byId('list-select');
  div.classList.add('hidden');
  popupPos(src, div, direc, same);
  const table = byId('list-options');
  table.setAttribute('data-target-id', src.id);
  table.innerHTML = '';
  for (let item of lst) {
    const row = table.insertRow(-1);
    const cell = row.insertCell(-1);
    cell.innerHTML = item ? item : '&nbsp;';
  }
  div.classList.remove('hidden');
}
function listSelect ( lst , src , direc , same ) { const div = byId ( 'list-select' ) ; div . classList . add ( 'hidden' ) ; popupPos ( src , div , direc , same ) ; const table = byId ( 'list-options' ) ; table . setAttribute ( 'data-target-id' , src . id ) ; table . innerHTML = '' ; for ( let item of lst ) { const row = table . insertRow ( - 1 ) ; const cell = row . insertCell ( - 1 ) ; cell . innerHTML = item ? item : '&nbsp;' ; } div . classList . remove ( 'hidden' ) ; }
Let user select from a list displayed in a dropdown menu.
Let user select from a list displayed in a dropdown menu .