Skip to content
Snippets Groups Projects
Commit 32580424 authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Create verifier button dynamically

parent eede80f1
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,6 @@
<div class="editor-tabs"></div>
</div>
</div>
<button id="button-dmn-verify" onclick="checkVerifications()">Get verifications</button>
<div id="root-dmn-verifier"></div>
</div>
......
......@@ -7,12 +7,17 @@ let dmnApi = rootUrl + 'api/dmn/';
*/
let verifierResults = {};
function checkVerifications() {
getVerifications();
function cleanDmnVerifierRoot() {
let $root = $('#root-dmn-verifier').empty();
$root.append($(`
<button id="button-dmn-verify" onClick="checkVerifications()">
Get verifications</button>
`));
return $root;
}
function cleanDmnVerifierRoot() {
$('#root-dmn-verifier').empty();
function checkVerifications() {
getVerifications();
}
function getVerifications() {
......@@ -60,7 +65,7 @@ function getVerifications() {
function renderDmnVerifierOptions() {
// reset div
let $root = $('#root-dmn-verifier');
let $root = cleanDmnVerifierRoot();
let $select = $(`
<select name="verifier" id="verifier" onchange="renderVerifierResult(this)">
`);
......@@ -81,7 +86,7 @@ function renderDmnVerifierOptions() {
}
$curGroup.append(renderSelectEntry(verifierResults.verifier[i]));
}
$root.html($select);
$root.append($select);
$root.append($(`<div id="verifier-entries">`));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment