Skip to content
Snippets Groups Projects
Commit 53ea660e authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

eod

parent 51dffe88
Branches
No related tags found
No related merge requests found
<% var thisComponent = components[editingComponent] || stock[editingComponent]; %>
<% var isStock = stock[editingComponent]; %>
Name: &nbsp;&nbsp;<input data-property="name" value="<%= thisComponent.name %>" placeholder="Enter Name" class="seventyFiveWidth form-control textInput component" type="text"><br/><br/>
Parent: &nbsp;&nbsp;
<div class="btn-group">
......@@ -10,30 +11,31 @@ Parent: &nbsp;&nbsp;
<% }); %>
</ul>
</div><br/><br/>
Children: &nbsp;&nbsp;
<div class="btn-group">
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button">+ Add Child<span class="caret"></span></button>
<ul role="menu" class="dropdown-menu">
<% _.each(components, function(component, id){ %>
<% 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>
<% }); %>
</ul>
</div><br/><br/>
<% var treeLevel = 0; %>
<% _.each(tree, function(level, id){ %>
<% if (tree[editingComponent] >= level) return; %>
<% var component = components[id] || stock[id]; %>
<% treeLevel++; %>
<div class="assemblerTree" <% if (treeLevel%2 == 0){ %> style="background-color:#ddd"<% } %> ><label style="padding-left:<%= (level-tree[editingComponent]-1)*10 + 20 %>px"><%= component.name %>
<% if(tree[editingComponent]+1 == level){ %><a data-id="<%= id %>" class="editMachineComponent pull-right" href="#">Remove</a><% } %></label></div><br/>
<% }); %><br/>
STL: &nbsp;&nbsp;STL Name<br/><br/>
<a id="uploadStl" href="#" class="btn btn-block btn-lg btn-default">Upload STL</a><br/>
<% if(!isStock){ %>
Children: &nbsp;&nbsp;
<div class="btn-group pull-right">
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button">+ Add Child<span class="caret"></span></button>
<ul role="menu" class="dropdown-menu">
<% _.each(components, function(component, id){ %>
<% 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>
<% }); %>
</ul>
</div><br/><br/>
<% var treeLevel = 0; %>
<% _.each(tree, function(level, id){ %>
<% if (tree[editingComponent] >= level) return; %>
<% var component = components[id] || stock[id]; %>
<% treeLevel++; %>
<div class="assemblerTree" <% if (treeLevel%2 == 0){ %> style="background-color:#ddd"<% } %> ><label style="padding-left:<%= (level-tree[editingComponent]-1)*10 + 20 %>px"><%= component.name %>
<% if(tree[editingComponent]+1 == level){ %><a data-id="<%= id %>" class="editMachineComponent pull-right" href="#">Remove</a><% } %></label></div><br/>
<% }); %><br/>
STL: &nbsp;&nbsp;STL Name<br/><br/>
<a id="uploadStl" href="#" class="btn btn-block btn-lg btn-default">Upload STL</a><br/>
<% } %>
Offset (xyz):&nbsp;&nbsp;
<input data-property="translation" data-key="x" value="<%= translation.x %>" placeholder="X" class="form-control floatInput component" type="text">&nbsp;
<input data-property="translation" data-key="y" value="<%= translation.y %>" placeholder="Y" class="form-control floatInput component" type="text">&nbsp;
......@@ -42,7 +44,7 @@ Rotation (xyz):&nbsp;&nbsp;
<input data-property="rotation" data-key="x" value="<%= rotation.x %>" placeholder="X" class="form-control floatInput component" type="text">&nbsp;
<input data-property="rotation" data-key="y" value="<%= rotation.y %>" placeholder="Y" class="form-control floatInput component" type="text">&nbsp;
<input data-property="rotation" data-key="z" value="<%= rotation.z %>" placeholder="Z" class="form-control floatInput component" type="text"><br/><br/>
Scale: &nbsp;&nbsp;<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/>
<% if(!isStock){ %> Scale: &nbsp;&nbsp;<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 <% 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="cancelComponent" href="#" class="btn btn-halfWidth pull-right btn-lg btn-default">Cancel / Exit</a><br/><br/>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment