skins: finalize support for multiple skins

The old "static/custom" directory is replaced by "static/skins/<skinName>",
where <skinName> is taken from settings.json.
When no value is found, a default of "no-skin" is assumed, so that backward
compatibility is maintained.

The most evident security concerns have been addressed.

Closes #3471.
This commit is contained in:
muxator 2018-08-26 03:43:53 +02:00 committed by muxator
parent e34c74b24d
commit 9c990ab08a
5 changed files with 14 additions and 14 deletions

View file

@ -230,7 +230,7 @@ function Ace2Editor()
// disableCustomScriptsAndStyles can be used to disable loading of custom scripts
if(!clientVars.disableCustomScriptsAndStyles){
$$INCLUDE_CSS("../static/css/pad.css");
$$INCLUDE_CSS("../static/custom/pad.css");
$$INCLUDE_CSS(`../static/skins/${clientVars.skinName}/pad.css`);
}
var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){
@ -314,7 +314,7 @@ window.onload = function () {\n\
var $$INCLUDE_CSS = function(filename) {includedCSS.push(filename)};
$$INCLUDE_CSS("../static/css/iframe_editor.css");
$$INCLUDE_CSS("../static/css/pad.css");
$$INCLUDE_CSS("../static/custom/pad.css");
$$INCLUDE_CSS(`../static/skins/${clientVars.skinName}/pad.css`);
var additionalCSS = _(hooks.callAll("aceEditorCSS")).map(function(path){