diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-01-10 16:09:53 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-01-10 16:09:53 +0100 |
commit | 6e2943c8f3befb0a560826e2d764dac1193bfdc1 (patch) | |
tree | 01dadb4624a6616286884c73dc4d5caaa7be65bf | |
parent | d935b195a2246fa24d35df7c6fc354ae628a6777 (diff) |
Missing attributes are now transmitted properly to the client.
-rw-r--r-- | proto.js | 4 | ||||
-rw-r--r-- | src/munia_proto.cc | 1 | ||||
-rw-r--r-- | src/tasktree.cc | 4 |
3 files changed, 7 insertions, 2 deletions
@@ -217,6 +217,10 @@ try { var txt = document.createTextNode(value); txtdiv.appendChild(txt); } + if(name == "colour") { + var txtdiv = document.getElementById(createId(observeid, id) + "_txt"); + txtdiv.style.color = value; + } } f++; } diff --git a/src/munia_proto.cc b/src/munia_proto.cc index 977bf60..2a42884 100644 --- a/src/munia_proto.cc +++ b/src/munia_proto.cc @@ -221,6 +221,7 @@ int callback_lws_task(struct libwebsocket_context * context, task.attributes.begin(); while(ai != task.attributes.end()) { message_t updatemsg = create_msg_update(task, ai->first); + DEBUG(observe, "%s\n", ai->first.c_str()); updatemsg.tid = omi->observe.id; msgqueue[wsi].push_back(updatemsg); ai++; diff --git a/src/tasktree.cc b/src/tasktree.cc index b404cf5..5205abf 100644 --- a/src/tasktree.cc +++ b/src/tasktree.cc @@ -218,7 +218,7 @@ TaskIdList TaskTree::updateData(taskid_t id, const std::string &name, try { node_t* node = id2node.at(id); - node->data.attributes[name] = name; + node->data.attributes[name] = value; affectedNodes.push_back(id); TaskIdList ancestors = ancestorList(id); @@ -241,7 +241,7 @@ task_t TaskTree::data(taskid_t id) node_t* node = id2node.at(id); task_t tmp = node->data; t.id = node->id; - t.attributes["title"] = tmp.attributes["title"]; + t.attributes = tmp.attributes; // DEBUG(tasktree, "!!!!t.id and tmp.id in data: %d and %d\n", t.id, tmp.id); if(node->parent) t.parentid = node->parent->id; else { |