12345678910111213141516171819202122232425262728293031323334 |
- function switchMenu(obj) {
- var el = document.getElementById(obj);
- if ( el === null ) {
- console.log('no such element '+el);
- return;
- }
- if ( el.style.display != 'none' ) {
- el.style.display = 'none';
- } else {
- el.style.display = 'inline-block';
- }
- }
- function add2tags(id) {
- var select = document.getElementById( id + '-tags');
- var input = document.getElementById( id + '-customtag');
- var newOption = document.createElement('option');
- newOption.value = input.value;
- newOption.innerText = input.value;
- newOption.selected = true;
- select.appendChild(newOption);
- input.value= '';
- }
- function add2aliases(id) {
- var select = document.getElementById( id + '-alias');
- var input = document.getElementById( id + '-customalias');
- var newOption = document.createElement('option');
- newOption.value = input.value;
- newOption.innerText = input.value;
- newOption.selected = true;
- select.appendChild(newOption);
- input.value= '';
- }
|