From 0e897b9952f729d663d85b84ebff166df11d5938 Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Fri, 16 Dec 2011 09:57:46 +0000
Subject: [PATCH] MINOR: Cosmetic fixes to the dashboard -- show strain names
 if there are not too many of them

SVN: 24017
---
 .../source/html/browser/basynthec-dashboard.html       | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/eu_basynthec/source/html/browser/basynthec-dashboard.html b/eu_basynthec/source/html/browser/basynthec-dashboard.html
index 5c1c7c5a34f..738031b884f 100644
--- a/eu_basynthec/source/html/browser/basynthec-dashboard.html
+++ b/eu_basynthec/source/html/browser/basynthec-dashboard.html
@@ -14,8 +14,8 @@
   <!-- <script type="text/javascript" src="openbis-request-cache.js"></script> -->
   <script>
 
-//basynthec = new openbis_basynthec('https://basynthec.ethz.ch/openbis/openbis', 'https://basynthec.ethz.ch/datastore_server');
-basynthec = new openbis_basynthec('http://localhost:8888/openbis/openbis', 'http://localhost:8889/datastore_server');
+basynthec = new openbis_basynthec('https://basynthec.ethz.ch/openbis/openbis', 'https://basynthec.ethz.ch/datastore_server');
+//basynthec = new openbis_basynthec('http://localhost:8888/openbis/openbis', 'http://localhost:8889/datastore_server');
 
 // The elements for each of the views
 var vis, od600View, metabolomicsView, transcriptomicsView, proteomicsView;
@@ -194,7 +194,11 @@ function updateView(aView, type)
 				.selectAll("td")
 					.data(function (d) { 
 						var dateString = timeformat(new Date(d.registrationDetails.registrationDate));
-						var strainString = "" + d.properties["STRAIN_NAMES"].split(",").length + " strain(s)";
+						var strainNames = d.properties["STRAIN_NAMES"].split(",");
+						var strainString = 
+							(strainNames.length < 3) ?
+								strainNames.join(" ") :
+								"" + strainNames.length + " strain(s)";
 						return [dateString, d.registrationDetails.userEmail, strainString]
 					})
 				.enter()
-- 
GitLab