From e55cd03cf3afd5bd838de86c76ad858d882bd33f Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Wed, 26 Feb 2014 13:45:20 +0200 Subject: web client: status color coding in detail-linked tabular layout --- web/widget/inline.js | 4 ++++ web/widget/table/row.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/web/widget/inline.js b/web/widget/inline.js index ac0fa32..38d288c 100644 --- a/web/widget/inline.js +++ b/web/widget/inline.js @@ -94,6 +94,10 @@ define( var labelTd = $("").text(label); el.on("hasDetails", function(event, path) { labelTd.html(dom.objectRef(path).text(label)); + el.on("statusChanged", function(event, status) { + dom.setStatus(labelTd, status); + event.stopPropagation(); + }); event.stopPropagation(); }); diff --git a/web/widget/table/row.js b/web/widget/table/row.js index d4cc927..49cf296 100644 --- a/web/widget/table/row.js +++ b/web/widget/table/row.js @@ -13,6 +13,10 @@ define( return $("").html($("").prop("class", "placeholder")); }, + setStatus: function(status) { + this.wrapped.trigger("statusChanged", [status]); + }, + showHeading: false, addActionButton: function(label, action) { -- cgit v1.2.3