diff --git a/src/app/cmd.js b/src/app/cmd.js
index 8df297d..27f797f 100644
--- a/src/app/cmd.js
+++ b/src/app/cmd.js
@@ -61,7 +61,7 @@ var cmd = {
function invokeHandler (input, handler) {
console.log('[invokeHandler]: ' + input);
- var cmdResult = handler.handle(input);
+ var cmdResult = handler.handle({ input: input});
if(cmdResult != null) {
console.log(cmdResult);
}
diff --git a/src/app/commands.js b/src/app/commands.js
index ac0b406..ea955ba 100644
--- a/src/app/commands.js
+++ b/src/app/commands.js
@@ -1,18 +1,19 @@
import appState from './appState';
-import * as result from './result/result';
+import HelpResult from './models/HelpResult';
+
var cmdConfig = {};
export default {
initialize (cmd) {
cmd.commands({
- 'help': function() {
- var helpResult = document.querySelector('.result .helpResultTpl');
- if(helpResult != null) {
- moveResultUp(helpResult);
- return;
- }
+ 'help': function(c) {
+ // var helpResult = document.querySelector('.result .helpResultTpl');
+ // if(helpResult != null) {
+ // moveResultUp(helpResult);
+ // return;
+ // }
- appState.addCommandResult(new result.HelpResult());
+ appState.addCommandResult(new HelpResult(c.input));
},
'clear': function() {
appState.clearCommmandResults();
diff --git a/src/app/components/AppRoot.jsx b/src/app/components/AppRoot.jsx
index 4e2ed64..7614486 100644
--- a/src/app/components/AppRoot.jsx
+++ b/src/app/components/AppRoot.jsx
@@ -1,7 +1,6 @@
import React from 'react';
import InputBox from './InputBox';
-import * as results from '../result/result';
-import HelpView from './HelpView';
+import DisplayResultView from './results/DisplayResultView';
export default class AppRoot extends React.Component {
componentWillMount() {
@@ -13,11 +12,10 @@ export default class AppRoot extends React.Component {
this.setState(this.props.appState);
}
render() {
- var results = this.state.commandResults.map((r, i) => this.findResultComponent(r, i));
+ var results = this.state.commandResults.map((r, i) =>