mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
editorTheme not setting custom css/scripts properly
This commit is contained in:
parent
347e598715
commit
70a22187f7
@ -98,11 +98,11 @@ module.exports = {
|
|||||||
if (theme.page) {
|
if (theme.page) {
|
||||||
|
|
||||||
themeContext.page.css = serveFilesFromTheme(
|
themeContext.page.css = serveFilesFromTheme(
|
||||||
themeContext.page.css,
|
theme.page.css,
|
||||||
themeApp,
|
themeApp,
|
||||||
"/css/")
|
"/css/")
|
||||||
themeContext.page.scripts = serveFilesFromTheme(
|
themeContext.page.scripts = serveFilesFromTheme(
|
||||||
themeContext.page.scripts,
|
theme.page.scripts,
|
||||||
themeApp,
|
themeApp,
|
||||||
"/scripts/")
|
"/scripts/")
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ describe("theme handler", function() {
|
|||||||
page: {
|
page: {
|
||||||
title: "Test Page Title",
|
title: "Test Page Title",
|
||||||
favicon: "/absolute/path/to/theme/icon",
|
favicon: "/absolute/path/to/theme/icon",
|
||||||
css: "/absolute/path/to/custom/css/file",
|
css: "/absolute/path/to/custom/css/file.css",
|
||||||
scripts: "/absolute/path/to/script.js"
|
scripts: "/absolute/path/to/script.js"
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
@ -99,7 +99,12 @@ describe("theme handler", function() {
|
|||||||
context.should.have.a.property("header");
|
context.should.have.a.property("header");
|
||||||
context.header.should.have.a.property("title","Test Header Title");
|
context.header.should.have.a.property("title","Test Header Title");
|
||||||
context.page.should.have.a.property("css");
|
context.page.should.have.a.property("css");
|
||||||
|
context.page.css.should.have.lengthOf(1);
|
||||||
|
context.page.css[0].should.eql('theme/css/file.css');
|
||||||
|
|
||||||
context.page.should.have.a.property("scripts");
|
context.page.should.have.a.property("scripts");
|
||||||
|
context.page.scripts.should.have.lengthOf(1);
|
||||||
|
context.page.scripts[0].should.eql('theme/scripts/script.js');
|
||||||
|
|
||||||
var settings = theme.settings();
|
var settings = theme.settings();
|
||||||
settings.should.have.a.property("deployButton");
|
settings.should.have.a.property("deployButton");
|
||||||
|
Loading…
Reference in New Issue
Block a user