Made warning bold and gray, sync checkbox-states, fixed initial checkbox-states, fixed engrish

This commit is contained in:
mluto 2013-01-27 20:57:47 +01:00
parent 12fee1a46b
commit 48432d2b09
5 changed files with 19 additions and 10 deletions

View file

@ -33,7 +33,7 @@
"pad.settings.fontType.normal": "Normal",
"pad.settings.fontType.monospaced": "Monospace",
"pad.settings.globalView": "Global View",
"pad.settings.globalView.warning": "Warning: This will effect everyones view of this pad.",
"pad.settings.globalView.warning": "Warning: This will affect everyone's view of this pad.",
"pad.settings.language": "Language:",
"pad.importExport.import_export": "Import/Export",
"pad.importExport.import": "Upload any text file or document",

View file

@ -808,7 +808,8 @@ input[type=checkbox] {
z-index: 500;
}
#globalViewWarning {
color: red;
color: gray;
font-weight: bold;
font-size: 10px;
}
.stickyChat {

View file

@ -374,21 +374,23 @@ function handshake()
// via a collabClient-message when they're changed later.
var viewSettings = clientVars.viewSettings;
// set the private options here if there is no global setting
$("#options-global-colorscheck").prop("checked", $("#options-colorscheck").prop("checked"));
$("#options-global-linenoscheck").prop("checked", $("#options-linenoscheck").prop("checked"));
$("#global-viewfontmenu").val($("#global-viewfontmenu").val());
// check if they are set, if they are overwrite whatever is set by the user
if (typeof(viewSettings.showLineNumbers) != "undefined")
{
pad.changeViewOption('showLineNumbers', viewSettings.showLineNumbers, true);
$("#options-global-linenoscheck").prop('checked', viewSettings.showLineNumbers);
}
if (typeof(viewSettings.showAuthorColors) != "undefined")
{
pad.changeViewOption('showAuthorColors', viewSettings.showAuthorColors, true);
$("#options-global-colorscheck").prop('checked', viewSettings.showAuthorColors);
}
if (typeof(viewSettings.useMonospaceFont) != "undefined")
{
pad.changeViewOption('useMonospaceFont', viewSettings.useMonospaceFont, true);
$("#global-viewfontmenu").val(viewSettings.useMonospaceFont ? "monospace" : "normal");
pad.changeViewOption('useMonospaceFont', viewSettings.useMonospaceFont, true);
}
// if the globalUserName value is set we need to tell the server and the client about the new authorname

View file

@ -128,12 +128,16 @@ var padeditor = (function()
v = getOption('showLineNumbers', true);
self.ace.setProperty("showslinenumbers", v);
if(!global)
if(global)
padutils.setCheckbox($("#options-global-linenoscheck"), v);
else
padutils.setCheckbox($("#options-linenoscheck"), v);
v = getOption('showAuthorColors', true);
self.ace.setProperty("showsauthorcolors", v);
if(!global)
if(global)
padutils.setCheckbox($("#options-global-colorscheck"), v);
else
padutils.setCheckbox($("#options-colorscheck"), v);
// Override from parameters if true
if (settings.noColors !== false)
@ -141,7 +145,9 @@ var padeditor = (function()
v = getOption('useMonospaceFont', false);
self.ace.setProperty("textface", (v ? "monospace" : "Arial, sans-serif"));
if(!global)
if(global)
$("#global-viewfontmenu").val(v ? "monospace" : "normal");
else
$("#viewfontmenu").val(v ? "monospace" : "normal");
},
dispose: function()

View file

@ -254,7 +254,7 @@
<label for="options-global-colorscheck" data-l10n-id="pad.settings.colorcheck"></label>
</p>
<p>
<input type="checkbox" id="options-global-linenoscheck" checked>
<input type="checkbox" id="options-global-linenoscheck">
<label for="options-global-linenoscheck" data-l10n-id="pad.settings.linenocheck"></label>
</p>
<% e.begin_block("globalSettings.dropdowns"); %>