Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DMDesign
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
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amanda Ghassaei
DMDesign
Commits
53ea660e
Commit
53ea660e
authored
9 years ago
by
Amanda Ghassaei
Browse files
Options
Downloads
Patches
Plain Diff
eod
parent
51dffe88
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/menus/templates/EditComponentMenuView.html
+28
-26
28 additions, 26 deletions
js/menus/templates/EditComponentMenuView.html
with
28 additions
and
26 deletions
js/menus/templates/EditComponentMenuView.html
+
28
−
26
View file @
53ea660e
<
%
var
thisComponent =
components[editingComponent]
||
stock
[
editingComponent
];
%
>
<
%
var
thisComponent =
components[editingComponent]
||
stock
[
editingComponent
];
%
>
<
%
var
isStock =
stock[editingComponent];
%
>
Name:
<input
data-property=
"name"
value=
"<%= thisComponent.name %>"
placeholder=
"Enter Name"
class=
"seventyFiveWidth form-control textInput component"
type=
"text"
><br/><br/>
Name:
<input
data-property=
"name"
value=
"<%= thisComponent.name %>"
placeholder=
"Enter Name"
class=
"seventyFiveWidth form-control textInput component"
type=
"text"
><br/><br/>
Parent:
Parent:
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
...
@@ -10,30 +11,31 @@ Parent:
...
@@ -10,30 +11,31 @@ Parent:
<
%
});
%
>
<
%
});
%
>
</ul>
</ul>
</div><br/><br/>
</div><br/><br/>
Children:
<
%
if
(!
isStock
){
%
>
<div
class=
"btn-group"
>
Children:
<button
data-toggle=
"dropdown"
class=
"btn dropdown-toggle"
type=
"button"
>
+ Add Child
<span
class=
"caret"
></span></button>
<div
class=
"btn-group pull-right"
>
<ul
role=
"menu"
class=
"dropdown-menu"
>
<button
data-toggle=
"dropdown"
class=
"btn dropdown-toggle"
type=
"button"
>
+ Add Child
<span
class=
"caret"
></span></button>
<
%
_.each
(
components
,
function
(
component
,
id
){
%
>
<ul
role=
"menu"
class=
"dropdown-menu"
>
<
%
if
(component.id =
=
editingComponent
||
component.id =
=
thisComponent.parent
)
return
;
%
>
<
%
_.each
(
components
,
function
(
component
,
id
){
%
>
<li><a
class=
"component dropdownSelector"
data-property=
"newChild"
data-value=
"<%= id %>"
href=
"#"
><
%=
component.name
%
></a></li>
<
%
if
(component.id =
=
editingComponent
||
component.id =
=
thisComponent.parent
)
return
;
%
>
<
%
});
%
>
<li><a
class=
"component dropdownSelector"
data-property=
"newChild"
data-value=
"<%= id %>"
href=
"#"
><
%=
component.name
%
></a></li>
<
%
_.each
(
stock
,
function
(
thisStock
,
id
){
%
>
<
%
});
%
>
<li><a
class=
"component dropdownSelector"
data-property=
"newChild"
data-value=
"<%= id %>"
href=
"#"
><
%=
thisStock.name
%
></a></li>
<
%
_.each
(
stock
,
function
(
thisStock
,
id
){
%
>
<
%
});
%
>
<li><a
class=
"component dropdownSelector"
data-property=
"newChild"
data-value=
"<%= id %>"
href=
"#"
><
%=
thisStock.name
%
></a></li>
</ul>
<
%
});
%
>
</div><br/><br/>
</ul>
<
%
var
treeLevel =
0;
%
>
</div><br/><br/>
<
%
_.each
(
tree
,
function
(
level
,
id
){
%
>
<
%
var
treeLevel =
0;
%
>
<
%
if
(
tree
[
editingComponent
]
>
= level) return; %>
<
%
_.each
(
tree
,
function
(
level
,
id
){
%
>
<
%
var
component =
components[id]
||
stock
[
id
];
%
>
<
%
if
(
tree
[
editingComponent
]
>
= level) return; %>
<
%
treeLevel
++;
%
>
<
%
var
component =
components[id]
||
stock
[
id
];
%
>
<div
class=
"assemblerTree"
<%
if
(
treeLevel
%2
==
0){
%
>
style="background-color:#ddd"
<
%
}
%
>
>
<label
style=
"padding-left:<%= (level-tree[editingComponent]-1)*10 + 20 %>px"
><
%=
component.name
%
>
<
%
treeLevel
++;
%
>
<
%
if
(
tree
[
editingComponent
]+1
==
level
){
%
><a
data-id=
"<%= id %>"
class=
"editMachineComponent pull-right"
href=
"#"
>
Remove
</a><
%
}
%
></label></div><br/>
<div
class=
"assemblerTree"
<%
if
(
treeLevel
%2
==
0){
%
>
style="background-color:#ddd"
<
%
}
%
>
>
<label
style=
"padding-left:<%= (level-tree[editingComponent]-1)*10 + 20 %>px"
><
%=
component.name
%
>
<
%
});
%
><br/>
<
%
if
(
tree
[
editingComponent
]+1
==
level
){
%
><a
data-id=
"<%= id %>"
class=
"editMachineComponent pull-right"
href=
"#"
>
Remove
</a><
%
}
%
></label></div><br/>
<
%
});
%
><br/>
STL:
STL Name
<br/><br/>
STL:
STL Name
<br/><br/>
<a
id=
"uploadStl"
href=
"#"
class=
"btn btn-block btn-lg btn-default"
>
Upload STL
</a><br/>
<a
id=
"uploadStl"
href=
"#"
class=
"btn btn-block btn-lg btn-default"
>
Upload STL
</a><br/>
<
%
}
%
>
Offset (xyz):
Offset (xyz):
<input
data-property=
"translation"
data-key=
"x"
value=
"<%= translation.x %>"
placeholder=
"X"
class=
"form-control floatInput component"
type=
"text"
>
<input
data-property=
"translation"
data-key=
"x"
value=
"<%= translation.x %>"
placeholder=
"X"
class=
"form-control floatInput component"
type=
"text"
>
<input
data-property=
"translation"
data-key=
"y"
value=
"<%= translation.y %>"
placeholder=
"Y"
class=
"form-control floatInput component"
type=
"text"
>
<input
data-property=
"translation"
data-key=
"y"
value=
"<%= translation.y %>"
placeholder=
"Y"
class=
"form-control floatInput component"
type=
"text"
>
...
@@ -42,7 +44,7 @@ Rotation (xyz):
...
@@ -42,7 +44,7 @@ Rotation (xyz):
<input
data-property=
"rotation"
data-key=
"x"
value=
"<%= rotation.x %>"
placeholder=
"X"
class=
"form-control floatInput component"
type=
"text"
>
<input
data-property=
"rotation"
data-key=
"x"
value=
"<%= rotation.x %>"
placeholder=
"X"
class=
"form-control floatInput component"
type=
"text"
>
<input
data-property=
"rotation"
data-key=
"y"
value=
"<%= rotation.y %>"
placeholder=
"Y"
class=
"form-control floatInput component"
type=
"text"
>
<input
data-property=
"rotation"
data-key=
"y"
value=
"<%= rotation.y %>"
placeholder=
"Y"
class=
"form-control floatInput component"
type=
"text"
>
<input
data-property=
"rotation"
data-key=
"z"
value=
"<%= rotation.z %>"
placeholder=
"Z"
class=
"form-control floatInput component"
type=
"text"
><br/><br/>
<input
data-property=
"rotation"
data-key=
"z"
value=
"<%= rotation.z %>"
placeholder=
"Z"
class=
"form-control floatInput component"
type=
"text"
><br/><br/>
Scale:
<input
data-property=
"scale"
value=
"<%= scale %>"
placeholder=
"Scale"
class=
"form-control floatInput component"
type=
"text"
><br/><br/>
<
%
if
(!
isStock
){
%
>
Scale:
<input
data-property=
"scale"
value=
"<%= scale %>"
placeholder=
"Scale"
class=
"form-control floatInput component"
type=
"text"
><br/><br/>
<
%
}
%
>
<a
id=
"finishComponent"
href=
"#"
class=
"btn btn-block btn-lg btn-success"
>
Save Component
</a><br/>
<a
id=
"finishComponent"
href=
"#"
class=
"btn btn-block btn-lg btn-success"
>
Save
<
%
if
(
isStock
){
%
>
Stock
<
%
}
else
{
%
>
Component
<
%
}
%
><
/a><br/>
<a
id=
"deleteComponent"
href=
"#"
class=
"btn btn-halfWidth btn-lg btn-default"
><span
class=
"fui-trash"
></span>
Delete
</a>
<a
id=
"deleteComponent"
href=
"#"
class=
"btn btn-halfWidth btn-lg btn-default"
><span
class=
"fui-trash"
></span>
Delete
</a>
<a
id=
"cancelComponent"
href=
"#"
class=
"btn btn-halfWidth pull-right btn-lg btn-default"
>
Cancel / Exit
</a><br/><br/>
<a
id=
"cancelComponent"
href=
"#"
class=
"btn btn-halfWidth pull-right btn-lg btn-default"
>
Cancel / Exit
</a><br/><br/>
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