From ef096799ee0ec6e22446ca3fd7794d28b8259994 Mon Sep 17 00:00:00 2001 From: juanf <juanf> Date: Tue, 5 Apr 2016 10:09:32 +0000 Subject: [PATCH] SSDM-3449 : Option to disable direct links. SVN: 36083 --- .../1/as/webapps/eln-lims/html/js/config/Profile.js | 1 + .../js/views/DataSetForm/widgets/DatasetViewerModel.js | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js index 287201b96a7..0f69cb0a91e 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js @@ -57,6 +57,7 @@ $.extend(DefaultProfile.prototype, { return ($.inArray(spaceCode, this.inventorySpaces) !== -1); } + this.directLinkEnabled = true; this.directLinkURL = null; //To be set during initialization using info retrieved from the DSS configuration by the reporting plugin this.hideCodes = true; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerModel.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerModel.js index 8555455163c..24192116fc5 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerModel.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/DatasetViewerModel.js @@ -68,9 +68,11 @@ function DataSetViewerModel(containerId, profile, sample, serverFacade, datastor } this.getDirectDirectoryLink = function(datasetCode, datasetFile) { - var directLink = profile.directLinkURL + this.sample.experimentIdentifierOrNull.substring(1) + "/" + datasetCode + "/" + datasetFile.pathInDataSet + "/"; - var directLinkComponent = "<span onclick=\"" + "Util.showDirectLink('" + directLink + "')" + "\" class='glyphicon glyphicon-hdd'></span>"; -// var directLink = "<span onclick=\"" + "window.open('" + directLinkURL + "')" + "\" class='glyphicon glyphicon-hdd'></span>"; + var directLinkComponent = null; + if(profile.directLinkEnabled) { + var directLink = profile.directLinkURL + this.sample.experimentIdentifierOrNull.substring(1) + "/" + datasetCode + "/" + datasetFile.pathInDataSet + "/"; + directLinkComponent = "<span onclick=\"" + "Util.showDirectLink('" + directLink + "')" + "\" class='glyphicon glyphicon-hdd'></span>"; + } return directLinkComponent; } -- GitLab