Skip to content
Snippets Groups Projects
Commit 4a342e37 authored by codedust's avatar codedust
Browse files

Add config parameter for preview pictures directory

Closes #20
parent 160468fe
No related branches found
No related tags found
No related merge requests found
......@@ -124,6 +124,12 @@ var firmwarewizard = function() {
rePrettyPrintVersionRegex = new RegExp(config.prettyPrintVersionRegex);
}
var PREVIEW_PICTURES_DIR = 'pictures/';
if(config.preview_pictures !== undefined) {
PREVIEW_PICTURES_DIR = config.preview_pictures;
}
function buildVendorModelsReverse() {
var vendormodels_reverse = {};
......@@ -577,7 +583,8 @@ var firmwarewizard = function() {
}
var image = document.createElement('img');
image.src = 'pictures/'+images[vendor][model][latestRevisionIndex].preview;
image.src = PREVIEW_PICTURES_DIR+images[vendor][model][latestRevisionIndex].preview;
image.alt = name;
image.addEventListener('error', firmwarewizard.setDefaultImg);
......
......@@ -27,5 +27,6 @@ var config = {
// some demo sources
'./images/gluon-factory-example.html': 'stable',
'./images/gluon-sysupgrade-example.html': 'stable'
}
},
preview_pictures: 'pictures/'
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment