aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/updateActionCommands.ts
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-09-04 19:30:41 +0200
committerGitHub <noreply@github.com>2022-09-04 19:30:41 +0200
commit975fb353dd7f5bec7bcb836f4ceb86fae9b70340 (patch)
treeac910da9d9766582bec1eed873feabbb7b013259 /webAO/dom/updateActionCommands.ts
parentd20994bd7c244cc84ab138cec441b05c261a83e4 (diff)
parent31a97ce6009204316295fa4fd09749e2ff71dd7d (diff)
Merge pull request #164 from caleb-mabry/move-window-functions-pt-1
Several window functions moved
Diffstat (limited to 'webAO/dom/updateActionCommands.ts')
-rw-r--r--webAO/dom/updateActionCommands.ts27
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