From f8973b05dc2498f7dca68282684cffa10f881a4c Mon Sep 17 00:00:00 2001
From: barillac <barillac>
Date: Mon, 7 Jul 2014 11:29:21 +0000
Subject: [PATCH] Krek and Stoffel profiles updated

SVN: 31904
---
 .../html/js/config/KrekLabProfile.js          | 36 +++++++++++++++--
 .../html/js/config/StoffelLabProfile.js       | 40 ++++++++++++++++---
 2 files changed, 68 insertions(+), 8 deletions(-)

diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/KrekLabProfile.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/KrekLabProfile.js
index 591bd9b45ed..216e6810854 100644
--- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/KrekLabProfile.js
+++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/KrekLabProfile.js
@@ -9,6 +9,8 @@ $.extend(KrekLabProfile.prototype, DefaultProfile.prototype, {
 		
 	
 		//Use this with all known types to create groups, if a type is not specified by default will be added to the OTHERS group.
+		this.inventorySpaces = ["INVENTORY"];
+		this.isShowUnavailablePreviewOnSampleTable = true;
 		this.typeGroups = {
 			"MATERIALS" : {
 				"TYPE" : "MATERIALS",
@@ -32,8 +34,36 @@ $.extend(KrekLabProfile.prototype, DefaultProfile.prototype, {
 			}
 		};
 
-		this.inventorySpaces = ["INVENTORY"];
+			
+
+		this.getSpaceForSampleType = function(type) {
+			if(type === "ANTIBODY") {
+				return "INVENTORY";
+			} else if(type === "PLASMID") {
+				return "INVENTORY";
+			} else if(type === "INHIBITOR") {
+				return "INVENTORY";
+			} else if(type === "CELL_LINE") {
+				return "INVENTORY";
+			} else {
+				return null;
+			}
+		}	
 	
+
+		this.getExperimentIdentifierForSample = function(type, code, properties) {
+			if(type === "ANTIBODY") {
+				return "/INVENTORY/SAMPLES/ANTIBODIES";
+			} else if(type === "PLASMID") {
+				return "/INVENTORY/SAMPLES/PLASMIDS";
+			} else if(type === "INHIBITOR") {
+				return "/INVENTORY/SAMPLES/INHIBITORS";
+			} else if(type === "CELL_LINE") {
+				return "/INVENTORY/SAMPLES/CELL_LINES";
+			} else {
+				return null;
+			}
+		}
 	
 		this.storagesConfiguration = {
 				"isEnabled" : true,
@@ -107,10 +137,10 @@ $.extend(KrekLabProfile.prototype, DefaultProfile.prototype, {
 		}
 
 		
-		//The properties you want to appear on the tables, if you don«t specify the list, all of them will appear by default.
+		//The properties you want to appear on the tables, if you donÇt specify the list, all of them will appear by default.
 		this.typePropertiesForTable = {};
 		
-		//The colors for the notes, if you don«t specify the color, light yellow will be used by default.
+		//The colors for the notes, if you donÇt specify the color, light yellow will be used by default.
 		this.colorForInspectors = {};
 }
 });
\ No newline at end of file
diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/StoffelLabProfile.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/StoffelLabProfile.js
index 96eceb665a5..c0c22664d15 100644
--- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/StoffelLabProfile.js
+++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/config/StoffelLabProfile.js
@@ -9,6 +9,8 @@ $.extend(StoffelLabProfile.prototype, DefaultProfile.prototype, {
 		
 	
 		//Use this with all known types to create groups, if a type is not specified by default will be added to the OTHERS group.
+		this.inventorySpaces = ["INVENTORY"];
+		this.isShowUnavailablePreviewOnSampleTable = true;
 		this.typeGroups = {
 			"MATERIALS" : {
 				"TYPE" : "MATERIALS",
@@ -32,9 +34,37 @@ $.extend(StoffelLabProfile.prototype, DefaultProfile.prototype, {
 			}
 		};
 
-		this.inventorySpaces = ["INVENTORY"];
-	
+			
+
+		this.getSpaceForSampleType = function(type) {
+			if(type === "ANTIBODY") {
+				return "INVENTORY";
+			} else if(type === "PLASMID") {
+				return "INVENTORY";
+			} else if(type === "INHIBITOR") {
+				return "INVENTORY";
+			} else if(type === "CELL_LINE") {
+				return "INVENTORY";
+			} else {
+				return null;
+			}
+		}	
 	
+
+		this.getExperimentIdentifierForSample = function(type, code, properties) {
+			if(type === "ANTIBODY") {
+				return "/INVENTORY/SAMPLES/ANTIBODIES";
+			} else if(type === "PLASMID") {
+				return "/INVENTORY/SAMPLES/PLASMIDS";
+			} else if(type === "INHIBITOR") {
+				return "/INVENTORY/SAMPLES/INHIBITORS";
+			} else if(type === "CELL_LINE") {
+				return "/INVENTORY/SAMPLES/CELL_LINES";
+			} else {
+				return null;
+			}
+		}
+
 		this.storagesConfiguration = {
 				"isEnabled" : true,
 				/*
@@ -53,7 +83,7 @@ $.extend(StoffelLabProfile.prototype, DefaultProfile.prototype, {
 				 * Storages map, can hold configurations for several storages.
 				*/
 				"STORAGE_CONFIGS": {
-					"H20.1_KREK-1" : { //Freezer name given by the NAME_PROPERTY
+					"MINUS80_1" : { //Freezer name given by the NAME_PROPERTY
 									"ROW_NUM" : 5, //Number of rows
 									"COLUMN_NUM" : 4, //Number of columns
 									"BOX_NUM" : 9999 //Boxes on each rack, used for validation, to avoid validation increase the number to 9999 for example
@@ -107,10 +137,10 @@ $.extend(StoffelLabProfile.prototype, DefaultProfile.prototype, {
 		}
 
 		
-		//The properties you want to appear on the tables, if you don«t specify the list, all of them will appear by default.
+		//The properties you want to appear on the tables, if you donÇt specify the list, all of them will appear by default.
 		this.typePropertiesForTable = {};
 		
-		//The colors for the notes, if you don«t specify the color, light yellow will be used by default.
+		//The colors for the notes, if you donÇt specify the color, light yellow will be used by default.
 		this.colorForInspectors = {};
 }
 });
\ No newline at end of file
-- 
GitLab