From d6a054f8eaedfb0efdd9e58ad4dcd5c5b5ee32b0 Mon Sep 17 00:00:00 2001 From: gakin <gakin> Date: Mon, 17 Aug 2015 11:42:08 +0000 Subject: [PATCH] SSDM-2320 : Parents and children don't show if empty SVN: 34470 --- .../html/js/views/SampleForm/SampleFormView.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js index 57a29181f84..675931c1aa1 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js @@ -410,8 +410,14 @@ function SampleFormView(sampleFormController, sampleFormModel) { // //Repaint parents and children after updating the property state to show the annotations - this._sampleFormModel.sampleLinksParents.repaint(); - this._sampleFormModel.sampleLinksChildren.repaint(); + if(this._sampleFormModel.mode !== FormMode.VIEW || + this._sampleFormModel.mode === FormMode.VIEW && currentParentsLinks && currentParentsLinks.length !== 0) { + this._sampleFormModel.sampleLinksParents.repaint(); + } + if(this._sampleFormModel.mode !== FormMode.VIEW || + this._sampleFormModel.mode === FormMode.VIEW && currentChildrenLinks && currentChildrenLinks.length !== 0) { + this._sampleFormModel.sampleLinksChildren.repaint(); + } if(profile.softLinks) { if(currentOrphanLinksIdentifiers.length !== 0) { -- GitLab