Skip to content

Commit

Permalink
ConDec-327: Fix dialog knowledge type problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Jcl15 committed Nov 5, 2018
1 parent 9155c02 commit 2ca3e49
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/resources/js/view.context.menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,16 +602,18 @@ function setUpEditSentenceDialogView(description, type) {
+ "<select id='form-select-type' name='form-select-type' class='select full-width-field'/></div>"
+ "</form>");

for (var index = 0; index < extendedKnowledgeTypes.length; index++) {

var myKnowledgeType = replaceArgumentWithLinkTypes(conDecAPI.getKnowledgeTypes(getProjectKey()));
for (var index = 0; index < myKnowledgeType.length; index++) {
var isSelected = "";
if (type.toLowerCase() === extendedKnowledgeTypes[index].toLowerCase()) {
if (type.toLowerCase() === myKnowledgeType[index].toLowerCase()) {
isSelected = "selected ";
}
if (type.toLowerCase() === "argument" && extendedKnowledgeTypes[index].toLowerCase().includes("pro")) {
if (type.toLowerCase() === "argument" && myKnowledgeType[index].toLowerCase().includes("pro")) {
isSelected = "selected ";
}
$("select[name='form-select-type']")[0].insertAdjacentHTML("beforeend", "<option " + isSelected + "value='"
+ extendedKnowledgeTypes[index] + "'>" + extendedKnowledgeTypes[index] + "</option>");
+ myKnowledgeType[index] + "'>" + myKnowledgeType[index] + "</option>");
}
}

Expand Down

0 comments on commit 2ca3e49

Please sign in to comment.