Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
macaronideath
fc-pregmod
Commits
6e788054
Commit
6e788054
authored
4 years ago
by
lowercasedonkey
Browse files
Options
Downloads
Patches
Plain Diff
fixes
parent
1dacf47a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/facilities/toyShop/toyShop.js
+34
-12
34 additions, 12 deletions
src/facilities/toyShop/toyShop.js
with
34 additions
and
12 deletions
src/facilities/toyShop/toyShop.js
+
34
−
12
View file @
6e788054
...
@@ -40,9 +40,6 @@ App.UI.toyShop = function() {
...
@@ -40,9 +40,6 @@ App.UI.toyShop = function() {
let
linkArray
;
let
linkArray
;
App
.
UI
.
DOM
.
appendNewElement
(
"
h2
"
,
el
,
"
Buttplugs
"
);
App
.
UI
.
DOM
.
appendNewElement
(
"
h2
"
,
el
,
"
Buttplugs
"
);
el
.
append
(
create
());
el
.
append
(
create
());
if
(
V
.
customItem
.
buttPlugs
.
size
>
0
)
{
//el.append(reviewDesigns());
}
return
el
;
return
el
;
function
create
()
{
function
create
()
{
...
@@ -54,10 +51,14 @@ App.UI.toyShop = function() {
...
@@ -54,10 +51,14 @@ App.UI.toyShop = function() {
length
(),
length
(),
apply
(),
apply
(),
);
);
if
(
V
.
customItem
.
buttPlugs
.
size
>
0
)
{
el
.
append
(
reviewDesigns
());
}
return
el
;
return
el
;
}
}
function
reviewDesigns
()
{
function
reviewDesigns
()
{
const
el
=
new
DocumentFragment
();
const
el
=
document
.
createElement
(
"
p
"
);
App
.
UI
.
DOM
.
appendNewElement
(
"
h3
"
,
el
,
"
Tweak existing design
"
);
const
choice
=
App
.
UI
.
DOM
.
appendNewElement
(
"
div
"
,
el
,
` Choose an existing design to edit `
);
const
choice
=
App
.
UI
.
DOM
.
appendNewElement
(
"
div
"
,
el
,
` Choose an existing design to edit `
);
const
select
=
App
.
UI
.
DOM
.
appendNewElement
(
"
select
"
,
choice
);
const
select
=
App
.
UI
.
DOM
.
appendNewElement
(
"
select
"
,
choice
);
for
(
const
[
key
,
values
]
of
V
.
customItem
.
buttPlugs
)
{
for
(
const
[
key
,
values
]
of
V
.
customItem
.
buttPlugs
)
{
...
@@ -67,23 +68,38 @@ App.UI.toyShop = function() {
...
@@ -67,23 +68,38 @@ App.UI.toyShop = function() {
select
.
onchange
=
()
=>
{
select
.
onchange
=
()
=>
{
const
O
=
select
.
options
[
select
.
selectedIndex
];
const
O
=
select
.
options
[
select
.
selectedIndex
];
selectedPlug
=
O
.
value
;
selectedPlug
=
O
.
value
;
buttPlugName
=
selectedPlug
;
buttPlugData
=
V
.
customItem
.
buttPlugs
.
get
(
selectedPlug
);
refresh
();
refresh
();
};
};
buttPlugName
=
selectedPlug
;
buttPlugData
=
V
.
customItem
.
buttPlugs
.
get
(
selectedPlug
);
el
.
append
(
el
.
append
(
desc
(),
desc
Locked
(),
title
Locked
(),
title
(),
width
(),
width
(),
length
(),
length
(),
apply
(),
);
);
const
build
=
App
.
UI
.
DOM
.
appendNewElement
(
"
div
"
,
el
,
`Send updated design to production and make sure all appropriate slaves are updated `
);
const
linkArray
=
[];
linkArray
.
push
(
App
.
UI
.
DOM
.
link
(
"
Update the mold
"
,
()
=>
{
buildPlug
();
}
)
);
linkArray
.
push
(
App
.
UI
.
DOM
.
link
(
`Recall "
${
buttPlugName
}
"`
,
()
=>
{
deletePlug
();
}
)
);
build
.
append
(
App
.
UI
.
DOM
.
generateLinksStrip
(
linkArray
));
return
el
;
return
el
;
function
title
Locked
()
{
function
desc
Locked
()
{
// Title
// Title
return
App
.
UI
.
DOM
.
makeElement
(
"
div
"
,
`
Title
has already been selected for this model`
);
return
App
.
UI
.
DOM
.
makeElement
(
"
div
"
,
`
Description
has already been selected for this model
: "
${
buttPlugName
}
"
`
);
}
}
}
}
...
@@ -198,7 +214,13 @@ App.UI.toyShop = function() {
...
@@ -198,7 +214,13 @@ App.UI.toyShop = function() {
function
deletePlug
()
{
function
deletePlug
()
{
V
.
customItem
.
buttPlugs
.
delete
(
buttPlugName
);
for
(
const
slave
of
V
.
slaves
)
{
if
(
slave
.
buttplug
===
buttPlugName
)
{
slave
.
buttplug
=
"
none
"
;
}
}
refresh
();
}
}
}
}
...
...
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