Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon Firmware Selector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon Firmware Selector
Commits
4a342e37
Commit
4a342e37
authored
Mar 31, 2017
by
codedust
Browse files
Options
Downloads
Patches
Plain Diff
Add config parameter for preview pictures directory
Closes #20
parent
160468fe
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.js
+8
-1
8 additions, 1 deletion
app.js
config_template.js
+2
-1
2 additions, 1 deletion
config_template.js
with
10 additions
and
2 deletions
app.js
+
8
−
1
View file @
4a342e37
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
config_template.js
+
2
−
1
View file @
4a342e37
...
...
@@ -27,5 +27,6 @@ var config = {
// some demo sources
'
./images/gluon-factory-example.html
'
:
'
stable
'
,
'
./images/gluon-sysupgrade-example.html
'
:
'
stable
'
}
},
preview_pictures
:
'
pictures/
'
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment