summaryrefslogtreecommitdiff
path: root/src/ws/node.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ws/node.js')
-rw-r--r--src/ws/node.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ws/node.js b/src/ws/node.js
index 76ad7e3..4c63496 100644
--- a/src/ws/node.js
+++ b/src/ws/node.js
@@ -173,11 +173,6 @@ Node.prototype.create = function()
this.id_element.appendChild(id_txt);
this.data_element.appendChild(this.id_element);
- this.title_element = document.createElement("div");
- this.title_element.setAttribute("class", "title");
- this.title_element.setAttribute("ondblclick", "editTitle(event)");
- this.data_element.appendChild(this.title_element);
-
var add_child_button = document.createElement("div");
add_child_button.name = "add_button";
add_child_button.setAttribute("onclick", "addChild(event)");
@@ -199,9 +194,14 @@ Node.prototype.create = function()
this.state_element.setAttribute("onclick", "changeState(event)");
this.state_element.setAttribute("nodeid", this.id);
this.state_element.setAttribute("class", "state");
- this.state_element.innerHTML = "todo";
+ this.setAttribute("state", "todo");
this.data_element.appendChild(this.state_element);
+ this.title_element = document.createElement("div");
+ this.title_element.setAttribute("class", "title");
+ this.title_element.setAttribute("ondblclick", "editTitle(event)");
+ this.data_element.appendChild(this.title_element);
+
this.description_element = document.createElement("div");
this.description_element.setAttribute("class", "description");
this.description_element.setAttribute("ondblclick", "editDescription(event)");
@@ -332,19 +332,19 @@ Node.prototype.setAttribute = function(name, value)
this.state_element.appendChild(txt);
if(value == "done")
{
- this.state_element.style.color = "green";
+ this.state_element.style.backgroundColor = "#36b37e";
}
else if(value == "in-progress")
{
- this.state_element.style.color = "yellow";
+ this.state_element.style.backgroundColor = "#ffd351";
}
else if(value == "blocked")
{
- this.state_element.style.color = "red";
+ this.state_element.style.backgroundColor = "#da4343";
}
else
{
- this.state_element.style.color = "black";
+ this.state_element.style.backgroundColor = "#ebedf0";
}
}
};