better conversation view

This commit is contained in:
jeena 2013-09-09 00:36:31 +02:00
parent 25e3f203e6
commit 037f382d72
5 changed files with 120 additions and 35 deletions

View 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;
});