Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | /** |
| 2 | * Sets up the transfer ownership dialog box. |
| 3 | * @param {Long} hotlist_id id of the current hotlist |
| 4 | */ |
| 5 | function initializeDialogBox(hotlist_id) { |
| 6 | let transferContainer = $('transfer-ownership-container'); |
| 7 | $('transfer-ownership').addEventListener('click', function() { |
| 8 | transferContainer.style.display = 'block'; |
| 9 | }); |
| 10 | |
| 11 | let cancelButton = document.getElementById('cancel'); |
| 12 | |
| 13 | cancelButton.addEventListener('click', function() { |
| 14 | transferContainer.style.display = 'none'; |
| 15 | }); |
| 16 | |
| 17 | $('hotlist_star').addEventListener('click', function() { |
| 18 | _TKR_toggleStar($('hotlist_star'), null, null, null, hotlist_id); |
| 19 | }); |
| 20 | } |
| 21 | |
| 22 | function initializeDialogBoxRemoveSelf() { |
| 23 | /* Initialise the dialog box for removing self from the hotlist. */ |
| 24 | |
| 25 | let removeSelfContainer = $('remove-self-container'); |
| 26 | $('remove-self').addEventListener('click', function() { |
| 27 | removeSelfContainer.style.display = 'block'; |
| 28 | }); |
| 29 | |
| 30 | let cancelButtonRS = document.getElementById('cancel-remove-self'); |
| 31 | |
| 32 | cancelButtonRS.addEventListener('click', function() { |
| 33 | removeSelfContainer.style.display = 'none'; |
| 34 | }); |
| 35 | } |