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

starting serial monitor window

parent 9a6a44d1
<head>
<title>Serial Monitor</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="dependencies/flatUI/css/vendor/bootstrap.min.css" rel="stylesheet"><!-- Loading Bootstrap -->
<link href="dependencies/flatUI/css/flat-ui.css" rel="stylesheet"><!-- Loading Flat UI -->
<link href="css/serialMonitor.css" rel="stylesheet"><!-- Loading custom stylingI -->
</head>
<html><div id="serialMonitorView">
serial monitor
<input id="serialMonitorSend" value="" placeholder="Send Message" class="form-control" type="text">
</div>
</html>
\ No newline at end of file
#serialMonitorSend {
position: absolute;
bottom: 0px;
border-radius: 0px;
border: none;
border-top: 2px solid #bdc3c7;
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<html>
<head>
<title></title>
<title>DMDesign</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="dependencies/analytics.js"></script>
......
......@@ -142,6 +142,7 @@ require.config({
assemblerSetupMenu: 'menus/AssemblerSetupMenuView',
editComponentMenu: 'menus/EditComponentMenuView',
commParentMenu: 'menus/CommParentMenu',
serialMonitor: 'menus/SerialMonitorView',
//templates
navViewMenuTemplate: 'menus/templates/NavViewMenu.html',
......
/**
* Created by aghassaei on 9/8/15.
*/
define(['jquery', 'underscore', 'backbone'], function($, _, Backbone){
var SerialMonitorView = Backbone.View.extend({
el: "#serialMonitorView",
events: {
},
initialize: function(){
this.open();
},
open: function(){
window.open('SerialMonitor.html', '', 'height=400, width=400, titlebar=no, toolbar=no, menubar=yes, scrollbars=no, resizable=yes, location=no, directories=no, status=no');
},
onClose: function(){
},
_destroy: function(){
}
});
return SerialMonitorView;
});
\ No newline at end of file
......@@ -13,7 +13,8 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'text!setupCommM
"click #serialFlushBuffer": "_flushBuffer",
"click #nodeSetupInstructions": "_setupInstructions",
"click #refreshPorts": "_refreshPorts",
"click #reconnectToNode": "_reconnectToNode"
"click #reconnectToNode": "_reconnectToNode",
"click #openSerialMonitor": "_openSerialMonitor"
},
......@@ -41,10 +42,18 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'text!setupCommM
})
},
_reconnectToNode: function(){
_reconnectToNode: function(e){
e.preventDefault();
serialComm.attemptToConnectToNode();
},
_openSerialMonitor: function(e){
e.preventDefault();
require(['serialMonitor'], function(SerialMonitor){
var serialMonitor = new SerialMonitor();
});
},
_makeTemplateJSON: function(){
console.log("render");
return _.extend(serialComm.toJSON(), commPlist);
......
......@@ -22,6 +22,7 @@
</ul>
</div>
&nbsp;&nbsp;<a href="#" id="refreshPorts" class="btn btn-lg btn-default btn-icon"><img src="assets/imgs/refreshIcon.png"></a><br/><br/>
<a href="#" id="openSerialMonitor" class="btn btn-block btn-lg btn-default">Open Serial Monitor</a><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="serialFlushBuffer" class="btn btn-block btn-lg btn-danger">Flush Buffer</a><br/>
......
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