You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
670 B
43 lines
670 B
var api = "/api"; |
|
var web = "/web"; |
|
|
|
const UNAUTHORIZED = 401; |
|
|
|
function get(id){ |
|
return document.getElementById(id); |
|
} |
|
|
|
function disable(id){ |
|
get(id).setAttribute('disabled',true); |
|
} |
|
|
|
function enable(id){ |
|
get(id).removeAttribute('disabled'); |
|
} |
|
|
|
function getValue(id){ |
|
return get(id).value; |
|
} |
|
|
|
function hide(id){ |
|
console.log('hide('+id+')'); |
|
get(id).style.display = 'none'; |
|
} |
|
|
|
function redirect(page){ |
|
window.location.href = page; |
|
} |
|
|
|
function setText(id, text){ |
|
get(id).innerHTML = text; |
|
} |
|
|
|
|
|
function setValue(id,newVal){ |
|
get(id).value = newVal; |
|
} |
|
|
|
function show(id){ |
|
console.log('show('+id+')'); |
|
get(id).style.display = ''; |
|
} |