|
1 | 1 | import {POST} from '../modules/fetch.ts'; |
2 | 2 | import {addDelegatedEventListener, hideElem, queryElems, showElem, toggleElem} from '../utils/dom.ts'; |
3 | 3 | import {fomanticQuery} from '../modules/fomantic/base.ts'; |
| 4 | +import {registerGlobalSelectorFunc} from '../modules/observer.ts'; |
4 | 5 | import {camelize} from 'vue'; |
5 | 6 |
|
6 | 7 | export function initGlobalButtonClickOnEnter(): void { |
@@ -160,7 +161,7 @@ export function initGlobalButtons(): void { |
160 | 161 | // There are a few cancel buttons in non-modal forms, and there are some dynamically created forms (eg: the "Edit Issue Content") |
161 | 162 | addDelegatedEventListener(document, 'click', 'form button.ui.cancel.button', (_ /* el */, e) => e.preventDefault()); |
162 | 163 |
|
163 | | - queryElems(document, '.show-panel', (el) => el.addEventListener('click', onShowPanelClick)); |
164 | | - queryElems(document, '.hide-panel', (el) => el.addEventListener('click', onHidePanelClick)); |
165 | | - queryElems(document, '.show-modal', (el) => el.addEventListener('click', onShowModalClick)); |
| 164 | + registerGlobalSelectorFunc('.show-panel', (el) => el.addEventListener('click', onShowPanelClick)); |
| 165 | + registerGlobalSelectorFunc('.hide-panel', (el) => el.addEventListener('click', onHidePanelClick)); |
| 166 | + registerGlobalSelectorFunc('.show-modal', (el) => el.addEventListener('click', onShowModalClick)); |
166 | 167 | } |
0 commit comments