From a1f853b27973314ecba84c8e69f1a1369a1da311 Mon Sep 17 00:00:00 2001
From: pkupczyk <pkupczyk>
Date: Mon, 13 Aug 2012 09:11:17 +0000
Subject: [PATCH] SP-224 / BIS-143: Expose session workspace to Custom Web UI:
 - added downloadSessionWorkspaceFile to JSON API

SVN: 26348
---
 .../systemsx/cisd/openbis/public/resources/js/openbis.js  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js
index a164bac0f1c..20fb78f0e8a 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/resources/js/openbis.js
@@ -350,6 +350,14 @@ openbis.prototype.createSessionWorkspaceDownloadLink = function(filePath, linkTe
 	return $("<a href='" + this.createSessionWorkspaceDownloadUrl(filePath) + "'>" + (linkText ? linkText : filePath) + "</a>"); 
 }
 
+openbis.prototype.downloadSessionWorkspaceFile = function(filePath, action) {
+	$.ajax({
+		type: "GET",
+		url: this.createSessionWorkspaceDownloadUrl(filePath),
+		success: action
+	});
+}
+
 openbis.prototype.deleteSessionWorkspaceFile = function(filePath, action) {
 	ajaxRequest({
 			url: this.dssApiUrl,
-- 
GitLab