From f6fa3dffdde06dedb49ff6fd96dfdbcfea30c3c4 Mon Sep 17 00:00:00 2001 From: cramakri <cramakri> Date: Wed, 16 Nov 2011 10:27:08 +0000 Subject: [PATCH] LMS-2638 Show sequenced and not-yet sequenced files differently. SVN: 23685 --- .../html/downloader/openbis-dendrogram.html | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/deep_sequencing_unit/source/html/downloader/openbis-dendrogram.html b/deep_sequencing_unit/source/html/downloader/openbis-dendrogram.html index 80b2085581a..4af8cd8dd59 100644 --- a/deep_sequencing_unit/source/html/downloader/openbis-dendrogram.html +++ b/deep_sequencing_unit/source/html/downloader/openbis-dendrogram.html @@ -313,8 +313,8 @@ function updateInspectors(duration) .on("click", toggle_inspected) .text("x"); - var table = box.append("table"); - table.selectAll("tr").data(function(d) { return props_to_pairs(d.bis.properties) }) + var propsTable = box.append("table").attr("class", "properties"); + propsTable.selectAll("tr").data(function(d) { return props_to_pairs(d.bis.properties) }) .enter() .append("tr") .selectAll("td").data(function(d) { return d }).enter() @@ -325,13 +325,22 @@ function updateInspectors(duration) .transition() .style("opacity", "1"); - var downloadTable = - box.append("table") - .attr("width", "100%") - .attr("class", "downloads") - .style("color", "steelblue"); - downloadTable.append("caption").text("Files"); - var downloadTableRow = downloadTable.append("tr"); + var downloadTable = box.append("table"); + downloadTable + .attr("width", "100%") + .attr("class", "downloads") + .style("color", "steelblue"); + + // Add a caption, but make sure there is just one (this does not work with select()) + downloadTable.selectAll("caption") + .data(downloadTableCaption) + .enter() + .append("caption").text(function(d) { return d; }); + var downloadTableRow = + downloadTable.selectAll("tr") + .data(function(d) { return (d.flowlanes) ? d.flowlanes : [] }) + .enter() + .append("tr"); downloadTableRow .append("td") .style("text-align", "left") @@ -389,6 +398,11 @@ function props_to_pairs(d) return pairs; } +function downloadTableCaption(d) +{ + return (d.flowlanes && d.flowlanes.length > 0) ? ["Files"] : ["Not Yet Sequenced"]; +} + function enterApp() { $("#login-form-div").hide(); -- GitLab