From cbc7fe5d985fd015121ae2b4b9d64c6a03231a35 Mon Sep 17 00:00:00 2001 From: Ilya Daynatovich Date: Tue, 18 Oct 2016 17:20:48 +0300 Subject: [PATCH] Add JSDoc and rename method --- modules/UI/invite/InviteDialogView.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/UI/invite/InviteDialogView.js b/modules/UI/invite/InviteDialogView.js index 344782de9..84673b998 100644 --- a/modules/UI/invite/InviteDialogView.js +++ b/modules/UI/invite/InviteDialogView.js @@ -290,7 +290,7 @@ export default class InviteDialogView { $(removePassword).on('click', () => { this.model.setRoomUnlocked(); }); - let boundSetPassword = this.setPassword.bind(this); + let boundSetPassword = this._setPassword.bind(this); $(document).on('click', addPasswordBtn, boundSetPassword); let boundDisablePass = this.disableAddPassIfInputEmpty.bind(this); $(document).on('keypress', newPasswordInput, boundDisablePass); @@ -300,12 +300,16 @@ export default class InviteDialogView { $(newPasswordInput).on('keydown', (e) => { if (e.keyCode === ENTER_KEY) { e.stopPropagation(); - this.setPassword(); + this._setPassword(); } }); } - setPassword() { + /** + * Marking room as locked + * @private + */ + _setPassword() { let $passInput = $('#newPasswordInput'); let newPass = $passInput.val();