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

SSDM-3449 : Option to disable direct links.

SVN: 36083
parent 157d93be
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,7 @@ $.extend(DefaultProfile.prototype, { ...@@ -57,6 +57,7 @@ $.extend(DefaultProfile.prototype, {
return ($.inArray(spaceCode, this.inventorySpaces) !== -1); 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.directLinkURL = null; //To be set during initialization using info retrieved from the DSS configuration by the reporting plugin
this.hideCodes = true; this.hideCodes = true;
......
...@@ -68,9 +68,11 @@ function DataSetViewerModel(containerId, profile, sample, serverFacade, datastor ...@@ -68,9 +68,11 @@ function DataSetViewerModel(containerId, profile, sample, serverFacade, datastor
} }
this.getDirectDirectoryLink = function(datasetCode, datasetFile) { this.getDirectDirectoryLink = function(datasetCode, datasetFile) {
var directLink = profile.directLinkURL + this.sample.experimentIdentifierOrNull.substring(1) + "/" + datasetCode + "/" + datasetFile.pathInDataSet + "/"; var directLinkComponent = null;
var directLinkComponent = "<span onclick=\"" + "Util.showDirectLink('" + directLink + "')" + "\" class='glyphicon glyphicon-hdd'></span>"; if(profile.directLinkEnabled) {
// var directLink = "<span onclick=\"" + "window.open('" + directLinkURL + "')" + "\" class='glyphicon glyphicon-hdd'></span>"; 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; return directLinkComponent;
} }
......
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