diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/SampleFormController.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/SampleFormController.js index 3f77b374ebe81d5a5adefa95a16affd3bb02e68b..d92046706b29ddfa9169ebe34c5fe003f57ef82e 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/SampleFormController.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/SampleFormController.js @@ -189,7 +189,7 @@ function SampleFormController(mainController, mode, sample) { parameters["defaultBenchProperties"][defaultStoragePropertyGroup["ROW_PROPERTY"]] = 1; parameters["defaultBenchProperties"][defaultStoragePropertyGroup["COLUMN_PROPERTY"]] = 1; parameters["defaultBenchProperties"][defaultStoragePropertyGroup["BOX_PROPERTY"]] = this._sampleFormModel.sample.experimentIdentifierOrNull.replace(/\//g,'\/') + "_" + isCopyWithNewCode + "_EXP_RESULTS"; - parameters["defaultBenchProperties"][defaultStoragePropertyGroup["USER_PROPERTY"]] = window.mainController.serverFacade.openbisServer.getSession().split("-")[0]; + parameters["defaultBenchProperties"][defaultStoragePropertyGroup["USER_PROPERTY"]] = mainController.serverFacade.openbisServer.getSession().split("-")[0]; } parameters["sampleChildrenNew"] = []; parameters["sampleChildrenRemoved"] = []; @@ -199,7 +199,7 @@ function SampleFormController(mainController, mode, sample) { // Sending the request to the server // if(profile.getDefaultDataStoreCode()) { - window.mainController.serverFacade.createReportFromAggregationService(profile.getDefaultDataStoreCode(), parameters, function(response) { + mainController.serverFacade.createReportFromAggregationService(profile.getDefaultDataStoreCode(), parameters, function(response) { _this._createUpdateCopySampleCallback(_this, isCopyWithNewCode, response); }); } else { @@ -234,7 +234,7 @@ function SampleFormController(mainController, mode, sample) { var callbackOk = function() { Util.unblockUI(); if((isCopyWithNewCode || _this._sampleFormModel.mode === FormMode.CREATE) && _this._sampleFormModel.sample.experimentIdentifierOrNull) { - window.mainController.sideMenu.refreshSubExperiment(_this._sampleFormModel.sample.experimentIdentifierOrNull); + mainController.sideMenu.refreshSubExperiment(_this._sampleFormModel.sample.experimentIdentifierOrNull); } // 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) { diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/SampleFormView.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/SampleFormView.js index b65a8a1bbe400dc308ae3bad7973ef2a1b0373ea..7b3790767e085f8c7d79863e144054a2837728c0 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/SampleFormView.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/SampleForm/SampleFormView.js @@ -315,6 +315,12 @@ function SampleFormView(sampleFormController, sampleFormModel) { // $container.append($form); + // + // Extra content + // + //Extra components + profile.sampleFormContentExtra(this._sampleFormModel.sample.sampleTypeCode, this._sampleFormModel.sample, "sample-form-content-extra"); + // // TO-DO: Legacy code to be refactored //