Merge remote-tracking branch 'legend/master'

Conflicts:
	libmproxy/web/static/app.js
This commit is contained in:
Maximilian Hils 2015-03-06 10:05:12 +01:00
commit 353a6ace47
4 changed files with 35 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -49,7 +49,8 @@ var EventLogContents = React.createClass({
view: view view: view
}); });
view.addListener("add recalculate", this.onEventLogChange); view.addListener("add", this.onEventLogChange);
view.addListener("recalculate", this.onEventLogChange);
}, },
closeView: function () { closeView: function () {
this.state.view.close(); this.state.view.close();

View File

@ -65,15 +65,24 @@ var FlowTable = React.createClass({
}, },
componentWillMount: function () { componentWillMount: function () {
if (this.props.view) { if (this.props.view) {
this.props.view.addListener("add update remove recalculate", this.onChange); this.props.view.addListener("add", this.onChange);
this.props.view.addListener("update", this.onChange);
this.props.view.addListener("remove", this.onChange);
this.props.view.addListener("recalculate", this.onChange);
} }
}, },
componentWillReceiveProps: function (nextProps) { componentWillReceiveProps: function (nextProps) {
if (nextProps.view !== this.props.view) { if (nextProps.view !== this.props.view) {
if (this.props.view) { if (this.props.view) {
this.props.view.removeListener("add update remove recalculate"); this.props.view.removeListener("add");
this.props.view.removeListener("update");
this.props.view.removeListener("remove");
this.props.view.removeListener("recalculate");
} }
nextProps.view.addListener("add update remove recalculate", this.onChange); nextProps.view.addListener("add", this.onChange);
nextProps.view.addListener("update", this.onChange);
nextProps.view.addListener("remove", this.onChange);
nextProps.view.addListener("recalculate", this.onChange);
} }
}, },
getDefaultProps: function () { getDefaultProps: function () {

View File

@ -54,7 +54,9 @@ var MainView = React.createClass({
}); });
view.addListener("recalculate", this.onRecalculate); view.addListener("recalculate", this.onRecalculate);
view.addListener("add update remove", this.onUpdate); view.addListener("add", this.onUpdate);
view.addListener("update", this.onUpdate);
view.addListener("remove", this.onUpdate);
view.addListener("remove", this.onRemove); view.addListener("remove", this.onRemove);
}, },
onRecalculate: function () { onRecalculate: function () {