feat(example): restructure simple application example

This commit is contained in:
Nico Rehwaldt 2014-04-09 14:27:35 +02:00
parent 9d1dd58ac5
commit f9eda1827e
5 changed files with 7 additions and 3714 deletions

File diff suppressed because it is too large Load Diff

View File

@ -113,33 +113,6 @@
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 downloadSvgLink = $('#js-download-svg');

View File

@ -2,8 +2,8 @@
<head>
<title>bpmn-js modeler demo</title>
<link rel="stylesheet" href="css/app.css" />
<link rel="stylesheet" href="css/diagram-js.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="../css/diagram-js.css" />
</head>
<body>
<div class="content" id="js-drop-zone">
@ -48,7 +48,7 @@
var str = window.location.search;
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>

View File

@ -1,9 +1,9 @@
<html>
<head>
<title>bpmn-js demo</title>
<title>bpmn-js viewer demo</title>
<link rel="stylesheet" href="css/app.css" />
<link rel="stylesheet" href="css/diagram-js.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="../css/diagram-js.css" />
</head>
<body>
<div class="content" id="js-drop-zone">
@ -48,7 +48,7 @@
var str = window.location.search;
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>