Skip to content
Snippets Groups Projects
Commit 6b2c3ac8 authored by amandaghassaei's avatar amandaghassaei
Browse files

event bindings

parent 8dba85fe
Branches
No related tags found
No related merge requests found
......@@ -23,6 +23,13 @@ AssemblerMenuView = Backbone.View.extend({
_onKeyup: function(e){
if (this.model.get("currentTab") != "assembler") return;
if ($("input").is(":focus") && e.keyCode == 13) {//enter key
$(e.target).blur();
this.render();
return;
}
if ($(".placementOrder").is(":focus")) this._updatePlacementOrder(e);
},
......
......@@ -31,6 +31,14 @@ LatticeMenuView = Backbone.View.extend({
},
_onKeyup: function(e){
if (this.model.get("currentTab") != "lattice") return;
if ($("input").is(":focus") && e.keyCode == 13) {//enter key
$(e.target).blur();
this.render();
return;
}
if ($(".cellSeparation").is(":focus")) this._updateNumber(e, "cellSeparation");
},
......
......@@ -7,7 +7,7 @@ PartMenuView = Backbone.View.extend({
el: "#menuContent",
events: {
"click .partType": "_changePartType"
"click .partType": "_changePartType",
},
initialize: function(options){
......@@ -23,6 +23,14 @@ PartMenuView = Backbone.View.extend({
},
_onKeyup: function(e){
if (this.model.get("currentTab") != "part") return;
if ($("input").is(":focus") && e.keyCode == 13) {//enter key
$(e.target).blur();
this.render();
return;
}
if ($(".cellSeparation").is(":focus")) this._updateNumber(e, "cellSeparation");
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment