diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js index 5f167619bb85f96a054ea545a7ca154f363a6561..642ef3beeb3ae83aee036906419e46cae5eb7c5f 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js @@ -226,6 +226,27 @@ var Util = new function() { }); } + this.showDirectLink = function(directLink) { + var css = { + 'text-align' : 'left', + 'top' : '15%', + 'width' : '80%', + 'left' : '10%', + 'right' : '10%', + 'overflow' : 'hidden' + }; + + var $window = $("<div>").append($("<h1>").append("Direct Link")) + .append("Please use this link to access the folder though the network: ") + .append($("<br>")) + .append("Directly clicking on it will open the default application.") + .append($("<br>")) + .append($("<a>", { "href" : directLink, "target" : "_blank"}).append(directLink)); + $window.css("margin", "10px"); + + Util.blockUI($window, css); + } + //HACK: This method is intended to be used by naughty SVG images that don't provide a correct with/height and don't resize correctly this.loadSVGImage = function(imageURL, containerWidth, containerHeight, callback, isSEQSVG) { d3.xml(imageURL, "image/svg+xml", 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 98fa358961f5faaf3feccd4d7c6fdb4325c4bd6d..8555455163cb47e577c4cf1f5b022893beeec48c 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,10 @@ function DataSetViewerModel(containerId, profile, sample, serverFacade, datastor } this.getDirectDirectoryLink = function(datasetCode, datasetFile) { - var directLinkURL = profile.directLinkURL + this.sample.experimentIdentifierOrNull.substring(1) + "/" + datasetCode + "/" + datasetFile.pathInDataSet + "/"; - var directLink = "<span onclick=\"" + "window.open('" + directLinkURL + "')" + "\" class='glyphicon glyphicon-hdd'></span>"; - return directLink; + 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>"; + return directLinkComponent; } this.getPreviewLink = function(datasetCode, datasetFile) { @@ -79,11 +80,6 @@ function DataSetViewerModel(containerId, profile, sample, serverFacade, datastor var imageURLAsString = profile.getDefaultDataStoreURL() + "/" + datasetCode + "/" + datasetFile.pathInDataSet + "?sessionID=" + mainController.serverFacade.getSession(); var onclick = "Util.showImage(\"" + imageURLAsString + "\");" previewLink = "<span onclick='" + onclick + "' class='glyphicon glyphicon-search'></span>"; -// previewLink = FormUtil.getButtonWithIcon("glyphicon-search", function() { -// var imageURL = profile.getDefaultDataStoreURL() + '/' + datasetCode + "/" + datasetFile.pathInDataSet + "?sessionID=" + mainController.serverFacade.getSession(); -// Util.showImage(imageURL); -// event.stopPropagation(); -// }); } return previewLink; }