mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
font picker: improve the font picker (closes #3451)
Preparatory work for introducing colibris skin
This commit is contained in:
parent
c5a07e6827
commit
63ec2d8cc2
3 changed files with 45 additions and 84 deletions
|
@ -314,7 +314,7 @@ function handshake()
|
|||
// If the Monospacefont value is set to true then change it to monospace.
|
||||
if (settings.useMonospaceFontGlobal == true)
|
||||
{
|
||||
pad.changeViewOption('useMonospaceFont', true);
|
||||
pad.changeViewOption('padFontFamily', 'monospace');
|
||||
}
|
||||
// if the globalUserName value is set we need to tell the server and the client about the new authorname
|
||||
if (settings.globalUserName !== false)
|
||||
|
@ -560,19 +560,7 @@ var pad = {
|
|||
if(padcookie.getPref("rtlIsTrue") == true){
|
||||
pad.changeViewOption('rtlIsTrue', true);
|
||||
}
|
||||
|
||||
|
||||
var fonts = ['useMonospaceFont', 'useMontserratFont', 'useOpenDyslexicFont', 'useComicSansFont', 'useCourierNewFont',
|
||||
'useGeorgiaFont', 'useImpactFont', 'useLucidaFont', 'useLucidaSansFont', 'usePalatinoFont', 'useRobotoMonoFont',
|
||||
'useTahomaFont', 'useTimesNewRomanFont', 'useTrebuchetFont', 'useVerdanaFont', 'useSymbolFont', 'useWebdingsFont',
|
||||
'useWingDingsFont', 'useSansSerifFont', 'useSerifFont'];
|
||||
|
||||
|
||||
$.each(fonts, function(i, font){
|
||||
if(padcookie.getPref(font) == true){
|
||||
pad.changeViewOption(font, true);
|
||||
}
|
||||
})
|
||||
pad.changeViewOption('padFontFamily', padcookie.getPref("padFontFamily"));
|
||||
|
||||
hooks.aCallAll("postAceInit", {ace: padeditor.ace, pad: pad});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue