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:
jaseg 2011-12-08 22:45:54 +01:00
parent c905fd76c1
commit a161b59601
8 changed files with 56 additions and 49 deletions

View file

@ -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 = {