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

eod

parent 51dffe88
No related branches found
No related tags found
No related merge requests found
<% var thisComponent = components[editingComponent] || stock[editingComponent]; %> <% 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/> 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; Parent: &nbsp;&nbsp;
<div class="btn-group"> <div class="btn-group">
...@@ -10,30 +11,31 @@ Parent: &nbsp;&nbsp; ...@@ -10,30 +11,31 @@ Parent: &nbsp;&nbsp;
<% }); %> <% }); %>
</ul> </ul>
</div><br/><br/> </div><br/><br/>
Children: &nbsp;&nbsp; <% if(!isStock){ %>
<div class="btn-group"> Children: &nbsp;&nbsp;
<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: &nbsp;&nbsp;STL Name<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/> <a id="uploadStl" href="#" class="btn btn-block btn-lg btn-default">Upload STL</a><br/>
<% } %>
Offset (xyz):&nbsp;&nbsp; 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="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; <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; ...@@ -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="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="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/> <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/> <% 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 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/>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment