This commit is contained in:
Legend Tang 2015-03-06 16:54:18 +08:00
parent 300868edff
commit de306e6aeb
3 changed files with 23 additions and 19 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@ var Filt = require("../filt/filt.js");
var utils = require("../utils.js");
var common = require("./common.js");
var actions = require("../actions.js");
var FilterDocs = React.createClass({
statics: {
@ -275,7 +276,7 @@ var FileMenu = React.createClass({
handleNewClick: function (e) {
e.preventDefault();
if (confirm("Delete all flows?")) {
FlowActions.clear();
actions.FlowActions.clear();
}
},
handleOpenClick: function (e) {

View File

@ -1,6 +1,7 @@
var React = require("react");
var common = require("./common.js");
var actions = require("../actions.js");
var toputils = require("../utils.js");
var views = require("../store/view.js");
var Filt = require("../filt/filt.js");
@ -166,33 +167,33 @@ var MainView = React.createClass({
break;
case toputils.Key.C:
if (e.shiftKey) {
FlowActions.clear();
actions.FlowActions.clear();
}
break;
case toputils.Key.D:
if (flow) {
if (e.shiftKey) {
FlowActions.duplicate(flow);
actions.FlowActions.duplicate(flow);
} else {
FlowActions.delete(flow);
actions.FlowActions.delete(flow);
}
}
break;
case toputils.Key.A:
if (e.shiftKey) {
FlowActions.accept_all();
actions.FlowActions.accept_all();
} else if (flow && flow.intercepted) {
FlowActions.accept(flow);
actions.FlowActions.accept(flow);
}
break;
case toputils.Key.R:
if (!e.shiftKey && flow) {
FlowActions.replay(flow);
actions.FlowActions.replay(flow);
}
break;
case toputils.Key.V:
if(e.shiftKey && flow && flow.modified) {
FlowActions.revert(flow);
actions.FlowActions.revert(flow);
}
break;
default: