Add JSDoc and rename method

This commit is contained in:
Ilya Daynatovich 2016-10-18 17:20:48 +03:00
parent 442d2fa316
commit cbc7fe5d98
1 changed files with 7 additions and 3 deletions

View File

@ -290,7 +290,7 @@ export default class InviteDialogView {
$(removePassword).on('click', () => { $(removePassword).on('click', () => {
this.model.setRoomUnlocked(); this.model.setRoomUnlocked();
}); });
let boundSetPassword = this.setPassword.bind(this); let boundSetPassword = this._setPassword.bind(this);
$(document).on('click', addPasswordBtn, boundSetPassword); $(document).on('click', addPasswordBtn, boundSetPassword);
let boundDisablePass = this.disableAddPassIfInputEmpty.bind(this); let boundDisablePass = this.disableAddPassIfInputEmpty.bind(this);
$(document).on('keypress', newPasswordInput, boundDisablePass); $(document).on('keypress', newPasswordInput, boundDisablePass);
@ -300,12 +300,16 @@ export default class InviteDialogView {
$(newPasswordInput).on('keydown', (e) => { $(newPasswordInput).on('keydown', (e) => {
if (e.keyCode === ENTER_KEY) { if (e.keyCode === ENTER_KEY) {
e.stopPropagation(); e.stopPropagation();
this.setPassword(); this._setPassword();
} }
}); });
} }
setPassword() { /**
* Marking room as locked
* @private
*/
_setPassword() {
let $passInput = $('#newPasswordInput'); let $passInput = $('#newPasswordInput');
let newPass = $passInput.val(); let newPass = $passInput.val();