Commit 26d81ff8 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

small changes

parent 8a2c6d68
......@@ -33,8 +33,12 @@ define(['jquery', 'underscore', 'backbone'], function($, _, Backbone){
onClose: function(){
var self = this;
setTimeout(function(){
if (self.popup.closed) self.popup = null;
if (self.popup.closed) self.dumpPopup();
}, 100);//todo this is stupid, find an event that fires with window.closed == true
},
dumpPopup: function(){
this.popup = null;
}
});
......
......@@ -23,6 +23,7 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'text!SerialMoni
_.bindAll(this, "_onKeyUp");
$(document).bind('keyup', {}, this._onKeyUp);
this.listenTo(serialComm, "change:lastMessageSent", this._updateOutgoingMessage);
this.listenTo(serialComm, "change:baudRate change:portName", this.render);
this.listenTo(serialComm, "change:connected", function(){
......@@ -38,6 +39,9 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'text!SerialMoni
if (e.keyCode == 38) $output.val(this.model.getPrevHistElem());
else if (e.keyCode == 40) $output.val(this.model.getNewerHistElem());
else if (e.keyCode == 13) this._sendMessage(e);
} else {
}
},
......@@ -101,6 +105,7 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'text!SerialMoni
},
_close: function(){
this.userInitedReload = false;
window.close();
},
......
......@@ -39,6 +39,7 @@ require.config({
require(['serialMonitorView', 'serialMonitor', 'positionControlPanelView', 'serialComm'],
function(SerialMonitorView, serialMonitor, PositionControlPanelView, serialComm){
new SerialMonitorView({model: serialMonitor});
new PositionControlPanelView({model:serialComm});
});
\ No newline at end of file
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