Skip to content
Snippets Groups Projects
Commit 6a90a8cf authored by juanf's avatar juanf
Browse files

SSDM-4763 : Bugfix, children generator was no longer working.

SVN: 37975
parent af59db93
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment