better conversation view
This commit is contained in:
parent
25e3f203e6
commit
037f382d72
5 changed files with 120 additions and 35 deletions
25
WebKit/scripts/helper/ConversationNode.js
Normal file
25
WebKit/scripts/helper/ConversationNode.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
define([
|
||||
|
||||
],
|
||||
|
||||
function() {
|
||||
|
||||
|
||||
function ConversationNode(dom_node) {
|
||||
this.dom_node = dom_node;
|
||||
this.parent = null;
|
||||
this.children = [];
|
||||
}
|
||||
|
||||
ConversationNode.prototype.addChild = function(node) {
|
||||
this.children.push(node);
|
||||
node.parent = this;
|
||||
};
|
||||
|
||||
ConversationNode.prototype.toString = function() {
|
||||
return "{ \"" + this.dom_node.status.entity + "\": [" + this.children.toString() + "]}";
|
||||
};
|
||||
|
||||
|
||||
return ConversationNode;
|
||||
});
|
Reference in a new issue