project/src/main/webapp/shared.js
/** Creates a button label for each provided interest or skill */
Creates a button label for each provided interest or skill
Creates a button label for each provided interest or skill
function buildAsLabels(querySelector, labels, className) {
  for (const label of labels) {
    if (label === "") {
      continue;
    }
    const newLabelButton = document.createElement('button');
    newLabelButton.classList.add(`btn-${className}`);
    newLabelButton.classList.add('btn');
    newLabelButton.disabled = true;
    newLabelButton.innerHTML = label;
    document.querySelector(querySelector).appendChild(newLabelButton);
  }
}
function buildAsLabels ( querySelector , labels , className ) { for ( const label of labels ) { if ( label === "" ) { continue ; } const newLabelButton = document . createElement ( 'button' ) ; newLabelButton . classList . add ( ` ${ className } ` ) ; newLabelButton . classList . add ( 'btn' ) ; newLabelButton . disabled = true ; newLabelButton . innerHTML = label ; document . querySelector ( querySelector ) . appendChild ( newLabelButton ) ; } }
Creates a button label for each provided interest or skill
Creates a button label for each provided interest or skill