mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +08:00
Simplify protocol export start [SCI-742]
This commit is contained in:
parent
d555ba7905
commit
401b37956b
1 changed files with 2 additions and 4 deletions
|
@ -548,15 +548,13 @@ function updateButtons() {
|
||||||
|
|
||||||
function exportProtocols(ids) {
|
function exportProtocols(ids) {
|
||||||
if (ids.length > 0) {
|
if (ids.length > 0) {
|
||||||
var exportLink = document.createElement('a');
|
|
||||||
exportLink.id = 'protocolExportLink';
|
|
||||||
var params = '?protocol_ids[]=' + ids[0];
|
var params = '?protocol_ids[]=' + ids[0];
|
||||||
for (var i = 1; i < ids.length; i++) {
|
for (var i = 1; i < ids.length; i++) {
|
||||||
params += '&protocol_ids[]=' + ids[i];
|
params += '&protocol_ids[]=' + ids[i];
|
||||||
}
|
}
|
||||||
params = encodeURI(params);
|
params = encodeURI(params);
|
||||||
exportLink.href = $("[data-action='export']").data('export-url') + params;
|
window.location.href = $("[data-action='export']")
|
||||||
exportLink.click();
|
.data('export-url') + params;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue