diff options
Diffstat (limited to 'webAO/dom/updateActionCommands.ts')
| -rw-r--r-- | webAO/dom/updateActionCommands.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/webAO/dom/updateActionCommands.ts b/webAO/dom/updateActionCommands.ts new file mode 100644 index 0000000..9d0bd82 --- /dev/null +++ b/webAO/dom/updateActionCommands.ts @@ -0,0 +1,27 @@ + +/** + * Update evidence icon. + */ +export function updateActionCommands(side: string) { + if (side === "jud") { + document.getElementById("judge_action")!.style.display = "inline-table"; + document.getElementById("no_action")!.style.display = "none"; + } else { + document.getElementById("judge_action")!.style.display = "none"; + document.getElementById("no_action")!.style.display = "inline-table"; + } + + // Update role selector + for ( + let i = 0, + role_select = <HTMLSelectElement>document.getElementById("role_select"); + i < role_select.options.length; + i++ + ) { + if (side === role_select.options[i].value) { + role_select.options.selectedIndex = i; + return; + } + } +} +window.updateActionCommands = updateActionCommands;
\ No newline at end of file |
