-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
141 lines (125 loc) · 6.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
<script src="js/jstools.js" type="text/javascript" charset="utf-8"></script>
<!--<script src="http://raphaeljs.com/raphael.js" type="text/javascript" charset="utf-8"></script>-->
<script src="js/raphael.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery/jquery.progressbar.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery/jquery.asyncqueue.js" type="text/javascript" charset="utf-8"></script>
<script src="js/Color.js" type="text/javascript" charset="utf-8"></script>
<script src="js/Polyline.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ActivityImpl.js" type="text/javascript" charset="utf-8"></script>
<script src="js/impl/FlowImpl.js" type="text/javascript" charset="utf-8"></script>
<script src="js/impl/SequenceFlowImpl.js" type="text/javascript" charset="utf-8"></script>
<script src="js/impl/MessageFlowImpl.js" type="text/javascript" charset="utf-8"></script>
<script src="js/impl/AssociationImpl.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ActivitiRest.js" type="text/javascript" charset="utf-8"></script>
<script src="js/LineBreakMeasurer.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ProcessDiagramGenerator.js" type="text/javascript" charset="utf-8"></script>
<script src="js/ProcessDiagramCanvas.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css" media="screen">
</style>
</head>
<body>
<div class="wrapper">
<div id="pb1"></div>
<div id="overlayBox" >
<div id="diagramBreadCrumbs" class="diagramBreadCrumbs" onmousedown="return false" onselectstart="return false"></div>
<div id="diagramHolder" class="diagramHolder"></div>
<div class="diagram-info" id="diagramInfo"></div>
<div class="debug-info" id="debugInfo"></div>
</div>
</div>
<script language='javascript'>
var DiagramGenerator = {};
var pb1;
$(document).ready(function(){
console.log("Initialize progress bar");
pb1 = new $.ProgressBar({
boundingBox: '#pb1',
label: 'Progressbar!',
on: {
complete: function() {
console.log("Progress Bar COMPLETE");
this.set('label', 'complete!');
},
valueChange: function(e) {
this.set('label', e.newVal + '%');
}
},
value: 0
});
console.log("Progress bar inited");
ProcessDiagramGenerator.options = {
/*
processInstanceHighLightsUrl: "./activiti-rest/process-instance.php?id={processInstanceId}",
processDefinitionUrl: "./activiti-rest/process-difinition-diagram-layout.php?id={processDefinitionId}",
processDefinitionByKeyUrl: "./activiti-rest/process-definition.php?id={processDefinitionKey}",
*/
diagramBreadCrumbsId: "diagramBreadCrumbs",
diagramHolderId: "diagramHolder",
diagramInfoId: "diagramInfo",
on: {
click: function(canvas, element, contextObject){
// ON ELEMENT CLICK
var mouseEvent = this;
console.log("[CLICK] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject);
if (contextObject.getProperty("type") == "callActivity") {
var processDefinitonKey = contextObject.getProperty("processDefinitonKey");
var processDefinitons = contextObject.getProperty("processDefinitons");
var processDefiniton = processDefinitons[0];
console.log("Load callActivity '" + processDefiniton.processDefinitionKey + "', contextObject: ", contextObject);
// Load processDefinition
ProcessDiagramGenerator.drawDiagram(processDefiniton.processDefinitionId);
}
var debugInfo = $("#debugInfo"); if (debugInfo) debugInfo.html("ON ELEMENT CLICK");
},
rightClick: function(canvas, element, contextObject){
// ON ELEMENT RIGHT CLICK
var mouseEvent = this;
console.log("[RIGHTCLICK] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject);
var debugInfo = $("#debugInfo"); if (debugInfo) debugInfo.html("ON ELEMENT RIGHT CLICK");
},
canvasClick: function(canvas, element){
// ON CANVAS CLICK
var debugInfo = $("#debugInfo"); if (debugInfo) debugInfo.html("ON CANVAS CLICK");
},
canvasRightClick: function(canvas, element){
// ON CANVAS RIGHT CLICK
var debugInfo = $("#debugInfo"); if (debugInfo) debugInfo.html("ON CANVAS RIGHT CLICK");
},
over: function(canvas, element, contextObject){
// ON ELEMENT OVER
var mouseEvent = this;
//console.log("[OVER] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject);
// TODO: show tooltip-window with contextObject info
ProcessDiagramGenerator.showActivityInfo(contextObject);
var debugInfo = $("#debugInfo"); if (debugInfo) debugInfo.html("ON ELEMENT OVER");
},
out: function(canvas, element, contextObject){
// ON ELEMENT OUT
var mouseEvent = this;
//console.log("[OUT] mouseEvent: %o, canvas: %o, clicked element: %o, contextObject: %o", mouseEvent, canvas, element, contextObject);
ProcessDiagramGenerator.hideInfo();
var debugInfo = $("#debugInfo"); if (debugInfo) debugInfo.html("ON ELEMENT OUT");
}
}
};
ActivitiRest.options = {
/*
processInstanceHighLightsUrl: "http://localhost/diagram-viewer/activiti-rest/process-instance.php?id={processInstanceId}&callback=?",
processDefinitionUrl: "http://localhost/diagram-viewer/activiti-rest/process-difinition-diagram-layout.php?id={processDefinitionId}&callback=?",
processDefinitionByKeyUrl: "http://localhost/diagram-viewer/activiti-rest/process-definition.php?id={processDefinitionKey}&callback=?",
*/
processInstanceHighLightsUrl: "http://luijee.ru/diagram-viewer/activiti-rest/process-instance.php?id={processInstanceId}&callback=?",
processDefinitionUrl: "http://luijee.ru/diagram-viewer/activiti-rest/process-difinition-diagram-layout.php?id={processDefinitionId}&callback=?",
processDefinitionByKeyUrl: "http://luijee.ru/diagram-viewer/activiti-rest/process-definition.php?id={processDefinitionKey}&callback=?"
};
var processDefinitionId = "techCollectionProcess";
ProcessDiagramGenerator.drawDiagram(processDefinitionId);
});
</script>
</body>
</html>