mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
Now working. The password can be set from within the pad editor.
Currently there are only two remaining issues: 1 After the password is set, re-authentication is needed 2 The toolbar button does not yet have a nice icon
This commit is contained in:
parent
c905fd76c1
commit
a161b59601
8 changed files with 56 additions and 49 deletions
|
@ -51,6 +51,11 @@ function createCookie(name, value, days, path)
|
|||
document.cookie = name + "=" + value + expires + "; path=" + path;
|
||||
}
|
||||
|
||||
function setPassword(){
|
||||
console.log("setting password");
|
||||
pad.setPassword($("#setpasswordfield").val());
|
||||
}
|
||||
|
||||
function readCookie(name)
|
||||
{
|
||||
var nameEQ = name + "=";
|
||||
|
@ -489,6 +494,13 @@ var pad = {
|
|||
changedBy: pad.myUserInfo.name || "unnamed"
|
||||
});
|
||||
},
|
||||
setPassword: function(newPassword){
|
||||
pad.collabClient.sendClientMessage(
|
||||
{
|
||||
type: "setPassword",
|
||||
password: newPassword
|
||||
});
|
||||
},
|
||||
changeViewOption: function(key, value)
|
||||
{
|
||||
var options = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue