feat(example): restructure simple application example
This commit is contained in:
parent
9d1dd58ac5
commit
f9eda1827e
3680
example/complex.bpmn
3680
example/complex.bpmn
File diff suppressed because it is too large
Load Diff
|
@ -113,33 +113,6 @@
|
||||||
createNewDiagram();
|
createNewDiagram();
|
||||||
});
|
});
|
||||||
|
|
||||||
//Special debug modus to open a file from web servers root.
|
|
||||||
(function loadFromServer() {
|
|
||||||
var bpmnDoc = getQueryVariable('bpmndoc');
|
|
||||||
|
|
||||||
if(bpmnDoc) {
|
|
||||||
var client = new XMLHttpRequest();
|
|
||||||
client.open('GET', bpmnDoc);
|
|
||||||
client.onreadystatechange = function () {
|
|
||||||
console.log('Opening: ' + bpmnDoc);
|
|
||||||
openDiagram(client.responseText);
|
|
||||||
}
|
|
||||||
client.send();
|
|
||||||
}
|
|
||||||
|
|
||||||
function getQueryVariable(variable) {
|
|
||||||
var query = window.location.search.substring(1);
|
|
||||||
var vars = query.split("&");
|
|
||||||
for (var i = 0; i < vars.length; i++) {
|
|
||||||
var pair = vars[i].split("=");
|
|
||||||
if (pair[0] === variable) {
|
|
||||||
return pair[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
var downloadLink = $('#js-download-diagram');
|
var downloadLink = $('#js-download-diagram');
|
||||||
var downloadSvgLink = $('#js-download-svg');
|
var downloadSvgLink = $('#js-download-svg');
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<head>
|
<head>
|
||||||
<title>bpmn-js modeler demo</title>
|
<title>bpmn-js modeler demo</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/app.css" />
|
<link rel="stylesheet" href="app.css" />
|
||||||
<link rel="stylesheet" href="css/diagram-js.css" />
|
<link rel="stylesheet" href="../css/diagram-js.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="content" id="js-drop-zone">
|
<div class="content" id="js-drop-zone">
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
var str = window.location.search;
|
var str = window.location.search;
|
||||||
var min = !/\?debug=/.test(str);
|
var min = !/\?debug=/.test(str);
|
||||||
|
|
||||||
document.write('<script src="../bpmn' + (min ? '.min': '') + '.js"></' + 'script>');
|
document.write('<script src="../../bpmn' + (min ? '.min': '') + '.js"></' + 'script>');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
|
@ -1,9 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>bpmn-js demo</title>
|
<title>bpmn-js viewer demo</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/app.css" />
|
<link rel="stylesheet" href="app.css" />
|
||||||
<link rel="stylesheet" href="css/diagram-js.css" />
|
<link rel="stylesheet" href="../css/diagram-js.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="content" id="js-drop-zone">
|
<div class="content" id="js-drop-zone">
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
var str = window.location.search;
|
var str = window.location.search;
|
||||||
var min = !/\?debug=/.test(str);
|
var min = !/\?debug=/.test(str);
|
||||||
|
|
||||||
document.write('<script src="../bpmn-viewer' + (min ? '.min': '') + '.js"></' + 'script>');
|
document.write('<script src="../../bpmn-viewer' + (min ? '.min': '') + '.js"></' + 'script>');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
Loading…
Reference in New Issue