Commit b1368c1b authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

eod

parent 37ec6011
...@@ -46,9 +46,18 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice', 'appState', 'tex ...@@ -46,9 +46,18 @@ define(['jquery', 'underscore', 'plist', 'backbone', 'lattice', 'appState', 'tex
} }
if ($(".floatInput").is(":focus")) this._updateFloat(e); if ($(".floatInput").is(":focus")) this._updateFloat(e);
if ($(".intInput").is(":focus")) this._updateInt(e); else if ($(".intInput").is(":focus")) this._updateInt(e);
if ($(".textInput").is(":focus")) this._updateString(e); else if ($(".textInput").is(":focus")) this._updateString(e);
if ($(".hexInput").is(":focus")) this._updateHex(e); else if ($(".hexInput").is(":focus")) this._updateHex(e);
else if (!$("input").is(":focus") && e.keyCode == 77 && (e.ctrlKey || e.metaKey) && e.shiftKey && appState.get("currentNav") == "navComm"){
e.preventDefault();
require(['serialComm'], function(serialComm){
serialComm.openSerialMonitor();
});
}
console.log(e);
}, },
_updateString: function(e){ _updateString: function(e){
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
* Created by aghassaei on 3/11/15. * Created by aghassaei on 3/11/15.
*/ */
define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'text!sendMenuTemplate', 'cam', 'camPlist'], define(['jquery', 'underscore', 'menuParent', 'serialComm', 'commPlist', 'text!sendMenuTemplate', 'cam', 'camPlist'],
function($, _, CommParentMenu, serialComm, commPlist, template, cam, camPlist){ function($, _, MenuParent, serialComm, commPlist, template, cam, camPlist){
return CommParentMenu.extend({ return MenuParent.extend({
events: { events: {
......
...@@ -17,7 +17,6 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'text!setupCommM ...@@ -17,7 +17,6 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'text!setupCommM
"click #openSerialMonitor": "_openSerialMonitor" "click #openSerialMonitor": "_openSerialMonitor"
}, },
__initialize: function(){ __initialize: function(){
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a class="appState boolProperty" data-property="menuIsVisible" href="#">Menu</a></li> <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="scriptIsVisible" href="#">Script</a></li>
<li><a class="appState boolProperty" data-property="consoleIsVisible" href="#">Console</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> <li><a class="appState boolProperty" data-property="ribbonIsVisible" href="#">Ribbon</a></li>
</ul> </ul>
</li> </li>
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
<a href="#" id="streamCommands" class="btn btn-block btn-lg btn-success">Stream</a> <a href="#" id="streamCommands" class="btn btn-block btn-lg btn-success">Stream</a>
<% } %> <% } %>
<br/> <br/>
Incoming: &nbsp;&nbsp;<pre id="incomingSerialMessage"><%= lastMessageReceived %></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"> Next Line: &nbsp;&nbsp;<input id="nextLine" value="" placeholder="##" class="intInput form-control unresponsiveInput" type="text">
<a href="#" id="previousLineButton" class="btn btn-lg btn-default">Prev</a> <a href="#" id="previousLineButton" class="btn btn-lg btn-default">Prev</a>
<a href="#" id="nextLineButton" class="btn btn-lg btn-default">Next</a><br/><br/> <a href="#" id="nextLineButton" class="btn btn-lg btn-default">Next</a><br/><br/>
......
...@@ -25,7 +25,7 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist', 'globals'], fu ...@@ -25,7 +25,7 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist', 'globals'], fu
basePlaneIsVisible:true, basePlaneIsVisible:true,
highlighterIsVisible:true, highlighterIsVisible:true,
axesAreVisible: false, axesAreVisible: false,
focusOnLattice: true, focusOnLattice: false,
//key bindings //key bindings
shift: false, shift: false,
......
...@@ -53,6 +53,10 @@ define(['underscore', 'backbone', 'socketio'], function(_, Backbone, io){ ...@@ -53,6 +53,10 @@ define(['underscore', 'backbone', 'socketio'], function(_, Backbone, io){
}, },
openSerialMonitor: function(){ openSerialMonitor: function(){
if (!this.get("connected")) {
console.warn("can't open serial monitor if not connected to node server");
return;
}
require(['serialMonitorController'], function(serialMonitorController){ require(['serialMonitorController'], function(serialMonitorController){
serialMonitorController.open(); serialMonitorController.open();
}); });
......
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