diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-06-15 20:49:22 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-06-15 22:34:35 +0200 |
commit | dd55626317d191b6528fe1b8f1d8d267157df748 (patch) | |
tree | e9d9555805fe0fb427502ec9848a05d3619c8bc4 /src/ws/node.js | |
parent | fa3e62eafddf777426f9e7310c6952ffa9fd1290 (diff) |
Major overhaul of visuals.
Diffstat (limited to 'src/ws/node.js')
-rw-r--r-- | src/ws/node.js | 20 |
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"; } } }; |