From b5f808417eb017ffea7da90e134a1bb4a5d33712 Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Mon, 27 Apr 2015 14:27:09 +0000
Subject: [PATCH] SSDM-1724 : Plate View (ongoing work)

SVN: 33914
---
 .../html/js/views/SampleForm/widgets/PlateController.js    | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js
index dfe675427d2..84e40b25e88 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js
@@ -23,6 +23,13 @@ function PlateController(sample) {
 	}
 	
 	this.initWithPlaceHolder = function() {
+		//Delete old view for redraws - Corner Case
+		var oldPlaceHolderFound = $("#" + this._plateModel.getPlaceHolderId());
+		if(oldPlaceHolderFound.length !== 0) {
+			oldPlaceHolderFound.remove();
+		}
+		
+		//Normal case
 		var _this = this;
 		var repeatUntilSet = function() {
 			var placeHolderFound = $("#" + _this._plateModel.getPlaceHolderId());
-- 
GitLab