From 6a90a8cfa69e18ed18b7dbd04a737316e3ee607f Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Mon, 27 Mar 2017 13:03:47 +0000 Subject: [PATCH] SSDM-4763 : Bugfix, children generator was no longer working. SVN: 37975 --- .../eln-lims/html/js/views/SampleForm/SampleFormView.js | 4 ++-- .../html/js/views/SampleForm/widgets/LinksController.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js index 970fb8da80b..6df27998336 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js @@ -331,7 +331,7 @@ function SampleFormView(sampleFormController, sampleFormModel) { // GENERATE CHILDREN // if((this._sampleFormModel.mode !== FormMode.VIEW) && this._sampleFormModel.isELNSample) { - var $generateChildrenBtn = $("<a>", { 'class' : 'btn btn-default', 'style' : 'margin-left:25px;', 'id' : 'generate_children'}).text("Generate Children"); + var $generateChildrenBtn = $("<a>", { 'class' : 'btn btn-default', 'style' : 'margin-top:15px;', 'id' : 'generate_children'}).text("Generate Children"); $generateChildrenBtn.click(function(event) { _this._generateChildren(); }); @@ -899,7 +899,7 @@ function SampleFormView(sampleFormController, sampleFormModel) { virtualSample.code = generatedChildrenCodes[i]; virtualSample.identifier = "/" + generatedChildrenSpace + "/" + virtualSample.code; virtualSample.sampleTypeCode = generatedChildrenType; - _this._sampleFormModel.sampleLinksChildren.addSample(virtualSample); + _this._sampleFormModel.sampleLinksChildren.addVirtualSample(virtualSample); } _this._childrenAdded(); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksController.js index e18948ac673..92ed045446d 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksController.js @@ -118,6 +118,10 @@ function LinksController(title, sampleTypeHints, isDisabled, samplesToEdit, show return true; } + this.addVirtualSample = function(sample) { + linksView.updateSample(sample, true, false); + } + this.addSample = function(sample, isInit) { Util.blockUI(); mainController.serverFacade.searchWithIdentifiers([sample.identifier], function(results) { -- GitLab