mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-15 03:26:53 -04:00
Added a checkbox to ignore global settings
This commit is contained in:
parent
c7b83928b0
commit
0266ea3066
4 changed files with 11 additions and 1 deletions
|
@ -35,6 +35,7 @@
|
||||||
"pad.settings.globalView": "Global View",
|
"pad.settings.globalView": "Global View",
|
||||||
"pad.settings.globalView.warning": "Warning: This will affect everyone's view of this pad.",
|
"pad.settings.globalView.warning": "Warning: This will affect everyone's view of this pad.",
|
||||||
"pad.settings.language": "Language:",
|
"pad.settings.language": "Language:",
|
||||||
|
"pad.settings.ignoreglobal": "Ignore global settings",
|
||||||
"pad.importExport.import_export": "Import/Export",
|
"pad.importExport.import_export": "Import/Export",
|
||||||
"pad.importExport.import": "Upload any text file or document",
|
"pad.importExport.import": "Upload any text file or document",
|
||||||
"pad.importExport.importSuccessful": "Successful!",
|
"pad.importExport.importSuccessful": "Successful!",
|
||||||
|
|
|
@ -426,7 +426,8 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
|
||||||
}
|
}
|
||||||
else if (msg.type == "GLOBAL_SETTING_CHANGED")
|
else if (msg.type == "GLOBAL_SETTING_CHANGED")
|
||||||
{
|
{
|
||||||
pad.changeViewOption(msg.setting, msg.value, true);
|
if(!pad.padOptions.ignoreGlobalSettings)
|
||||||
|
pad.changeViewOption(msg.setting, msg.value, true);
|
||||||
}
|
}
|
||||||
else if (msg.type == "SERVER_MESSAGE")
|
else if (msg.type == "SERVER_MESSAGE")
|
||||||
{
|
{
|
||||||
|
|
|
@ -86,6 +86,10 @@ var padeditor = (function()
|
||||||
{
|
{
|
||||||
pad.collabClient.changeGlobalSetting("showAuthorColors", $("#options-global-colorscheck").prop('checked'));
|
pad.collabClient.changeGlobalSetting("showAuthorColors", $("#options-global-colorscheck").prop('checked'));
|
||||||
});
|
});
|
||||||
|
padutils.bindCheckboxChange($("#options-ignore-global"), function()
|
||||||
|
{
|
||||||
|
pad.padOptions.ignoreGlobalSettings = $("#options-ignore-global").prop('checked');
|
||||||
|
});
|
||||||
$("#global-viewfontmenu").change(function()
|
$("#global-viewfontmenu").change(function()
|
||||||
{
|
{
|
||||||
pad.collabClient.changeGlobalSetting("useMonospaceFont", $("#global-viewfontmenu").val() == 'monospace');
|
pad.collabClient.changeGlobalSetting("useMonospaceFont", $("#global-viewfontmenu").val() == 'monospace');
|
||||||
|
|
|
@ -217,6 +217,10 @@
|
||||||
<input type="checkbox" id="options-linenoscheck" checked>
|
<input type="checkbox" id="options-linenoscheck" checked>
|
||||||
<label for="options-linenoscheck" data-l10n-id="pad.settings.linenocheck"></label>
|
<label for="options-linenoscheck" data-l10n-id="pad.settings.linenocheck"></label>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<input type="checkbox" id="options-ignore-global">
|
||||||
|
<label for="options-ignore-global" data-l10n-id="pad.settings.ignoreglobal"></label>
|
||||||
|
</p>
|
||||||
<% e.end_block(); %>
|
<% e.end_block(); %>
|
||||||
<table>
|
<table>
|
||||||
<% e.begin_block("mySettings.dropdowns"); %>
|
<% e.begin_block("mySettings.dropdowns"); %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue