Changes the padlock to locked when a participant is entering a locked room and still haven't entered the key. We show padlock locked whenever the room requires a key to enter.
This commit is contained in:
parent
0f431eec5d
commit
de04bb8ef1
6
app.js
6
app.js
|
@ -719,9 +719,6 @@ $(document).bind('entered.muc', function (event, jid, info, pres) {
|
|||
focus.addNewParticipant(jid);
|
||||
}
|
||||
}
|
||||
else if (sharedKey) {
|
||||
Toolbar.updateLockButton();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).bind('left.muc', function (event, jid) {
|
||||
|
@ -860,6 +857,9 @@ $(document).bind('presence.status.muc', function (event, jid, info, pres) {
|
|||
$(document).bind('passwordrequired.muc', function (event, jid) {
|
||||
console.log('on password required', jid);
|
||||
|
||||
// password is required
|
||||
Toolbar.lockLockButton();
|
||||
|
||||
messageHandler.openTwoButtonDialog(null,
|
||||
'<h2>Password required</h2>' +
|
||||
'<input id="lockKey" type="text" placeholder="password" autofocus>',
|
||||
|
|
|
@ -209,6 +209,13 @@ var Toolbar = (function (my) {
|
|||
my.updateLockButton = function() {
|
||||
buttonClick("#lockIcon", "icon-security icon-security-locked");
|
||||
};
|
||||
/**
|
||||
* Updates the lock button state to locked.
|
||||
*/
|
||||
my.lockLockButton = function() {
|
||||
if($("#lockIcon").hasClass("icon-security"))
|
||||
buttonClick("#lockIcon", "icon-security icon-security-locked");
|
||||
};
|
||||
|
||||
// Shows or hides the 'recording' button.
|
||||
my.showRecordingButton = function (show) {
|
||||
|
|
Loading…
Reference in New Issue