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.normal": "Normal",
"pad.settings.fontType.monospaced": "Monospace", "pad.settings.fontType.monospaced": "Monospace",
"pad.settings.globalView": "Global View", "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.settings.language": "Language:",
"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",

View file

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

View file

@ -374,21 +374,23 @@ function handshake()
// via a collabClient-message when they're changed later. // via a collabClient-message when they're changed later.
var viewSettings = clientVars.viewSettings; 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 // check if they are set, if they are overwrite whatever is set by the user
if (typeof(viewSettings.showLineNumbers) != "undefined") if (typeof(viewSettings.showLineNumbers) != "undefined")
{ {
pad.changeViewOption('showLineNumbers', viewSettings.showLineNumbers, true); pad.changeViewOption('showLineNumbers', viewSettings.showLineNumbers, true);
$("#options-global-linenoscheck").prop('checked', viewSettings.showLineNumbers);
} }
if (typeof(viewSettings.showAuthorColors) != "undefined") if (typeof(viewSettings.showAuthorColors) != "undefined")
{ {
pad.changeViewOption('showAuthorColors', viewSettings.showAuthorColors, true); pad.changeViewOption('showAuthorColors', viewSettings.showAuthorColors, true);
$("#options-global-colorscheck").prop('checked', viewSettings.showAuthorColors);
} }
if (typeof(viewSettings.useMonospaceFont) != "undefined") if (typeof(viewSettings.useMonospaceFont) != "undefined")
{ {
pad.changeViewOption('useMonospaceFont', viewSettings.useMonospaceFont, true); pad.changeViewOption('useMonospaceFont', viewSettings.useMonospaceFont, true);
$("#global-viewfontmenu").val(viewSettings.useMonospaceFont ? "monospace" : "normal");
} }
// if the globalUserName value is set we need to tell the server and the client about the new authorname // 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); v = getOption('showLineNumbers', true);
self.ace.setProperty("showslinenumbers", v); self.ace.setProperty("showslinenumbers", v);
if(!global) if(global)
padutils.setCheckbox($("#options-global-linenoscheck"), v);
else
padutils.setCheckbox($("#options-linenoscheck"), v); padutils.setCheckbox($("#options-linenoscheck"), v);
v = getOption('showAuthorColors', true); v = getOption('showAuthorColors', true);
self.ace.setProperty("showsauthorcolors", v); self.ace.setProperty("showsauthorcolors", v);
if(!global) if(global)
padutils.setCheckbox($("#options-global-colorscheck"), v);
else
padutils.setCheckbox($("#options-colorscheck"), v); padutils.setCheckbox($("#options-colorscheck"), v);
// Override from parameters if true // Override from parameters if true
if (settings.noColors !== false) if (settings.noColors !== false)
@ -141,7 +145,9 @@ var padeditor = (function()
v = getOption('useMonospaceFont', false); v = getOption('useMonospaceFont', false);
self.ace.setProperty("textface", (v ? "monospace" : "Arial, sans-serif")); 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"); $("#viewfontmenu").val(v ? "monospace" : "normal");
}, },
dispose: function() dispose: function()

View file

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