2022-01-03 13:21:00 -08:00
|
|
|
import registerEvents from 'utilities/registerEvents';
|
2022-10-11 13:08:59 -07:00
|
|
|
import { questionboxAllHandler, questionboxAllInputHandler, questionboxAllModalAutofocus } from './all';
|
2022-01-03 13:21:00 -08:00
|
|
|
import { questionboxPromoteHandler, questionboxUserHandler, questionboxUserInputHandler } from './user';
|
|
|
|
|
|
|
|
export default (): void => {
|
|
|
|
registerEvents([
|
2022-10-11 13:08:59 -07:00
|
|
|
{ type: 'click', target: document.querySelectorAll('[name=qb-ask]'), handler: questionboxUserHandler },
|
|
|
|
{ type: 'click', target: document.querySelector('#new-question'), handler: questionboxPromoteHandler },
|
|
|
|
{ type: 'click', target: document.querySelectorAll('[name=qb-all-ask]'), handler: questionboxAllHandler },
|
|
|
|
{ type: 'keydown', target: document.querySelectorAll('[name=qb-question]'), handler: questionboxUserInputHandler },
|
2023-01-04 03:23:20 -08:00
|
|
|
{ type: 'keydown', target: document.querySelectorAll('[name=qb-all-question]'), handler: questionboxAllInputHandler },
|
|
|
|
{ type: 'shown.bs.modal', target: document.querySelector('#modal-ask-followers'), handler: questionboxAllModalAutofocus }
|
2022-01-03 13:21:00 -08:00
|
|
|
]);
|
2022-10-11 13:08:59 -07:00
|
|
|
}
|