Setup lists feature in TypeScript
This commit is contained in:
parent
4008d2fd05
commit
542cdd8b9a
|
@ -2,8 +2,10 @@ import start from 'retrospring/common';
|
|||
import initAnswerbox from 'retrospring/features/answerbox/index';
|
||||
import initInbox from 'retrospring/features/inbox/index';
|
||||
import initUser from 'retrospring/features/user';
|
||||
import initLists from 'retrospring/features/lists';
|
||||
|
||||
start();
|
||||
document.addEventListener('turbolinks:load', initAnswerbox);
|
||||
document.addEventListener('turbolinks:load', initInbox);
|
||||
document.addEventListener('DOMContentLoaded', initUser);
|
||||
document.addEventListener('DOMContentLoaded', initUser);
|
||||
document.addEventListener('DOMContentLoaded', initLists);
|
|
@ -0,0 +1,11 @@
|
|||
import { on } from 'retrospring/utilities/on';
|
||||
import { createListHandler, createListInputHandler } from './create';
|
||||
import { destroyListHandler } from './destroy';
|
||||
import { listMembershipHandler } from './membership';
|
||||
|
||||
export default (): void => {
|
||||
on('click', 'input[type=checkbox][name=gm-list-check]', listMembershipHandler);
|
||||
on('click', 'button#create-list', createListHandler);
|
||||
on('click', 'a#delete-list', destroyListHandler);
|
||||
on('keyup', 'input#new-list-name', createListInputHandler);
|
||||
}
|
Loading…
Reference in New Issue