chat: Move click handlers to chat.js

This commit is contained in:
Richard Hansen 2021-12-06 16:07:23 -05:00
parent 7b7b085a1c
commit f7d7d89874
2 changed files with 10 additions and 5 deletions

View file

@ -218,6 +218,11 @@ exports.chat = (() => {
},
init(pad) {
this._pad = pad;
$('#options-stickychat').on('click', () => this.stickToScreen());
$('#options-chatandusers').on('click', () => this.chatAndUsers());
$('#chaticon').on('click', () => { this.show(); return false; });
$('#titlecross').on('click', () => { this.hide(); return false; });
$('#titlesticky').on('click', () => { this.stickToScreen(true); return false; });
$('#chatinput').on('keydown', (evt) => {
// If the event is Alt C or Escape & we're already in the chat menu
// Send the users focus back to the pad