From 401b37956b26144b0378682c0309fa6a7c5ea9e4 Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Fri, 13 Jan 2017 10:03:06 +0100 Subject: [PATCH] Simplify protocol export start [SCI-742] --- app/assets/javascripts/protocols/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index 7541ec1e0..eeb4cf943 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -548,15 +548,13 @@ function updateButtons() { function exportProtocols(ids) { if (ids.length > 0) { - var exportLink = document.createElement('a'); - exportLink.id = 'protocolExportLink'; var params = '?protocol_ids[]=' + ids[0]; for (var i = 1; i < ids.length; i++) { params += '&protocol_ids[]=' + ids[i]; } params = encodeURI(params); - exportLink.href = $("[data-action='export']").data('export-url') + params; - exportLink.click(); + window.location.href = $("[data-action='export']") + .data('export-url') + params; } }