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

populating menu

parent a86fa01b
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* Created by aghassaei on 3/11/15. * Created by aghassaei on 3/11/15.
*/ */
define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'text!sendMenuTemplate'], define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'text!sendMenuTemplate', 'cam', 'camPlist'],
function($, _, CommParentMenu, serialComm, commPlist, template){ function($, _, CommParentMenu, serialComm, commPlist, template, cam, camPlist){
return CommParentMenu.extend({ return CommParentMenu.extend({
...@@ -13,11 +13,12 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'te ...@@ -13,11 +13,12 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'te
__initialize: function(){ __initialize: function(){
this.isStreaming = false;
}, },
_makeTemplateJSON: function(){ _makeTemplateJSON: function(){
console.log("render"); console.log("render");
return _.extend(serialComm.toJSON(), commPlist); return _.extend(serialComm.toJSON(), commPlist, cam.toJSON(), camPlist, {streaming: this.isStreaming});
}, },
template: _.template(template) template: _.template(template)
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
<!--<a data-type="beam" class="btn btn-primary btn-ribbon ribbonCellMode<% if (cellMode == "beam"){ %> ribbon-selected<% } %>" href="#">Beam</a>--> <!--<a data-type="beam" class="btn btn-primary btn-ribbon ribbonCellMode<% if (cellMode == "beam"){ %> ribbon-selected<% } %>" href="#">Beam</a>-->
<% if (currentNav != "navDesign"){%> <% if (currentNav != "navDesign"){%>
<a data-type="hide" class="btn btn-primary btn-ribbon ribbonCellMode<% if (cellMode == "hide"){ %> ribbon-selected"<% } %>">Hide</a> <a data-type="hide" class="btn btn-primary btn-ribbon ribbonCellMode<% if (cellMode == "hide"){ %> ribbon-selected"<% } %>">Hide</a>
<% } %> <% }else{ %>
<% if (currentNav != "navSim" && currentNav != "navAssemble" && currentNav != "navOptimize"){%>
<a class="btn btn-primary btn-ribbon ribbonDeleteMode<% if (deleteMode){ %> ribbon-selected"<% } %>"><span class="fui-cross"></span></a> <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> <a id="ribbonAxesToggle" class="btn btn-primary btn-ribbon <% if (axesAreVisible){ %> ribbon-selected"<% } %>">Axes</a>
......
<% if(connected){ %> <% if(connected){ %>
Incoming: &nbsp;&nbsp;<pre id="incomingSerialMessage"></pre><br/><br/> <% if(dataOut==0){ %>
Out: &nbsp;&nbsp;<input id="sendSerialMessage" value="" placeholder="Send Message" class="seventyFiveWidth form-control unresponsiveInput" type="text"><br/><br/> You need to go through the Assemble workflow to setup your machine and create <%= allCamProcesses[camProcess] %> first.
<a href="#" id="stopMachine" class="btn btn-block btn-lg btn-danger">Stop</a><br/> <% }else{ %>
<% }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/>
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. 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){ ...@@ -192,7 +192,7 @@ define(['three'], function(THREE){
allCamProcesses: { allCamProcesses: {
shopbot: "Shopbot (sbp)", shopbot: "Shopbot (sbp)",
gcode: "G-Code", gcode: "G-Code",
tinyG: "TinyG" tinyG: "TinyG (G-Code)"
}, },
allUnitTypes: { 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