1
0
mirror of https://github.com/prasathmani/tinyfilemanager.git synced 2025-07-29 21:10:41 +02:00

Fixes #183, Fixes #289 (#400)

Fixes setting drop down boxes to the current ace editor mode and theme on page load.
This commit is contained in:
zachlankton
2020-07-19 20:07:41 -04:00
committed by GitHub
parent fb31a14873
commit 65f7dc448d

View File

@@ -3891,6 +3891,8 @@ $isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
if(_data && _data.aceMode) { $modeEl.html(optionNode("ace/mode/", _data.aceMode)); }
if(_data && _data.aceTheme) { var lightTheme = optionNode("ace/theme/", _data.aceTheme.bright), darkTheme = optionNode("ace/theme/", _data.aceTheme.dark); $themeEl.html("<optgroup label=\"Bright\">"+lightTheme+"</optgroup><optgroup label=\"Dark\">"+darkTheme+"</optgroup>");}
if(_data && _data.fontSize) { $fontSizeEl.html(optionNode("", _data.fontSize)); }
$modeEl.val( editor.getSession().$modeId );
$themeEl.val( editor.getTheme() );
$fontSizeEl.val(12).change(); //set default font size in drop down
}