MaterialMenuView.html 4.59 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
<% if (!inSimMode){ %>
    Material Class: &nbsp;&nbsp;
        <div class="btn-group">
            <button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allMaterialClasses[materialClass] %><span class="caret"></span></button>
            <ul role="menu" class="dropdown-menu">
                <% _.each(_.keys(allMaterialClasses), function(key){ %>
                    <li><a class="appState dropdownSelector" data-property="materialClass" data-value="<%= key %>" href="#"><%= allMaterialClasses[key] %></a></li>
                <% }); %>
            </ul>
        </div><br/><br/>
<% } %>
12
13
14
15
16
17
<% if (allMaterialTypes[cellType][connectionType]){ %>
    Materials:<br/>
    <% _.each(_.keys(allMaterials[materialClass]), function(key){ %>
        <label class="radio colorSwatches">
            <input type="radio" <%if (key == materialType){ %>checked<%}%> name="materialType" value="<%= key %>" data-toggle="radio" class="custom-radio appState"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
            <div class="materialColorSwatch">
Amanda Ghassaei's avatar
Amanda Ghassaei committed
18
19
20
21
22
23
24
25
26
27
28
29
            <div style="background-color:<% if(realisticColorScheme){ %><%= materials[key].color %><% }else{ %><%= materials[key].altColor %><% } %>"></div>
            <span><span class="materialListTitle"><%= materials[key].name %></span><a data-id="<%= key %>" class="editMaterial">Edit...</a></span></div>
        </label>
    <% }); %>
    <% _.each(materials, function(material, key){
        if (key.substr(0,5) == "super") return;
        if (material.noDelete) return; %>
        <label class="radio colorSwatches">
            <input type="radio" <%if (key == materialType){ %>checked<%}%> name="materialType" value="<%= key %>" data-toggle="radio" class="custom-radio appState"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
            <div class="materialColorSwatch">
            <div style="background-color:<% if(realisticColorScheme){ %><%= material.color %><% }else{ %><%= material.altColor %><% } %>"></div>
            <span><span class="materialListTitle"><%= material.name %></span><a data-id="<%= key %>" class="editMaterial">Edit...</a></span></div>
30
        </label>
31
    <% }); %>
Amanda Ghassaei's avatar
Amanda Ghassaei committed
32
    <label class="checkbox" for="realisticColorScheme">
33
34
    <input id="realisticColorScheme" data-property="realisticColorScheme" type="checkbox" <% if (realisticColorScheme){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="appState custom-checkbox">
    <span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Amanda Ghassaei's avatar
Amanda Ghassaei committed
35
36
    Use realistic color scheme</label><br/>
    <a id="newElementaryMaterial" href="#" class="btn btn-block btn-lg btn-default">+ Create New Material Definition</a>
37
<% } %><br/>
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<% if (!inSimMode){ %>
    Composite Materials:<br/>
    <% if ((cellType == "octa" && connectionType != "vertex") || cellType == "tetra"){ %>
        not available for this lattice type
    <%  } else { %>
        <% _.each(compositeMaterialsKeys, function(key){ %>
            <label class="radio colorSwatches">
                <input type="radio" <%if (key == materialType){ %>checked<%}%> name="materialType" value="<%= key %>" data-toggle="radio" class="custom-radio appState"><span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
                <div class="materialColorSwatch">
                <div style="background-color:<% if(realisticColorScheme){ %><%= materials[key].color %><% }else{ %><%= materials[key].altColor %><% } %>"></div>
                <span><span class="materialListTitle"><%= materials[key].name %></span><a data-id="<%= key %>" class="editComposite">Edit...</a></span></div>
            </label>
        <% }); %><br/>
        <% if (materialType.substr(0,5) == "super") { %>
            Offset (xyz): &nbsp;&nbsp;<input data-property="superCellIndex" data-key="x" value="<%= superCellIndex.x %>" placeholder="X" class="form-control intInput appState" type="text">&nbsp;
                <input data-property="superCellIndex" data-key="y" value="<%= superCellIndex.y %>" placeholder="Y" class="form-control intInput appState" type="text">&nbsp;
                <input data-property="superCellIndex" data-key="z" value="<%= superCellIndex.z %>" placeholder="Z" class="form-control intInput appState" type="text"><br/><br/>
        <% } %>
        <a id="navToCompositeMenu" href="#" class="btn btn-block btn-lg btn-default">+ Create New Composite Material</a><br/>
        <a id="compositeFromLattice" href="#" class="btn btn-block btn-lg btn-default">New Composite From Current Assembly</a><br/>
58
59
    <% } %>
<% } %>