mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
session key is now ignored and also padOptions are available in settings
This commit is contained in:
parent
43687f6e8b
commit
8ed12c7776
5 changed files with 48 additions and 1 deletions
|
@ -1182,6 +1182,7 @@ function handleClientReady(client, message)
|
|||
"userIsGuest": true,
|
||||
"userColor": authorColorId,
|
||||
"padId": message.padId,
|
||||
"padOptions": settings.padOptions,
|
||||
"initialTitle": "Pad: " + message.padId,
|
||||
"opts": {},
|
||||
// tell the client the number of the latest chat-message, which will be
|
||||
|
|
|
@ -84,6 +84,23 @@ exports.dbSettings = { "filename" : path.join(exports.root, "dirty.db") };
|
|||
*/
|
||||
exports.defaultPadText = "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nEtherpad on Github: http:\/\/j.mp/ep-lite\n";
|
||||
|
||||
/**
|
||||
* The default Pad Settings for a user (Can be overridden by changing the setting
|
||||
*/
|
||||
exports.padOptions = {
|
||||
"noColors": false,
|
||||
"showControls": true,
|
||||
"showChat": true,
|
||||
"showLineNumbers": true,
|
||||
"useMonospaceFont": false,
|
||||
"userName": false,
|
||||
"userColor": false,
|
||||
"rtl": false,
|
||||
"alwaysShowChat": false,
|
||||
"chatAndUsers": false,
|
||||
"lang": "en-gb"
|
||||
}
|
||||
|
||||
/**
|
||||
* The toolbar buttons and order.
|
||||
*/
|
||||
|
|
|
@ -126,6 +126,18 @@ var getParameters = [
|
|||
|
||||
function getParams()
|
||||
{
|
||||
// Tries server enforced options first..
|
||||
for(var i = 0; i < getParameters.length; i++)
|
||||
{
|
||||
var setting = getParameters[i];
|
||||
var value = clientVars.padOptions[setting.name];
|
||||
if(value.toString() === setting.checkVal)
|
||||
{
|
||||
setting.callback(value);
|
||||
}
|
||||
}
|
||||
|
||||
// Then URL applied stuff
|
||||
var params = getUrlVars()
|
||||
|
||||
for(var i = 0; i < getParameters.length; i++)
|
||||
|
@ -475,7 +487,6 @@ var pad = {
|
|||
{
|
||||
// start the custom js
|
||||
if (typeof customStart == "function") customStart();
|
||||
getParams();
|
||||
handshake();
|
||||
|
||||
// To use etherpad you have to allow cookies.
|
||||
|
@ -495,6 +506,8 @@ var pad = {
|
|||
|
||||
//initialize the chat
|
||||
chat.init(this);
|
||||
getParams();
|
||||
|
||||
padcookie.init(); // initialize the cookies
|
||||
pad.initTime = +(new Date());
|
||||
pad.padOptions = clientVars.initialOptions;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue