Fix protcol naming when load multiple protocols (#1904)

This commit is contained in:
aignatov-bio 2019-07-08 12:51:47 +02:00 committed by GitHub
parent 0d1ec0d4ed
commit 99b1075c28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -513,18 +513,22 @@ function importProtocolFromFile(
function importSingleProtocol(index, replaceVals, resultCallback) {
// Retrieve general protocol info
var name = $('#import_protocol_name').val();
var authors = $('#protocol_authors').val();
var name;
var authors;
var createdAt = '';
var updatedAt = '';
var descriptionAssetsJson = [];
var protocolDescription;
var protocolJson = {};
var steps = $(protocolXmls[index]).find('protocol > steps > step');
var steps;
var stepsJson = [];
previewProtocol(index, replaceVals);
name = $('#import_protocol_name').val();
authors = $('#protocol_authors').val();
steps = $(protocolXmls[index]).find('protocol > steps > step');
$(protocolXmls[index]).find('protocol').each(function() {
createdAt = $(this).find('created_at').text();
updatedAt = $(this).find('updated_at').text();