Commit 725f5ecf authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

templates in separate html files

parent c3cbf940
......@@ -108,6 +108,26 @@ require.config({
setupCommMenu: 'menus/SetupCommMenuView',
discoveryMenu: 'menus/DiscoveryMenuView',
//templates
navViewMenuTemplate: 'menus/templates/NavViewMenu.html',
ribbonTemplate: 'menus/templates/Ribbon.html',
modalViewTemplate: 'menus/templates/ModalView.html',
menuWrapperTemplate: 'menus/templates/MenuWrapperView.html',
latticeMenuTemplate: 'menus/templates/LatticeMenuView.html',
importMenuTemplate: 'menus/templates/LatticeMenuView.html',
partMenuTemplate: 'menus/templates/PartMenuView.html',
scriptMenuTemplate: 'menus/templates/ScriptMenuView.html',
physicsMenuTemplate: 'menus/templates/PhysicsMenuView.html',
materialMenuTemplate: 'menus/templates/MaterialMenuView.html',
optimizeMenuTemplate: 'menus/templates/OptimizationMenuView.html',
assemblerMenuTemplate: 'menus/templates/AssemblerMenuView.html',
camMenuTemplate: 'menus/templates/CamMenuView.html',
animateMenuTemplate: 'menus/templates/AnimationMenuView.html',
sendMenuTemplate: 'menus/templates/SendMenuView.html',
compositeMenuTemplate: 'menus/templates/CompositeMenuView.html',
setupCommMenuTemplate: 'menus/templates/SetupCommMenuView.html',
discoveryMenuTemplate: 'menus/templates/DiscoveryMenuView.html',
//stls
octaFaceTrianglePartSTL: '../assets/stls/parts/OctaFaceTrianglePart.stl',
octaEdgeVoxPartSTL: '../assets/stls/parts/OctaEdgeVoxPart.stl',
......
......@@ -2,7 +2,7 @@
* Created by aghassaei on 2/1/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'cam'], function($, _, MenuParentView, plist, cam){
define(['jquery', 'underscore', 'menuParent', 'plist', 'cam', 'text!animationMenuTemplate'], function($, _, MenuParentView, plist, cam, template){
return MenuParentView.extend({
......@@ -108,27 +108,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'cam'], function($, _, Me
});
},
template: _.template('\
<% if (stockSimulationPlaying){ %>\
<a href="#" id="pauseStockSim" class=" btn btn-block btn-lg btn-warning">Pause</a>\
<% } else { %>\
<% if (simLineNumber != 0){ %>\
<a href="#" id="playStockSim" class=" btn btn-lg btn-halfWidth btn-success">Play</a>\
<a href="#" id="resetStockSim" class=" btn btn-lg btn-halfWidth pull-right btn-default">Reset</a><br/>\
<% } else { %>\
<a href="#" id="playStockSim" class=" btn btn-block btn-lg btn-success">Play</a>\
<% } %>\
<% } %>\
<input id="speedSlider" data-slider-id="speedSlider" type="text" data-slider-min="0" data-slider-max="6" data-slider-step="1" data-slider-value="<%= Math.log2(simSpeed) %>"/>\
<br/><a href="#" id="animationMenuSave" class=" btn btn-block btn-lg btn-default">Save</a><br/>\
<!--Assembly Time:&nbsp;&nbsp;<br/><br/>-->\
<% if (editsMadeToProgram && needsPostProcessing){ %>\
<div class="postWarning">You have made the following changes that require post processing:<br/>\
This will override edits you have made to the G-code. OK to override? <a href="#" class="overrideEdits btn btn-block btn-lg btn-danger">OK</a></div>\
<% } %>\
<div id="gcodeEditor"><%= dataOut %></div><br/>\
<a href="#" class="overrideEdits btn btn-block btn-lg btn-default">Undo Changes</a><br/>\
')
template: _.template(template)
});
});
......@@ -2,7 +2,7 @@
* Created by aghassaei on 2/25/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'cam', 'lattice'], function($, _, MenuParentView, plist, cam, lattice){
define(['jquery', 'underscore', 'menuParent', 'plist', 'cam', 'lattice', 'text!assemblerMenuTemplate'], function($, _, MenuParentView, plist, cam, lattice, template){
return MenuParentView.extend({
......@@ -33,28 +33,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'cam', 'lattice'], functi
return _.extend(this.model.toJSON(), cam.toJSON(), lattice.toJSON(), plist);
},
template: _.template('\
Machine: &nbsp;&nbsp;\
<div class="btn-group">\
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allMachineTypes[cellType][connectionType][machineName] %><span class="caret"></span></button>\
<ul role="menu" class="dropdown-menu">\
<% _.each(_.keys(allMachineTypes[cellType][connectionType]), function(key){ %>\
<li><a class="assembler dropdownSelector" data-property="machineName" data-value="<%= key %>" href="#"><%= allMachineTypes[cellType][connectionType][key] %></a></li>\
<% }); %>\
</ul>\
</div><br/><br/>\
Strategy: &nbsp;&nbsp;\
<div class="btn-group">\
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allAssemblyStrategies[camStrategy] %><span class="caret"></span></button>\
<ul role="menu" class="dropdown-menu">\
<% _.each(_.keys(allAssemblyStrategies), function(key){ %>\
<li><a class="assembler dropdownSelector" data-property="camStrategy" data-value="<%= key %>" href="#"><%= allAssemblyStrategies[key] %></a></li>\
<% }); %>\
</ul>\
</div><br/><br/>\
<% if (camStrategy == "raster"){ %>\
Raster Order: &nbsp;&nbsp;<input value="<%= placementOrder %>" placeholder="Placement Order" class="form-control placementOrder" type="text"><br/><br/>\
<% } %>\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -2,7 +2,7 @@
* Created by aghassaei on 1/26/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'cam', 'lattice'], function($, _, MenuParentView, plist, cam, lattice){
define(['jquery', 'underscore', 'menuParent', 'plist', 'cam', 'lattice', 'text!camMenuTemplate'], function($, _, MenuParentView, plist, cam, lattice, template){
return MenuParentView.extend({
......@@ -44,69 +44,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'cam', 'lattice'], functi
return data;
},
template: _.template('\
CAM output: &nbsp;&nbsp;\
<div class="btn-group">\
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allCamProcesses[machineName][camProcess] %><span class="caret"></span></button>\
<ul role="menu" class="dropdown-menu">\
<% _.each(_.keys(allCamProcesses[machineName]), function(key){ %>\
<li><a class="assembler dropdownSelector" data-property="camProcess" data-value="<%= key %>" href="#"><%= allCamProcesses[machineName][key] %></a></li>\
<% }); %>\
</ul>\
</div><br/><br/>\
<a href="#" id="saveCam" class=" btn btn-block btn-lg btn-default">Process and Save</a><br/>\
Units: &nbsp;&nbsp;\
<div class="btn-group">\
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allUnitTypes[units] %><span class="caret"></span></button>\
<ul role="menu" class="dropdown-menu">\
<% _.each(_.keys(allUnitTypes), function(key){ %>\
<li><a class="lattice dropdownSelector" data-property="units" data-value="<%= key %>" href="#"><%= allUnitTypes[key] %></a></li>\
<% }); %>\
</ul>\
</div><br/><br/>\
Origin (xyz): &nbsp;&nbsp;<input data-property="originPosition" data-key="x" value="<%= originPosition.x %>" placeholder="X" class="form-control floatInput assembler" type="text">\
&nbsp;<input data-property="originPosition" data-key="y" value="<%= originPosition.y %>" placeholder="Y" class="form-control floatInput assembler" type="text">\
&nbsp;<input data-property="originPosition" data-key="z" value="<%= originPosition.z %>" placeholder="Z" class="form-control floatInput assembler" type="text">\
<% if (!(machineName == "handOfGod")){ %>\
<br/><a id="manualSelectOrigin" class=" btn btn-lg btn-default btn-imageCustom<% if (manualSelectOrigin){ %> btn-selected<% } %>"><img src="assets/imgs/cursor.png"></a>\
<label>&nbsp;&nbsp;&nbsp;Manually select origin from existing cell</label><br/><br/>\
<% if (!assembler.stockAttachedToEndEffector){ %>\
Stock (xyz): &nbsp;&nbsp;<input data-property="stockPosition" data-key="x" value="<%= stockPosition.x %>" placeholder="X" class="form-control floatInput assembler" type="text">\
&nbsp;<input data-property="stockPosition" data-key="y" value="<%= stockPosition.y %>" placeholder="Y" class="form-control floatInput assembler" type="text">\
&nbsp;<input data-property="stockPosition" data-key="z" value="<%= stockPosition.z %>" placeholder="Z" class="form-control floatInput assembler" type="text"><br/>\
<label class="checkbox" for="stockPosRel">\
<input id="stockPosRel" data-property="stockPositionRelative" type="checkbox" <% if (stockPositionRelative){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="assembler custom-checkbox">\
<span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>\
Stock position relative to Origin</label>\
<label class="checkbox" for="stockFixed">\
<input id="stockFixed" data-property="stockFixed" type="checkbox" <% if (stockFixed){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="assembler custom-checkbox">\
<span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>\
Fix stock relative to to Origin</label>\
<label class="checkbox" for="multipleStockPositions">\
<input id="multipleStockPositions" data-property="multipleStockPositions" type="checkbox" <% if (multipleStockPositions){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="assembler custom-checkbox">\
<span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>\
Multiple stock positions</label>\
<% if (multipleStockPositions){ %>\
Stock dimensions (xy): &nbsp;&nbsp;<input data-property="stockArraySize" data-key="x" value="<%= stockArraySize.x %>" placeholder="X" class="form-control intInput assembler" type="text">\
&nbsp;<input data-property="stockArraySize" data-key="y" value="<%= stockArraySize.y %>" placeholder="Y" class="form-control intInput assembler" type="text"><br/><br/>\
Stock separation: &nbsp;&nbsp;<input data-property="stockSeparation" value="<%= stockSeparation %>" placeholder="X" class="form-control floatInput assembler" type="text"><br/><br/>\
<% } %>\
<% } %>\
Clearance Height: &nbsp;&nbsp;<input data-property="rapidHeight" value="<%= rapidHeight %>" placeholder="Z" class="form-control floatInput assembler" type="text"><br/>\
<label class="checkbox" for="rapidPosRel">\
<input id="rapidPosRel" data-property="rapidHeightRelative" type="checkbox" <% if (rapidHeightRelative){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="assembler custom-checkbox">\
<span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>\
Clearance height relative to Origin</label>\
<% } else { %>\
<br/><br/>Stock Height: &nbsp;&nbsp;<input data-property="stockPosition" data-key="z" value="<%= stockPosition.z %>" placeholder="Z" class="form-control floatInput assembler" type="text"><br/><br/>\
<% } %>\
Approach Height: &nbsp;&nbsp;<input data-property="safeHeight" value="<%= safeHeight %>" placeholder="Z" class="form-control floatInput assembler" type="text"><br/><br/>\
Speeds (measured in <%= units %> per second):<br/><br/>\
Rapids (xy, z): &nbsp;&nbsp;<input data-property="rapidSpeeds" data-key="xy" value="<%= rapidSpeeds.xy %>" placeholder="XY" class="form-control floatInput assembler" type="text">\
&nbsp;<input data-property="rapidSpeeds" data-key="z" value="<%= rapidSpeeds.z %>" placeholder="Z" class="form-control floatInput assembler" type="text"><br/><br/>\
Feed Rate (xy, z): &nbsp;&nbsp;<input data-property="feedRate" data-key="xy" value="<%= feedRate.xy %>" placeholder="XY" class="form-control floatInput assembler" type="text">\
&nbsp;<input data-property="feedRate" data-key="z" value="<%= feedRate.z %>" placeholder="Z" class="form-control floatInput assembler" type="text">\
')
template: _.template(template)
});
});
......
......@@ -2,7 +2,8 @@
* Created by aghassaei on 6/10/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'globals', 'materials'], function($, _, MenuParentView, plist, lattice, globals, materials){
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'globals', 'materials', 'text!compositeMenuTemplate'],
function($, _, MenuParentView, plist, lattice, globals, materials, template){
var dimensions;
......@@ -85,37 +86,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'globals', 'ma
});
},
template: _.template('\
<a href="#" class="btn btn-halfWidth btn-lg btn-default importJSON">Load Composite</a>\
<a id="saveComposite" href="#" class="btn btn-halfWidth btn-lg pull-right btn-default">Save Composite</a><br/><br/>\
Name: &nbsp;&nbsp;<input id="compositeName" data-property="name" value="<%= name %>" placeholder="Enter Name" class="seventyFiveWidth form-control textInput compositeEditor" type="text"><br/><br/>\
Num Cells: &nbsp;&nbsp;<%= numCells %><br/><br/>\
Bounding Box: &nbsp;&nbsp;<%= dimensions.x %> x <%= dimensions.y %> x <%= dimensions.z %><br/><br/>\
Display Color: &nbsp;&nbsp;\
<input id="compositeColor" style="border-color: <%= color %> ;" data-property="color" value="<%= color %>" placeholder="Enter HEX" class="halfWidth compositeEditor form-control hexInput" type="text"><br/><br/>\
<a id="newRandomColor" href="#" class="btn btn-block btn-lg btn-default">New Random Color</a><br/>\
Available 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">\
<div style="background-color:<% if(realisticColorScheme){ %><%= allMaterials[materialClass][key].color %><% }else{ %><%= allMaterials[materialClass][key].altColor %><% } %>"></div>\
<span><%= allMaterials[materialClass][key].name %></span></div>\
</label>\
<% }); %>\
<% _.each(_.keys(materials), function(key){ \
if (key == id || key.substr(0,5) != "super") 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){ %><%= materials[key].color %><% }else{ %><%= materials[key].altColor %><% } %>"></div>\
<span><%= materials[key].name %></span></div>\
</label>\
<% }); %><br/>\
<a id="finishComposite" href="#" class="btn btn-block btn-lg btn-success">Save Composite</a><br/>\
<a id="cancelComposite" href="#" class="btn btn-halfWidth btn-lg btn-default">Cancel / Exit</a>\
<a id="deleteComposite" href="#" class="btn btn-halfWidth pull-right btn-lg btn-default"><span class="fui-trash"></span> Delete</a><br/>\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -3,7 +3,8 @@
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _, MenuParentView, plist, lattice){
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'text!discoveryMenuTemplate'],
function($, _, MenuParentView, plist, lattice, template){
var log = "testing<br/>hello";
......@@ -27,11 +28,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _
return _.extend({log: log}, this.model.toJSON(), plist);
},
template: _.template('\
Log:\
<div id="gcodeEditor"><%= log %></div><br/>\
<a id="discoveryLogClear" href="#" class="btn btn-block btn-lg btn-danger">Clear Log</a><br/>\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -2,7 +2,8 @@
* Created by aghassaei on 1/26/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _, MenuParentView, plist, lattice){
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'importMenuTemplate'],
function($, _, MenuParentView, plist, lattice, template){
return MenuParentView.extend({
......@@ -83,28 +84,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _
return _.extend(this.model.toJSON(), this.fillGeometry.toJSON());
},
template: _.template('\
Filename: &nbsp;&nbsp;<%= filename %><br/><br/>\
<% if (mesh){ %>\
Scale:<br/><br/>\
<a href="#" id="doFillGeo" class=" btn btn-block btn-lg btn-default">Fill Mesh</a><br/>\
<a href="#" id="removeFillGeo" class=" btn btn-block btn-lg btn-default">Remove Mesh</a><br/>\
<hr>\
<% } %>\
<a href="#" class=" btn btn-block btn-lg btn-danger clearCells">Clear All Cells</a><br/><br/>\
<br/><span class="btn btn-default btn-lg btn-file fullWidth">\
Upload STL<input id="importMenuUploadSTL" type="file">\
</span><br/>\
<div class="text-center">OR</div>\
<div class="btn-group fullWidth">\
<button data-toggle="dropdown" class="btn btn-lg btn-default dropdown-toggle fullWidth" type="button">Select Model <span class="caret"></span></button>\
<ul role="menu" class="dropdown-menu">\
<li><a class="importMenuSelectMesh" data-file="meshes-airbus/wingCrossSection.stl" href="#">Wing</a></li>\
<li><a id="importMenuSelectWall" href="#">Block</a></li>\
</ul>\
</div><!-- /btn-group -->\
')
template: _.template(template)
});
});
......
......@@ -2,7 +2,7 @@
* Created by aghassaei on 1/26/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _, MenuParentView, plist, lattice){
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'text!latticeMenuTemplate'], function($, _, MenuParentView, plist, lattice, template){
return MenuParentView.extend({
......@@ -18,33 +18,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _
return _.extend(_.extend(lattice.toJSON(), this.model.toJSON()), plist);
},
template: _.template('\
Cell Type: &nbsp;&nbsp;\
<div class="btn-group">\
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allCellTypes[cellType] %><span class="caret"></span></button>\
<ul role="menu" class="dropdown-menu">\
<% _.each(_.keys(allCellTypes), function(key){ %>\
<li><a class="lattice dropdownSelector" data-property="cellType" data-value="<%= key %>" href="#"><%= allCellTypes[key] %></a></li>\
<% }); %>\
</ul>\
</div><br/><br/>\
Cell Connection:&nbsp;&nbsp;\
<div class="btn-group">\
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allConnectionTypes[cellType][connectionType] %>-Connected<span class="caret"></span></button>\
<ul role="menu" class="dropdown-menu">\
<% _.each(_.keys(allConnectionTypes[cellType]), function(key){ %>\
<li><a class="lattice dropdownSelector" data-property="connectionType" data-value="<%= key %>" href="#"><%= allConnectionTypes[cellType][key] %></a></li>\
<% }); %>\
</ul>\
</div><br/><br/>\
<% if (connectionType == "gik") { %>\
GIK Length:&nbsp;&nbsp;<input data-property="superCellRange" data-key="x" value="<%= superCellRange.x %>" placeholder="GIK length" class="form-control intInput appState" type="text"><br/>\
<br/>\
<% } %>\
<a href="#" class="clearCells btn btn-block btn-lg btn-danger">Clear All Cells</a><br/>\
Num Cells:&nbsp;&nbsp;<%= numCells %><br/>\
')
template: _.template(template)
});
});
......
......@@ -2,7 +2,8 @@
* Created by aghassaei on 2/25/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'globals', 'materials'], function($, _, MenuParentView, plist, lattice, globals, materials){
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'globals', 'materials', 'text!materialMenuTemplate'],
function($, _, MenuParentView, plist, lattice, globals, materials, template){
return MenuParentView.extend({
......@@ -40,55 +41,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'globals', 'ma
return _.extend(lattice.toJSON(), this.model.toJSON(), plist, globals, {materials:materials});
},
template: _.template('\
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/>\
<% 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">\
<div style="background-color:<% if(realisticColorScheme){ %><%= allMaterials[materialClass][key].color %><% }else{ %><%= allMaterials[materialClass][key].altColor %><% } %>"></div>\
<span><%= allMaterials[materialClass][key].name %></span></div>\
</label>\
<% }); %>\
<br/>\
<label class="checkbox" for="realisticColorScheme">\
<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>\
Use realistic color scheme</label>\
<% } %>\
<br/>\
Composite Materials:<br/>\
<% if ((cellType == "octa" && connectionType != "vertex") || cellType == "tetra"){ %>\
not available for this lattice type\
<% } else { %> \
<% _.each(_.keys(materials), function(key){ \
if (key.substr(0,5) != "super") 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){ %><%= materials[key].color %><% }else{ %><%= materials[key].altColor %><% } %>"></div>\
<span><%= materials[key].name %><a data-id="<%= key %>" class="editComposite">Settings...<a/></span></div>\
</label>\
<% }); %><br/>\
<% if (_.filter(_.keys(materials), function(name){return name.substr(0,5) == "super"; }).length > 0) { %>\
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/>\
<% } %>\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -3,7 +3,7 @@
*/
define(['jquery', 'underscore', 'plist', 'backbone', 'lattice'], function($, _, plist, Backbone, lattice){
define(['jquery', 'underscore', 'plist', 'backbone', 'lattice', 'text!menuWrapperTemplate'], function($, _, plist, Backbone, lattice, template){
return Backbone.View.extend({
......@@ -244,13 +244,6 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice'], function($, _,
this.model.set("menuIsVisible", true);
},
template: _.template('\
<ul class="nav nav-tabs nav-justified">\
<% _.each(_.keys(allMenuTabs[currentNav]), function(key){\
if (key == "part" && !(allPartTypes[cellType][connectionType])) return; %>\
<li role="presentation" class="menuWrapperTab" data-name="<%= key %>"><a href="#"><%= allMenuTabs[currentNav][key] %></a></li>\
<% }); %>\
</ul>\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -3,7 +3,7 @@
*/
define(['jquery', 'underscore', 'backbone'], function($, _, Backbone){
define(['jquery', 'underscore', 'backbone', 'text!modalViewTemplate'], function($, _, Backbone, template){
return Backbone.View.extend({
......@@ -30,26 +30,6 @@ define(['jquery', 'underscore', 'backbone'], function($, _, Backbone){
// Backbone.View.prototype.remove.call(this);
},
template: _.template('\
<div class="modal-dialog modal-med">\
<div class="modal-content">\
<div class="modal-header">\
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>\
<p class="modal-title" ><%= title %></p>\
</div>\
<div class="modal-body">\
<% if (typeof img !== "undefined") {%>\
<img class="fullWidth" src="<%= img %>"><br/><br/>\
<% } %>\
<% if (text == ""){ %>\
Need something here.\
<% } else { %>\
<%= text %>\
<% } %>\
</div>\
</div>\
</div>\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -3,7 +3,7 @@
*/
define(['jquery', 'underscore', 'backbone'], function($, _, Backbone){
define(['jquery', 'underscore', 'backbone', 'text!navViewMenuTemplate'], function($, _, Backbone, template){
return Backbone.View.extend({
......@@ -48,34 +48,6 @@ define(['jquery', 'underscore', 'backbone'], function($, _, Backbone){
})
},
template: _.template('\
<li class="dropdown-submenu">\
<a tabindex="-1">UI<span class="pull-right fui-arrow-right"></span></a>\
<ul class="dropdown-menu">\
<li><a class="appState boolProperty" data-property="menuIsVisible" href="#">Menu</a></li>\
<li><a class="appState boolProperty" data-property="scriptIsVisible" href="#">Script</a></li>\
<li><a class="appState boolProperty" data-property="consoleIsVisible" href="#">Console</a></li>\
<li><a class="appState boolProperty" data-property="ribbonIsVisible" href="#">Ribbon</a></li>\
</ul></li>\
<li class="dropdown-submenu">\
<a tabindex="-1">3D UI<span class="pull-right fui-arrow-right"></span></a>\
<ul class="dropdown-menu">\
<li><a class="appState boolProperty" data-property="basePlaneIsVisible" href="#">Sketch Plane</a></li>\
<li><a class="appState boolProperty" data-property="highlighterIsVisible" href="#">Hover Tool</a></li>\
</ul></li>\
<li class="dropdown-submenu">\
<a tabindex="-1">Rendering<span class="pull-right fui-arrow-right"></span></a>\
<ul class="dropdown-menu">\
<li><a class="appState boolProperty" data-property="renderAmbientOcclusion" href="#">Ambient Occlusion</a></li>\
<li><a class="appState boolProperty" data-property="realisticColorScheme" href="#">Realistic Color Scheme</a></li>\
</ul></li>\
<li class="dropdown-submenu">\
<a tabindex="-1">3D<span class="pull-right fui-arrow-right"></span></a>\
<ul class="dropdown-menu">\
<li><a class="appState boolProperty" data-property="axesAreVisible" href="#">Axes</a></li>\
<li><a id="reset3DView" href="#">Reset 3D Navigation</a></li>\
</ul></li>\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -2,7 +2,7 @@
* Created by aghassaei on 2/25/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist'], function($, _, MenuParentView, plist){
define(['jquery', 'underscore', 'menuParent', 'plist', 'text!optimizeMenuTemplate'], function($, _, MenuParentView, plist, template){
return MenuParentView.extend({
......@@ -16,8 +16,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist'], function($, _, MenuParen
return null;
},
template: _.template('\
input stiffness requirements of structure\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -2,7 +2,7 @@
* Created by aghassaei on 1/26/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _, MenuParentView, plist, lattice){
define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice', 'text!partMenuTemplate'], function($, _, MenuParentView, plist, lattice, template){
return MenuParentView.extend({
......@@ -19,20 +19,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'lattice'], function($, _
return _.extend(lattice.toJSON(), this.model.toJSON(), plist);
},
template: _.template('\
Part Type: &nbsp;&nbsp;\
<div class="btn-group">\
<button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= allPartTypes[cellType][connectionType][partType] %><span class="caret"></span></button>\
<ul role="menu" class="dropdown-menu">\
<% _.each(_.keys(allPartTypes[cellType][connectionType]), function(key){ %>\
<li><a class="lattice dropdownSelector" data-property="partType" data-value="<%= key %>" href="#"><%= allPartTypes[cellType][connectionType][key] %></a></li>\
<% }); %>\
</ul>\
</div><br/><br/>\
<!--Cell Separation (xy, z): &nbsp;&nbsp;<input data-property="cellSeparation" data-key="xy" value="<%= cellSeparation.xy %>" placeholder="XY" class="form-control floatInput lattice" type="text">\
&nbsp;<input data-property="cellSeparation" data-key="z" value="<%= cellSeparation.z %>" placeholder="Z" class="form-control floatInput lattice" type="text">\
<br/><br/>--><br/>\
')
template: _.template(template)
});
});
\ No newline at end of file
......@@ -2,7 +2,7 @@
* Created by aghassaei on 2/25/15.
*/
define(['jquery', 'underscore', 'menuParent', 'plist'], function($, _, MenuParentView, plist){
define(['jquery', 'underscore', 'menuParent', 'plist', 'text!physicsMenuTemplate'], function($, _, MenuParentView, plist, template){
return MenuParentView.extend({
......@@ -16,13 +16,6 @@ define(['jquery', 'underscore', 'menuParent', 'plist'], function($, _, MenuParen
return null;
},
template: _.template('\
world physics: gravity, global forces\
<br/><br/>\
part connection stiffness\
<br/><br/>\
ground/fixed/boundary conditions definition\
')
template: _.template(template)
});
});
\ No newline at end of file