Commit 4428ca8a authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

populating menu

parent a86fa01b
......@@ -2,8 +2,8 @@
* Created by aghassaei on 3/11/15.
*/
define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'text!sendMenuTemplate'],
function($, _, CommParentMenu, serialComm, commPlist, template){
define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'text!sendMenuTemplate', 'cam', 'camPlist'],
function($, _, CommParentMenu, serialComm, commPlist, template, cam, camPlist){
return CommParentMenu.extend({
......@@ -13,11 +13,12 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'te
__initialize: function(){
this.isStreaming = false;
},
_makeTemplateJSON: function(){
console.log("render");
return _.extend(serialComm.toJSON(), commPlist);
return _.extend(serialComm.toJSON(), commPlist, cam.toJSON(), camPlist, {streaming: this.isStreaming});
},
template: _.template(template)
......
......@@ -9,8 +9,7 @@
<!--<a data-type="beam" class="btn btn-primary btn-ribbon ribbonCellMode<% if (cellMode == "beam"){ %> ribbon-selected<% } %>" href="#">Beam</a>-->
<% if (currentNav != "navDesign"){%>
<a data-type="hide" class="btn btn-primary btn-ribbon ribbonCellMode<% if (cellMode == "hide"){ %> ribbon-selected"<% } %>">Hide</a>
<% } %>
<% if (currentNav != "navSim" && currentNav != "navAssemble" && currentNav != "navOptimize"){%>
<% }else{ %>
<a class="btn btn-primary btn-ribbon ribbonDeleteMode<% if (deleteMode){ %> ribbon-selected"<% } %>"><span class="fui-cross"></span></a>
<% } %>
<a id="ribbonAxesToggle" class="btn btn-primary btn-ribbon <% if (axesAreVisible){ %> ribbon-selected"<% } %>">Axes</a>
......
<% if(connected){ %>
<% if(dataOut==0){ %>
You need to go through the Assemble workflow to setup your machine and create <%= allCamProcesses[camProcess] %> first.
<% }else{ %>
<% if(streaming){ %>
<a href="#" id="pauseStream" class="btn btn-halfWidth btn-lg btn-warning">Pause</a>
<% }else{ %>
<a href="#" id="streamCommands" class="btn btn-halfWidth btn-lg btn-success">Stream</a>
<% } %>
<a href="#" id="stopMachine" class="btn pull-right btn-halfWidth btn-lg btn-danger">Stop</a><br/><br/>
Incoming: &nbsp;&nbsp;<pre id="incomingSerialMessage"></pre><br/><br/>
Out: &nbsp;&nbsp;<input id="sendSerialMessage" value="" placeholder="Send Message" class="seventyFiveWidth form-control unresponsiveInput" type="text"><br/><br/>
<a href="#" id="stopMachine" class="btn btn-block btn-lg btn-danger">Stop</a><br/>
<% }else{ %>
Next Line: &nbsp;&nbsp;<input id="nextLine" value="" placeholder="##" class="intInput form-control unresponsiveInput" type="text">Up/down<br/><br/>
<div id="gcodeEditor"><%= dataOut %></div><br/>
<% } %>
<% } else { %>
Not connected, go back to setup tab and connect to Node server.
<% } %>
\ No newline at end of file
......@@ -192,7 +192,7 @@ define(['three'], function(THREE){
allCamProcesses: {
shopbot: "Shopbot (sbp)",
gcode: "G-Code",
tinyG: "TinyG"
tinyG: "TinyG (G-Code)"
},
allUnitTypes: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment