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

Add empty dmn table as template

parent d3da28a2
No related branches found
No related tags found
No related merge requests found
dmnverifierfrontend/src/main/resources/META-INF/resources/css/img/emptyFile.png

5.22 KiB

......@@ -102,6 +102,15 @@ select:focus::-ms-value {
width: 50px;
}
.dmn-empty-file {
flex-grow: 1;
}
.dmn-empty-file > label {
background-image: url("img/emptyFile.png");
width: 50px;
}
.dmn-download {
flex-grow: 1;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd" xmlns:biodi="http://bpmn.io/schema/dmn/biodi/1.0" id="Definitions_1kjh9a2" name="DRD" namespace="http://camunda.org/schema/1.0/dmn">
<decision id="Decision_13nychf" name="Decision 1">
<extensionElements>
<biodi:bounds x="120" y="145" width="180" height="80" />
</extensionElements>
<decisionTable id="decisionTable_1">
<input id="input_1">
<inputExpression id="inputExpression_1" typeRef="string">
<text></text>
</inputExpression>
</input>
<output id="output_1" typeRef="string" />
</decisionTable>
</decision>
</definitions>
......@@ -25,6 +25,11 @@
</label>
<input id="dmn-file-upload" type="file"/>
</div>
<div class="dmn-top-item dmn-empty-file">
<label class="clickable" for="dmn-file-empty">
</label>
<input id="dmn-file-empty" type="button"/>
</div>
<div class="dmn-top-item dmn-download">
<label class="clickable" for="dmn-file-download">
</label>
......
$('#dmn-file-download').on('click', function () {
exportDiagram();
document.addEventListener("DOMContentLoaded", function () {
$('#dmn-file-download').on('click', exportDiagram());
});
function download(filename, dmnXml) {
......
document.addEventListener("DOMContentLoaded", function () {
$('#dmn-file-upload').on('change', loadDmnFromFile);
$('#dmn-file-empty').on('click', loadEmptyFile);
});
function loadDmnFromFile(evt) {
......@@ -13,4 +14,15 @@ function loadDmnFromFile(evt) {
fileReader.readAsText(dmnFile, "UTF-8");
}
function loadEmptyFile() {
$.ajax({
url: 'dmn/emptyDMN.dmn',
type: 'GET',
contentType: 'text/xml',
success: function (data) {
openDiagram(data);
}
});
}
let rootUrl = 'http://localhost:8080/';
let rootUrl = 'http://192.168.2.109:8080/';
let dmnApi = rootUrl + 'api/dmn/';
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment