39 const editor = document.getElementById(`comment-editor-${id}`) |
39 const editor = document.getElementById(`comment-editor-${id}`) |
40 const view = document.getElementById(`comment-view-${id}`) |
40 const view = document.getElementById(`comment-view-${id}`) |
41 editor.style.display='none' |
41 editor.style.display='none' |
42 view.style.display='block' |
42 view.style.display='block' |
43 } |
43 } |
|
44 |
|
45 function toggleVariantStatus() { |
|
46 const cbox = document.getElementById('use-variants') |
|
47 if (!cbox) return |
|
48 const issue_status = document.getElementById('issue-status') |
|
49 const variant_status = document.getElementById('issue-variant-status') |
|
50 if (cbox.checked) { |
|
51 issue_status.style.display = 'none' |
|
52 variant_status.style.display = 'flex' |
|
53 } else { |
|
54 issue_status.style.display = 'inline-block' |
|
55 variant_status.style.display = 'none' |
|
56 } |
|
57 } |
|
58 |
|
59 window.addEventListener("load", (_) => toggleVariantStatus()); |