From dc28a5a1a8978563895e3668a5a146b4f6414450 Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Thu, 13 Aug 2015 11:04:37 +0000
Subject: [PATCH] SSDM-2163 : Remove "OK" from all success messages.

SVN: 34447
---
 .../1/as/webapps/eln-lims/html/js/util/Util.js       | 12 ++----------
 .../js/views/DataSetForm/DataSetFormController.js    |  4 ++--
 .../views/ExperimentForm/ExperimentFormController.js |  2 +-
 .../js/views/ProjectForm/ProjectFormController.js    |  2 +-
 .../html/js/views/SampleForm/SampleFormController.js |  7 +------
 5 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js
index b6510bc4f4d..8160e2af1ce 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js
@@ -122,20 +122,12 @@ var Util = new function() {
 	}
 	
 	this.showSuccess = function(withHTML, andCallback, forceAutoHide) {
-		var isiPad = navigator.userAgent.match(/iPad/i) != null;
-		if(!isiPad && !forceAutoHide) {
-			withHTML = withHTML + "<br>" + "<a class='btn btn-default'>OK</a>";
-		}
-		if(!forceAutoHide) {
-			forceAutoHide = false;
-		}
-		this.blockUINoMessage();
 		var localReference = this;
 		jSuccess(
 				withHTML,
 				{
-				  autoHide : isiPad || forceAutoHide,
-				  clickOverlay : false,
+				  autoHide : true,
+				  clickOverlay : true,
 				  MinWidth : 250,
 				  TimeShown : 2000,
 				  ShowTimeEffect : 200,
diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js
index 5c082ebc1a9..1ef31d6465d 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/DataSetFormController.js
@@ -159,9 +159,9 @@ function DataSetFormController(mainController, mode, sample, dataSet) {
 					
 					
 					if(_this._dataSetFormModel.mode === FormMode.CREATE) {
-						Util.showSuccess("DataSet Created.", callbackOk, true);
+						Util.showSuccess("DataSet Created.", callbackOk);
 					} else if(_this._dataSetFormModel.mode === FormMode.EDIT) {
-						Util.showSuccess("DataSet Updated.", callbackOk, true);
+						Util.showSuccess("DataSet Updated.", callbackOk);
 					}
 					
 				} else { //This should never happen
diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormController.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormController.js
index af5eee1e42a..dca6c45015d 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormController.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ExperimentForm/ExperimentFormController.js
@@ -121,7 +121,7 @@ function ExperimentFormController(mainController, mode, experiment) {
 						Util.unblockUI();
 					}
 					
-					Util.showSuccess(experimentTypeDisplayName + " " + message, callbackOk, true);
+					Util.showSuccess(experimentTypeDisplayName + " " + message, callbackOk);
 				} else { //This should never happen
 					Util.showError("Unknown Error.", function() {Util.unblockUI();});
 				}
diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormController.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormController.js
index f473175e53b..fb4b4d68f8f 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormController.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/ProjectForm/ProjectFormController.js
@@ -93,7 +93,7 @@ function ProjectFormController(mainController, mode, project) {
 						Util.unblockUI();
 					}
 					
-					Util.showSuccess(message, callbackOk, true);
+					Util.showSuccess(message, callbackOk);
 				} else { //This should never happen
 					Util.showError("Unknown Error.", function() {Util.unblockUI();});
 				}
diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js
index f07b0e5ed60..5d86934a258 100644
--- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js
+++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormController.js
@@ -371,14 +371,9 @@ function SampleFormController(mainController, mode, sample) {
 						}
 					});
 				}
-				
-//				TO-DO: The Sample is not necessarily searchable after creation since the index runs asynchronously
-//				localReference.serverFacade.searchWithType(localReference.sampleTypeCode, $("#sampleCode")[0].value, function(data) {
-//					mainController.changeView('showViewSamplePageFromPermId',data[0].permId);
-//				});
 			}
 			
-			Util.showSuccess(sampleTypeDisplayName + " " + message, callbackOk, true);
+			Util.showSuccess(sampleTypeDisplayName + " " + message, callbackOk);
 			_this._sampleFormModel.isFormDirty = false;
 		} else { //This should never happen
 			Util.showError("Unknown Error.", function() {Util.unblockUI();});
-- 
GitLab