2022-01-04 09:13:14 -08:00
|
|
|
import registerEvents from 'utilities/registerEvents';
|
|
|
|
import { questionAnswerHandler, questionAnswerInputHandler } from './answer';
|
2022-09-03 07:20:07 -07:00
|
|
|
import { questionDestroyHandler } from './destroy';
|
|
|
|
import { questionReportHandler } from './report';
|
2022-01-04 09:13:14 -08:00
|
|
|
|
|
|
|
export default (): void => {
|
|
|
|
registerEvents([
|
2022-09-03 07:20:07 -07:00
|
|
|
{ type: 'click', target: '[data-action=ab-question-report]', handler: questionReportHandler, global: true },
|
|
|
|
{ type: 'click', target: '[data-action=ab-question-destroy]', handler: questionDestroyHandler, global: true },
|
2022-01-04 09:13:14 -08:00
|
|
|
{ type: 'click', target: '#q-answer-btn', handler: questionAnswerHandler, global: true },
|
|
|
|
{ type: 'keydown', target: '#q-answer-text', handler: questionAnswerInputHandler, global: true }
|
|
|
|
]);
|
|
|
|
}
|