From c42134a38e41f99ffada3b527c71305bfc6f584c Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Wed, 30 Sep 2015 11:55:57 +0000
Subject: [PATCH] SSDM-2450 : Polishing

SVN: 34757
---
 .../SampleTable/widgets/MoveSampleController.js     | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleController.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleController.js
index f30ffb7c44b..dbffbd326dc 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleController.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleTable/widgets/MoveSampleController.js
@@ -53,6 +53,19 @@ function MoveSampleController(samplePermId, successAction) {
 							if(_this._moveSampleModel.successAction) { 
 								//Delete Sample from current experiment menu
 								mainController.sideMenu.deleteUniqueIdAndMoveToParent(_this._moveSampleModel.sample.identifier, true);
+								
+								//Add Experiment to the menu if new
+								if(_this._moveSampleModel.isNewExperiment) {
+									var experimentIdentifier = _this._moveSampleModel.experimentIdentifier;
+									var experimentIdentifierParts = experimentIdentifier.split("/");
+									var isInventory = profile.isInventorySpace(experimentIdentifierParts[1]);
+									mainController.sideMenu.refreshExperiment({ 
+										identifier: _this._moveSampleModel.experimentIdentifier, 
+										code: experimentIdentifierParts[3], 
+										properties : {}
+									}, isInventory);
+								}
+								
 								//Refresh Experiment where sample was moved
 								mainController.sideMenu.refreshSubExperiment(_this._moveSampleModel.experimentIdentifier);
 								
-- 
GitLab