Disable design mode in readonly pad

pull/661/head
Egil Moeller 2012-04-23 16:41:41 +02:00
parent ba3430ebb7
commit e559ef5640
2 changed files with 6 additions and 1 deletions

View File

@ -848,6 +848,7 @@ function handleClientReady(client, message)
"numConnectedUsers": pad2sessions[padIds.padId].length, "numConnectedUsers": pad2sessions[padIds.padId].length,
"isProPad": false, "isProPad": false,
"readOnlyId": padIds.readOnlyPadId, "readOnlyId": padIds.readOnlyPadId,
"readonly": padIds.readonly,
"serverTimestamp": new Date().getTime(), "serverTimestamp": new Date().getTime(),
"globalPadId": message.padId, "globalPadId": message.padId,
"userId": author, "userId": author,

View File

@ -319,11 +319,15 @@ function handshake()
clientVars = obj.data; clientVars = obj.data;
clientVars.userAgent = "Anonymous"; clientVars.userAgent = "Anonymous";
clientVars.collab_client_vars.clientAgent = "Anonymous"; clientVars.collab_client_vars.clientAgent = "Anonymous";
//initalize the pad //initalize the pad
pad._afterHandshake(); pad._afterHandshake();
initalized = true; initalized = true;
padeditor.ace.callWithAce(function (ace) {
ace.ace_setEditable(!clientVars.readonly);
});
// If the LineNumbersDisabled value is set to true then we need to hide the Line Numbers // If the LineNumbersDisabled value is set to true then we need to hide the Line Numbers
if (settings.LineNumbersDisabled == true) if (settings.LineNumbersDisabled == true)
{ {