Fix importer so it supports rendering & importing rich text format

Closes SCI-674.
This commit is contained in:
Luka Murn 2016-11-15 16:57:36 +01:00
parent 59952e400c
commit 83160a487b
2 changed files with 4 additions and 4 deletions

View file

@ -60,7 +60,7 @@ function importProtocolFromFile(
// Populate values in the template
if (values !== null) {
_.each(values, function(val, key) {
template.find("[data-val='" + key + "']").text(val);
template.find("[data-val='" + key + "']").append(val);
});
}
@ -134,7 +134,7 @@ function importProtocolFromFile(
var stepGuid = node.attr("guid");
var stepPosition = String(Number.parseInt(node.attr("position")) + 1);
var stepName = node.children("name").text();
var stepDescription = node.children("description").text();
var stepDescription = $(node.children("description")).html();
// Generate step element
var stepEl = newPreviewElement(
@ -431,7 +431,7 @@ function importProtocolFromFile(
stepJson.id = stepId;
stepJson.position = $(this).attr("position");
stepJson.name = $(this).children("name").text();
stepJson.description = $(this).children("description").text();
stepJson.description = $(this).children("description").html();
// Iterate through assets
var stepAssetsJson = [];

View file

@ -14,7 +14,7 @@
<br>
<div class="tab-content">
<div class="tab-pane active" role="tabpanel">
<span data-val="description"></span>
<div data-val="description"></div>
<hr>
<div class="row">
<div data-toggle="tables" class="col-xs-12">