Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit d72bf45

Browse files
committed
ENH: refs #975. Use new style download URLs in our javascript calls
for consistency.
1 parent 7213ffd commit d72bf45

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

core/public/js/common/common.browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ midas.createAction = function (node) {
479479
}, function (text) {
480480
var retVal = $.parseJSON(text);
481481
if(retVal.action == 'download') {
482-
window.location = json.global.webroot+'/download?folders='+folderId;
482+
window.location = json.global.webroot+'/download/folder/'+folderId;
483483
}
484484
else if(retVal.action == 'promptApplet') {
485485
midas.promptDownloadApplet(folderId, '', retVal.sizeStr);
@@ -493,7 +493,7 @@ midas.createAction = function (node) {
493493
}, function (text) {
494494
var retVal = $.parseJSON(text);
495495
if(retVal.action == 'download') {
496-
window.location = json.global.webroot+'/download?items='+itemId;
496+
window.location = json.global.webroot+'/download/item/'+itemId;
497497
}
498498
else if(retVal.action == 'promptApplet') {
499499
midas.promptDownloadApplet('', itemId, retVal.sizeStr);

core/public/js/item/item.view.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $(document).ready(function() {
55
}, function (text) {
66
var retVal = $.parseJSON(text);
77
if(retVal.action == 'download') {
8-
window.location = json.global.webroot+'/download?items='+json.item.item_id;
8+
window.location = json.global.webroot+'/download/item/'+json.item.item_id;
99
}
1010
else if(retVal.action == 'promptApplet') {
1111
var html = 'Warning: you have requested a large download ('+retVal.sizeStr+') that might take a very long time to complete.';
@@ -23,7 +23,7 @@ $(document).ready(function() {
2323
$('div.MainDialog').dialog('close');
2424
});
2525
$('input.useZipStream').unbind('click').click(function () {
26-
window.location = json.global.webroot+'/download?items='+json.item.item_id;
26+
window.location = json.global.webroot+'/download/item/'+json.item.item_id;
2727
$('div.MainDialog').dialog('close');
2828
});
2929
}

0 commit comments

Comments
 (0)