cpee 1.3.223 → 1.3.224

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/ui.css +14 -14
  3. data/cockpit/css/wfadaptor.css +50 -0
  4. data/cockpit/graph.html +116 -0
  5. data/cockpit/index.html +41 -41
  6. data/cockpit/js/instance.js +15 -5
  7. data/cockpit/js/ui.js +5 -11
  8. data/cockpit/js/wfadaptor.js +20 -7
  9. data/cockpit/themes/{labels → compact}/theme.js +199 -48
  10. data/cockpit/themes/default/rngs/call.rng +26 -0
  11. data/cockpit/themes/default/rngs/callmanipulate.rng +29 -0
  12. data/cockpit/themes/default/rngs/manipulate.rng +3 -0
  13. data/cockpit/themes/default/symbols/alternative.svg +1 -1
  14. data/cockpit/themes/default/symbols/arrow.svg +3 -0
  15. data/cockpit/themes/default/symbols/call.svg +1 -1
  16. data/cockpit/themes/default/symbols/callcorrelationreceive.svg +1 -1
  17. data/cockpit/themes/default/symbols/callcorrelationsend.svg +2 -2
  18. data/cockpit/themes/default/symbols/callinstantiation.svg +1 -1
  19. data/cockpit/themes/default/symbols/callmanipulate.svg +1 -1
  20. data/cockpit/themes/default/symbols/callmanipulateworklist.svg +2 -2
  21. data/cockpit/themes/default/symbols/callworklist.svg +1 -1
  22. data/cockpit/themes/default/symbols/choose.svg +1 -1
  23. data/cockpit/themes/default/symbols/choose_exclusive.svg +1 -1
  24. data/cockpit/themes/default/symbols/choose_inclusive.svg +1 -1
  25. data/cockpit/themes/default/symbols/critical.svg +2 -2
  26. data/cockpit/themes/default/symbols/escape.svg +1 -1
  27. data/cockpit/themes/default/symbols/loop.svg +1 -1
  28. data/cockpit/themes/default/symbols/manipulate.svg +1 -1
  29. data/cockpit/themes/default/symbols/otherwise.svg +1 -1
  30. data/cockpit/themes/default/symbols/parallel.svg +1 -1
  31. data/cockpit/themes/default/symbols/parallel_branch.svg +1 -1
  32. data/cockpit/themes/default/symbols/scripts.svg +1 -1
  33. data/cockpit/themes/default/theme.js +198 -57
  34. data/cockpit/themes/lego/theme.js +459 -400
  35. data/cockpit/themes/promise/theme.js +459 -400
  36. data/cpee.gemspec +1 -1
  37. data/server/resources/transformation_dslx.xsl +98 -0
  38. metadata +5 -67
  39. data/cockpit/themes/adventure/rngs/alternative.rng +0 -5
  40. data/cockpit/themes/adventure/rngs/call.rng +0 -29
  41. data/cockpit/themes/adventure/rngs/callmanipulate.rng +0 -41
  42. data/cockpit/themes/adventure/rngs/choose.rng +0 -8
  43. data/cockpit/themes/adventure/rngs/critical.rng +0 -5
  44. data/cockpit/themes/adventure/rngs/escape.rng +0 -1
  45. data/cockpit/themes/adventure/rngs/finalize.rng +0 -6
  46. data/cockpit/themes/adventure/rngs/group.rng +0 -3
  47. data/cockpit/themes/adventure/rngs/loop.rng +0 -11
  48. data/cockpit/themes/adventure/rngs/manipulate.rng +0 -6
  49. data/cockpit/themes/adventure/rngs/otherwise.rng +0 -1
  50. data/cockpit/themes/adventure/rngs/parallel.rng +0 -5
  51. data/cockpit/themes/adventure/rngs/parallel_branch.rng +0 -8
  52. data/cockpit/themes/adventure/rngs/update.rng +0 -6
  53. data/cockpit/themes/adventure/symbols/alternative.svg +0 -4
  54. data/cockpit/themes/adventure/symbols/call.svg +0 -4
  55. data/cockpit/themes/adventure/symbols/callmanipulate.svg +0 -6
  56. data/cockpit/themes/adventure/symbols/choose.svg +0 -5
  57. data/cockpit/themes/adventure/symbols/choose_exclusive.svg +0 -5
  58. data/cockpit/themes/adventure/symbols/choose_inclusive.svg +0 -4
  59. data/cockpit/themes/adventure/symbols/critical.svg +0 -4
  60. data/cockpit/themes/adventure/symbols/escape.svg +0 -5
  61. data/cockpit/themes/adventure/symbols/loop.svg +0 -5
  62. data/cockpit/themes/adventure/symbols/manipulate.svg +0 -4
  63. data/cockpit/themes/adventure/symbols/otherwise.svg +0 -4
  64. data/cockpit/themes/adventure/symbols/parallel.svg +0 -5
  65. data/cockpit/themes/adventure/symbols/parallel_branch.svg +0 -4
  66. data/cockpit/themes/adventure/symbols/scripts.svg +0 -4
  67. data/cockpit/themes/adventure/symbols/start.svg +0 -3
  68. data/cockpit/themes/adventure/theme.js +0 -739
  69. data/cockpit/themes/labels/rngs/alternative.rng +0 -5
  70. data/cockpit/themes/labels/rngs/call.rng +0 -32
  71. data/cockpit/themes/labels/rngs/callmanipulate.rng +0 -47
  72. data/cockpit/themes/labels/rngs/choose.rng +0 -8
  73. data/cockpit/themes/labels/rngs/critical.rng +0 -5
  74. data/cockpit/themes/labels/rngs/escape.rng +0 -1
  75. data/cockpit/themes/labels/rngs/finalize.rng +0 -6
  76. data/cockpit/themes/labels/rngs/group.rng +0 -3
  77. data/cockpit/themes/labels/rngs/loop.rng +0 -11
  78. data/cockpit/themes/labels/rngs/manipulate.rng +0 -6
  79. data/cockpit/themes/labels/rngs/otherwise.rng +0 -1
  80. data/cockpit/themes/labels/rngs/parallel.rng +0 -5
  81. data/cockpit/themes/labels/rngs/parallel_branch.rng +0 -8
  82. data/cockpit/themes/labels/rngs/update.rng +0 -6
  83. data/cockpit/themes/labels/symbols/alternative.svg +0 -4
  84. data/cockpit/themes/labels/symbols/call.svg +0 -4
  85. data/cockpit/themes/labels/symbols/callcorrelationreceive.svg +0 -6
  86. data/cockpit/themes/labels/symbols/callcorrelationsend.svg +0 -6
  87. data/cockpit/themes/labels/symbols/callinstantiation.svg +0 -3
  88. data/cockpit/themes/labels/symbols/callmanipulate.svg +0 -6
  89. data/cockpit/themes/labels/symbols/callmanipulateworklist.svg +0 -6
  90. data/cockpit/themes/labels/symbols/callworklist.svg +0 -4
  91. data/cockpit/themes/labels/symbols/choose.svg +0 -5
  92. data/cockpit/themes/labels/symbols/choose_exclusive.svg +0 -5
  93. data/cockpit/themes/labels/symbols/choose_inclusive.svg +0 -4
  94. data/cockpit/themes/labels/symbols/critical.svg +0 -4
  95. data/cockpit/themes/labels/symbols/escape.svg +0 -5
  96. data/cockpit/themes/labels/symbols/loop.svg +0 -5
  97. data/cockpit/themes/labels/symbols/manipulate.svg +0 -4
  98. data/cockpit/themes/labels/symbols/otherwise.svg +0 -4
  99. data/cockpit/themes/labels/symbols/parallel.svg +0 -5
  100. data/cockpit/themes/labels/symbols/parallel_branch.svg +0 -4
  101. data/cockpit/themes/labels/symbols/scripts.svg +0 -4
  102. data/cockpit/themes/labels/symbols/start.svg +0 -3
@@ -1,4 +0,0 @@
1
- <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>
3
- <text transform="translate(15,21)" class="normal">s</text>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <circle cx="15" cy="15" r="9" class="standtrans"/>
3
- <line x1="9" y1="21" x2="21" y2="9" class="stand"/>
4
- </svg>
@@ -1,5 +0,0 @@
1
- <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>
3
- <text transform="translate(15,25)" class="normallarge">+</text>
4
- </svg>
5
-
@@ -1,4 +0,0 @@
1
- <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect transform="rotate(45,14,12)" x="7" y="3" width="21" height="21" class="stand"/>
3
- <text transform="translate(15,20)" class="small">|||</text>
4
- </svg>
@@ -1,4 +0,0 @@
1
- <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>
3
- <text transform="translate(15,21)" class="normal">s</text>
4
- </svg>
@@ -1,3 +0,0 @@
1
- <svg class="clickable" xmlns="http://www.w3.org/2000/svg">
2
- <circle cx="15" cy="15" r="14" class="stand"/>
3
- </svg>
@@ -1,739 +0,0 @@
1
- function WFAdaptorManifestation(adaptor) {
2
- var self = this;
3
-
4
- this.adaptor = adaptor;
5
- this.elements = {};
6
- this.events = {};
7
- this.compact = true;
8
-
9
- this.noarrow = ['alternative', 'otherwise'];
10
- this.source = function(rng) {
11
- $('#relaxngworker').empty();
12
- var rngw = new RelaxNGui(rng,$('#relaxngworker'),self.adaptor.description.context_eval);
13
- return $(rngw.save().documentElement);
14
- };
15
-
16
- // Events
17
- this.events.mousedown = function(svgid, e, child, sibling) { // {{{
18
- if(e.button == 0) { // left-click
19
- } else if(e.button == 1) { // middle-click
20
- } else if(e.button == 2) { // right-click
21
- var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
22
- var group = null;
23
- var menu = {};
24
-
25
- if (child) {
26
- group = self.elements[xml_node.get(0).tagName].permissible_children(xml_node);
27
- if(group.length > 0) menu['Insert into'] = group;
28
- }
29
- if (sibling) {
30
- group = self.elements[xml_node.parent().get(0).tagName].permissible_children(xml_node);
31
- if(group.length > 0) menu['Insert after'] = group;
32
- }
33
-
34
- if(xml_node.get(0).tagName != 'description' && !self.elements[xml_node.get(0).tagName].neverdelete) {
35
- var icon = self.elements[xml_node.get(0).tagName].illustrator.svg.clone();
36
- icon.children('.rfill').css({'fill':'#ff7f7f','fill-opacity':'1'});
37
- menu['Delete'] = [{
38
- 'label': 'Remove Element',
39
- 'function_call': self.adaptor.description.remove,
40
- 'menu_icon': icon,
41
- 'params': [null, xml_node]
42
- }];
43
- }
44
- if($('> finalize, > update', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
45
- var icon = self.elements.callmanipulate.illustrator.svg.clone();
46
- icon.children('.rfill:last').css({'fill':'#ff7f7f','fill-opacity':'1'});
47
- menu['Delete'].push({
48
- 'label': 'Remove Scripts',
49
- 'function_call': self.adaptor.description.remove,
50
- 'menu_icon': icon,
51
- 'params': ['> finalize, > update', xml_node]
52
- });
53
- }
54
- new CustomMenu(e).contextmenu(menu);
55
- }
56
- return false;
57
- } // }}}
58
- this.events.click = function(svgid) { // {{{
59
- var visid = 'details';
60
- var tab = $('#dat_' + visid);
61
- tab.empty();
62
-
63
- if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) {
64
- return;
65
- }
66
- self.adaptor.illustrator.get_nodes().removeClass('clicked');
67
-
68
- var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
69
- if (vtarget.length > 0) {
70
- vtarget.addClass('clicked');
71
- }
72
-
73
- if ($('#state').text() != 'finished')
74
- $('#main ui-behind button').show();
75
- if ($('#main ui-behind button').hasClass('highlight')) {
76
- var check = confirm("Discard changes?");
77
- if (check)
78
- $('#main ui-behind button').removeClass('highlight');
79
- else
80
- return;
81
- }
82
-
83
- var node = self.adaptor.description.get_node_by_svg_id(svgid).get(0);
84
-
85
- if (self.adaptor.description.elements[$(node).attr('svg-type')]) {
86
- save[visid + '_target'] = { 'svgid': svgid, 'model': self.adaptor.description };
87
- save[visid] = new RelaxNGui(self.adaptor.description.elements[$(node).attr('svg-type')],tab,self.adaptor.description.context_eval);
88
- save[visid].content(node);
89
- }
90
- } // }}}
91
- this.events.dblclick = function(svgid, e) { // {{{
92
- } // }}}
93
- this.events.mouseover = function(svgid, e) { // {{{
94
- $('.tile[element-id = "' + svgid + '"]').css('display','block');
95
- return false;
96
- } // }}}
97
- this.events.mouseout = function(svgid, e) { // {{{
98
- $('.tile[element-id = "' + svgid + '"]').css('display','none');
99
- return false;
100
- } // }}}
101
- this.events.dragstart = function (svgid, e) { //{{{
102
- } //}}}
103
-
104
- // Primitive Elements
105
- this.elements.call = { /*{{{*/
106
- 'type' : 'primitive',
107
- 'illustrator': {//{{{
108
- 'endnodes' : 'this',
109
- 'resolve_symbol' : function(node) {
110
- if($(node).attr('endpoint') == 'instantiation') {
111
- return 'callinstantiation';
112
- } else if($(node).attr('endpoint') == 'correlation') {
113
- return 'callcorrelation';
114
- } else if($('parameters > service', node).length > 0) {
115
- return 'callinjection';
116
- } else if($('finalize,update', node).length > 0) {
117
- return 'callmanipulate';
118
- } else {
119
- return'call';
120
- }
121
- },
122
- 'svg': self.adaptor.theme_dir + 'symbols/call.svg'
123
- },//}}}
124
- 'description': self.adaptor.theme_dir + 'rngs/call.rng',
125
- 'permissible_children': function(node) { //{{{
126
- if(node.children('finalize,update').length < 1)
127
- return [
128
- {'label': 'Scripts',
129
- 'function_call': self.adaptor.description.insert_last_into,
130
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
131
- 'params': [self.adaptor.description.elements.scripts, node]}
132
- ];
133
- return [];
134
- }, //}}}
135
- 'adaptor' : {//{{{
136
- 'mousedown': function (node,e) { self.events.mousedown(node,e,true,true); },
137
- 'click': self.events.click,
138
- 'dragstart': self.events.dragstart,
139
- }//}}}
140
- }; /*}}}*/
141
- this.elements.manipulate = { /*{{{*/
142
- 'type' : 'primitive',
143
- 'illustrator': {//{{{
144
- 'endnodes' : 'this',
145
- 'svg': self.adaptor.theme_dir + 'symbols/manipulate.svg'
146
- },//}}}
147
- 'description': self.adaptor.theme_dir + 'rngs/manipulate.rng',
148
- 'permissible_children': function(node) { //{{{
149
- return [];
150
- }, //}}}
151
- 'adaptor' : {//{{{
152
- 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
153
- 'click': self.events.click,
154
- }//}}}
155
- }; /*}}}*/
156
- this.elements.escape = { /*{{{*/
157
- 'type' : 'primitive',
158
- 'illustrator': {//{{{
159
- 'endnodes' : 'this',
160
- 'svg': self.adaptor.theme_dir + 'symbols/escape.svg'
161
- },//}}}
162
- 'description': self.adaptor.theme_dir + 'rngs/escape.rng',
163
- 'permissible_children': function(node) { //{{{
164
- return [];
165
- }, //}}}
166
- 'adaptor' : {//{{{
167
- 'mousedown': function (node,e) { self.events.mousedown(node,e,false,true); },
168
- 'click': self.events.click,
169
- }//}}}
170
- }; /*}}}*/
171
-
172
- // Complex Elements
173
- this.elements.choose = { /*{{{*/
174
- 'type' : 'complex',
175
- 'illustrator': {//{{{
176
- 'endnodes' : 'aggregate',
177
- 'closeblock': false,
178
- 'expansion' : function(node) {
179
- return 'horizontal';
180
- },
181
- 'resolve_symbol' : function(node) {
182
- if($(node).attr('mode') == 'exclusive') {
183
- return 'choose_exclusive';
184
- } else {
185
- return 'choose_inclusive';
186
- }
187
- },
188
- 'col_shift' : function(node) {
189
- return false;
190
- },
191
- 'svg': self.adaptor.theme_dir + 'symbols/choose.svg'
192
- },//}}}
193
- 'description': self.adaptor.theme_dir + 'rngs/choose.rng',
194
- 'permissible_children': function(node) { //{{{
195
- var func = null;
196
- if(node.get(0).tagName == 'choose') { func = self.adaptor.description.insert_first_into }
197
- else { func = self.adaptor.description.insert_after }
198
- if(node.children('parallel_branch').length > 0) {
199
- return [{'label': 'Parallel Branch',
200
- 'function_call': func,
201
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
202
- 'params': [self.adaptor.description.elements.parallel_branch, node]}];
203
- }
204
- var childs = [{'label': 'Alternative',
205
- 'function_call': func,
206
- 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
207
- 'params': [self.adaptor.description.elements.alternative, node]}];
208
- if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
209
- childs.push({'label': 'Otherwise',
210
- 'function_call': func,
211
- 'menu_icon': self.elements.otherwise.illustrator.svg.clone(),
212
- 'params': [self.adaptor.description.elements.otherwise, node]});
213
- if(node.parents('parallel').length > node.parents('parallel_branch').length)
214
- childs.push({'label': 'Parallel Branch',
215
- 'function_call': func,
216
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
217
- 'params': [self.adaptor.description.elements.parallel_branch, node]});
218
- return childs;
219
- }, //}}}
220
- 'adaptor' : {//{{{
221
- 'mousedown': function (node,e) {
222
- self.events.mousedown(node,e,true,true);
223
- },
224
- 'click': self.events.click,
225
- 'dblclick': self.events.dblclick,
226
- 'mouseover': self.events.mouseover,
227
- 'mouseout': self.events.mouseout,
228
- }//}}}
229
- }; /*}}}*/
230
- this.elements.otherwise = { /*{{{*/
231
- 'type' : 'complex',
232
- 'illustrator': {//{{{
233
- 'endnodes' : 'passthrough',
234
- 'closeblock': false,
235
- 'expansion' : function(node) {
236
- return 'vertical';
237
- },
238
- 'col_shift' : function(node) {
239
- return false;
240
- },
241
- 'svg': self.adaptor.theme_dir + 'symbols/otherwise.svg'
242
- },//}}}
243
- 'description': self.adaptor.theme_dir + 'rngs/otherwise.rng',
244
- 'neverdelete': true,
245
- 'permissible_children': function(node) { //{{{
246
- var func = null;
247
- var childs = null;
248
- if(node.get(0).tagName == 'otherwise') { func = self.adaptor.description.insert_first_into }
249
- else { func = self.adaptor.description.insert_after }
250
- return [
251
- {'label': 'Service Call with Scripts',
252
- 'function_call': func,
253
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
254
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
255
- {'label': 'Service Call',
256
- 'function_call': func,
257
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
258
- 'params': [self.adaptor.description.elements.call, node]},
259
- {'label': 'Script',
260
- 'function_call': func,
261
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
262
- 'params': [self.adaptor.description.elements.manipulate, node]},
263
- {'label': 'Parallel',
264
- 'function_call': func,
265
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
266
- 'params': [self.adaptor.description.elements.parallel, node]},
267
- {'label': 'Decision',
268
- 'function_call': func,
269
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
270
- 'params': [self.adaptor.description.elements.choose, node]},
271
- {'label': 'Loop',
272
- 'function_call': func,
273
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
274
- 'params': [self.adaptor.description.elements.loop, node]},
275
- {'label': 'Critical',
276
- 'function_call': func,
277
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
278
- 'params': [self.adaptor.description.elements.critical, node]}
279
- ];
280
- }, //}}}
281
- 'adaptor' : {//{{{
282
- 'mousedown': function (node,e) {
283
- self.events.mousedown(node,e,true,false);
284
- },
285
- 'click': self.events.click,
286
- 'dblclick': self.events.dblclick,
287
- 'mouseover': self.events.mouseover,
288
- 'mouseout': self.events.mouseout,
289
- }//}}}
290
- }; /*}}}*/
291
- this.elements.alternative = { /*{{{*/
292
- 'type' : 'complex',
293
- 'illustrator': {//{{{
294
- 'endnodes' : 'passthrough',
295
- 'closeblock':false,
296
- 'expansion' : function(node) {
297
- return 'vertical';
298
- },
299
- 'col_shift' : function(node) {
300
- return false;
301
- },
302
- 'svg': self.adaptor.theme_dir + 'symbols/alternative.svg'
303
- },//}}}
304
- 'description': self.adaptor.theme_dir + 'rngs/alternative.rng',
305
- 'permissible_children': function(node) { //{{{
306
- if(node.get(0).tagName == 'alternative') { func = self.adaptor.description.insert_first_into }
307
- else { func = self.adaptor.description.insert_after }
308
- if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
309
- return [{'label': 'Parallel Branch',
310
- 'function_call': func,
311
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
312
- 'params': [self.adaptor.description.elements.parallel_branch, node]}];
313
- }
314
- return [
315
- {'label': 'Service Call with Scripts',
316
- 'function_call': func,
317
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
318
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
319
- {'label': 'Service Call',
320
- 'function_call': func,
321
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
322
- 'params': [self.adaptor.description.elements.call, node]},
323
- {'label': 'Script',
324
- 'function_call': func,
325
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
326
- 'params': [self.adaptor.description.elements.manipulate, node]},
327
- {'label': 'Parallel',
328
- 'function_call': func,
329
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
330
- 'params': [self.adaptor.description.elements.parallel, node]},
331
- {'label': 'Decision',
332
- 'function_call': func,
333
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
334
- 'params': [self.adaptor.description.elements.choose, node]},
335
- {'label': 'Loop',
336
- 'function_call': func,
337
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
338
- 'params': [self.adaptor.description.elements.loop, node]},
339
- {'label': 'Critical',
340
- 'function_call': func,
341
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
342
- 'params': [self.adaptor.description.elements.critical, node]}
343
- ];
344
- }, //}}}
345
- 'adaptor' : {//{{{
346
- 'mousedown': function (node,e) {
347
- self.events.mousedown(node,e,true,false);
348
- },
349
- 'click': self.events.click,
350
- 'dblclick': self.events.dblclick,
351
- 'mouseover': self.events.mouseover,
352
- 'mouseout': self.events.mouseout,
353
- }//}}}
354
- }; /*}}}*/
355
- this.elements.loop = { /*{{{*/
356
- 'type' : 'complex',
357
- 'illustrator': {//{{{
358
- 'endnodes' : 'this',
359
- 'closeblock' : true,
360
- 'expansion' : function(node) {
361
- return 'vertical';
362
- },
363
- 'col_shift' : function(node) {
364
- return true;
365
- },
366
- 'svg': self.adaptor.theme_dir + 'symbols/loop.svg'
367
- },// }}}
368
- 'description': self.adaptor.theme_dir + 'rngs/loop.rng',
369
- 'permissible_children': function(node) { //{{{
370
- var func = null;
371
- if(node.get(0).tagName == 'loop') { func = self.adaptor.description.insert_first_into }
372
- else { func = self.adaptor.description.insert_after }
373
- var childs = [
374
- {'label': 'Service Call with Scripts',
375
- 'function_call': func,
376
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
377
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
378
- {'label': 'Service Call',
379
- 'function_call': func,
380
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
381
- 'params': [self.adaptor.description.elements.call, node]},
382
- {'label': 'Manipulate',
383
- 'function_call': func,
384
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
385
- 'params': [self.adaptor.description.elements.manipulate, node]},
386
- {'label': 'Decision',
387
- 'function_call': func,
388
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
389
- 'params': [self.adaptor.description.elements.choose, node]},
390
- {'label': 'Loop',
391
- 'function_call': func,
392
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
393
- 'params': [self.adaptor.description.elements.loop, node]},
394
- {'label': 'Critical',
395
- 'function_call': func,
396
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
397
- 'params': [self.adaptor.description.elements.critical, node]}
398
- ];
399
- if(node.parent('parallel').length > node.parent('parallel_branch').length) {
400
- childs.push({'label': 'Parallel Branch',
401
- 'function_call': func,
402
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
403
- 'params': [self.adaptor.description.elements.parallel_branch, node]}
404
- );
405
- } else {
406
- childs.push({'label': 'Parallel',
407
- 'function_call': func,
408
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
409
- 'params': [self.adaptor.description.elements.parallel, node]}
410
- );
411
- }
412
- return childs;
413
- }, //}}}
414
- 'adaptor' : {//{{{
415
- 'mousedown': function (node,e) {
416
- self.events.mousedown(node,e,true,true);
417
- },
418
- 'click': self.events.click,
419
- 'dblclick': self.events.dblclick,
420
- 'mouseover': self.events.mouseover,
421
- 'mouseout': self.events.mouseout,
422
- }//}}}
423
- }; /*}}}*/
424
- this.elements.parallel = { /*{{{*/
425
- 'type' : 'complex',
426
- 'illustrator': {//{{{
427
- 'endnodes' : 'this',
428
- 'closeblock' : false,
429
- 'border': true,
430
- 'expansion' : function(node) {
431
- // check if any sibling other than 'parallel_branch' is present
432
- if($(node).children(':not(parallel_branch)').length > 0) return 'vertical';
433
- return 'horizontal';
434
- },
435
- 'col_shift' : function(node) {
436
- return true;
437
- },
438
- 'svg': self.adaptor.theme_dir + 'symbols/parallel.svg'
439
- },//}}}
440
- 'description': self.adaptor.theme_dir + 'rngs/parallel.rng',
441
- 'permissible_children': function(node) { //{{{
442
- var childs = [
443
- {'label': 'Service Call with Scripts',
444
- 'function_call': self.adaptor.description.insert_last_into,
445
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
446
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
447
- {'label': 'Service Call',
448
- 'function_call': self.adaptor.description.insert_last_into,
449
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
450
- 'params': [self.adaptor.description.elements.call, node]},
451
- {'label': 'Manipulate',
452
- 'function_call': self.adaptor.description.insert_last_into,
453
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
454
- 'params': [self.adaptor.description.elements.manipulate, node]},
455
- {'label': 'Decision',
456
- 'function_call': self.adaptor.description.insert_last_into,
457
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
458
- 'params': [self.adaptor.description.elements.choose, node]},
459
- {'label': 'Loop',
460
- 'function_call': self.adaptor.description.insert_last_into,
461
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
462
- 'params': [self.adaptor.description.elements.loop, node]},
463
- {'label': 'Critical',
464
- 'function_call': self.adaptor.description.insert_last_into,
465
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
466
- 'params': [self.adaptor.description.elements.critical, node]},
467
- {'label': 'Parallel Branch',
468
- 'function_call': self.adaptor.description.insert_last_into,
469
- 'menu_icon': self.elements.parallel_branch.illustrator.svg.clone(),
470
- 'params': [self.adaptor.description.elements.parallel_branch, node]}
471
- ];
472
- if(node.get(0).tagName != 'parallel')
473
- childs.push({'label': 'Parallel',
474
- 'function_call': self.adaptor.description.insert_last_into,
475
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
476
- 'params': [self.adaptor.description.elements.parallel, node]});
477
- return childs;
478
- }, //}}}
479
- 'adaptor' : {//{{{
480
- 'mousedown': function (node,e) {
481
- self.events.mousedown(node,e,true,true);
482
- },
483
- 'click': self.events.click,
484
- 'dblclick': self.events.dblclick,
485
- 'mouseover': self.events.mouseover,
486
- 'mouseout': self.events.mouseout,
487
- }//}}}
488
- }; /*}}}*/
489
- this.elements.parallel_branch = { /*{{{*/
490
- 'type' : 'complex',
491
- 'illustrator': {//{{{
492
- 'endnodes' : 'this',
493
- 'closeblock' : false,
494
- 'expansion' : function(node) {
495
- return 'vertical';
496
- },
497
- 'col_shift' : function(node) {
498
- if(node.parentNode.tagName == 'choose') return false;
499
- if($(node).parents('parallel').first().children(':not(parallel_branch)').length > 0) return true;
500
- return false;
501
- },
502
- 'svg': self.adaptor.theme_dir + 'symbols/parallel_branch.svg'
503
- },//}}}
504
- 'description': self.adaptor.theme_dir + 'rngs/parallel_branch.rng',
505
- 'permissible_children': function(node) { //{{{
506
- var func = null;
507
- var childs = null;
508
- if(node.get(0).tagName == 'parallel_branch') { func = self.adaptor.description.insert_first_into }
509
- else { func = self.adaptor.description.insert_after }
510
- childs = [
511
- {'label': 'Service Call with Scripts',
512
- 'function_call': func,
513
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
514
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
515
- {'label': 'Service Call',
516
- 'function_call': func,
517
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
518
- 'params': [self.adaptor.description.elements.call, node]},
519
- {'label': 'Script',
520
- 'function_call': func,
521
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
522
- 'params': [self.adaptor.description.elements.manipulate, node]},
523
- {'label': 'Parallel',
524
- 'function_call': func,
525
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
526
- 'params': [self.adaptor.description.elements.parallel, node]},
527
- {'label': 'Decision',
528
- 'function_call': func,
529
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
530
- 'params': [self.adaptor.description.elements.choose, node]},
531
- {'label': 'Loop',
532
- 'function_call': func,
533
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
534
- 'params': [self.adaptor.description.elements.loop, node]},
535
- {'label': 'Critical',
536
- 'function_call': func,
537
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
538
- 'params': [self.adaptor.description.elements.critical, node]},
539
- ];
540
- if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
541
- return [{'label': 'Alternative',
542
- 'function_call': func,
543
- 'menu_icon': self.elements.alternative.illustrator.svg.clone(),
544
- 'params': [self.adaptor.description.elements.alternative, node]}];
545
- }
546
- return childs;
547
- }, //}}}
548
- 'adaptor' : {//{{{
549
- 'mousedown': function (node,e) {
550
- self.events.mousedown(node,e,true,false);
551
- },
552
- 'click': self.events.click,
553
- 'dblclick': self.events.dblclick,
554
- 'mouseover': self.events.mouseover,
555
- 'mouseout': self.events.mouseout,
556
- }//}}}
557
- }; /*}}}*/
558
- this.elements.critical = { /*{{{*/
559
- 'type' : 'complex',
560
- 'illustrator': {//{{{
561
- 'endnodes' : 'aggregate',
562
- 'closeblock' : false,
563
- 'border': true,
564
- 'expansion' : function(node) {
565
- return 'vertical';
566
- },
567
- 'col_shift' : function(node) {
568
- return true;
569
- },
570
- 'svg': self.adaptor.theme_dir + 'symbols/critical.svg'
571
- },//}}}
572
- 'description': self.adaptor.theme_dir + 'rngs/critical.rng',
573
- 'permissible_children': function(node) { //{{{
574
- var func = null;
575
- if(node.get(0).tagName == 'critical') { func = self.adaptor.description.insert_first_into }
576
- else { func = self.adaptor.description.insert_after }
577
- return [
578
- {'label': 'Service Call with Scripts',
579
- 'function_call': func,
580
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
581
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
582
- {'label': 'Service Call',
583
- 'function_call': func,
584
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
585
- 'params': [self.adaptor.description.elements.call, node]},
586
- {'label': 'Script',
587
- 'function_call': func,
588
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
589
- 'params': [self.adaptor.description.elements.manipulate, node]},
590
- {'label': 'Parallel',
591
- 'function_call': func,
592
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
593
- 'params': [self.adaptor.description.elements.parallel, node]},
594
- {'label': 'Decision',
595
- 'function_call': func,
596
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
597
- 'params': [self.adaptor.description.elements.choose, node]},
598
- {'label': 'Loop',
599
- 'function_call': func,
600
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
601
- 'params': [self.adaptor.description.elements.loop, node]},
602
- {'label': 'Critical',
603
- 'function_call': func,
604
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
605
- 'params': [self.adaptor.description.elements.critical, node]},
606
- ];
607
- }, //}}}
608
- 'adaptor' : {//{{{
609
- 'mousedown': function (node,e) {
610
- self.events.mousedown(node,e,true,true);
611
- },
612
- 'click': self.events.click,
613
- 'dblclick': self.events.dblclick,
614
- 'mouseover': self.events.mouseover,
615
- 'mouseout': self.events.mouseout,
616
- }//}}}
617
- }; /*}}}*/
618
- this.elements.group = { /*{{{*/
619
- 'type' : 'complex',
620
- 'illustrator': {//{{{
621
- 'endnodes' : 'aggregate',
622
- 'closeblock' : false,
623
- 'border': 'injectiongroup', // other value than true,false inidcates the used class for the svg-object
624
- 'expansion' : function(node) {
625
- return 'vertical';
626
- },
627
- 'col_shift' : function(node) {
628
- return true;
629
- },
630
- 'svg': null
631
- },//}}}
632
- 'description': self.adaptor.theme_dir + 'rngs/group.rng',
633
- 'permissible_children': function(node) { //{{{
634
- var func = null;
635
- if(node.get(0).tagName == 'group') { func = self.adaptor.description.insert_first_into }
636
- else { func = self.adaptor.description.insert_after }
637
- return [
638
- ];
639
- }, //}}}
640
- 'adaptor' : {//{{{
641
- 'mousedown': function (node,e) {
642
- self.events.mousedown(node,e,true,true);
643
- },
644
- 'click': self.events.click,
645
- 'dblclick': self.events.dblclick,
646
- 'mouseover': self.events.mouseover,
647
- 'mouseout': self.events.mouseout,
648
- }//}}}
649
- }; /*}}}*/
650
- this.elements.start = this.elements.description = { /*{{{*/
651
- 'type' : 'description',
652
- 'illustrator': {//{{{
653
- 'endnodes' : 'passthrough',
654
- 'closeblock' : false,
655
- 'expansion' : function(node) {
656
- return 'vertical';
657
- },
658
- 'col_shift' : function(node) {
659
- return true;
660
- },
661
- 'svg': self.adaptor.theme_dir + 'symbols/start.svg'
662
- },//}}}
663
- 'description': null,
664
- 'permissible_children': function(node) { //{{{
665
- var func = null;
666
- if(node.get(0).tagName == 'description') { func = self.adaptor.description.insert_first_into }
667
- else { func = self.adaptor.description.insert_after }
668
- return [
669
- {'label': 'Service Call with Scripts',
670
- 'function_call': func,
671
- 'menu_icon': self.elements.callmanipulate.illustrator.svg.clone(),
672
- 'params': [self.adaptor.description.elements.callmanipulate, node]},
673
- {'label': 'Service Call',
674
- 'function_call': func,
675
- 'menu_icon': self.elements.call.illustrator.svg.clone(),
676
- 'params': [self.adaptor.description.elements.call, node]},
677
- {'label': 'Script Task',
678
- 'function_call': func,
679
- 'menu_icon': self.elements.manipulate.illustrator.svg.clone(),
680
- 'params': [self.adaptor.description.elements.manipulate, node]},
681
- {'label': 'Parallel',
682
- 'function_call': func,
683
- 'menu_icon': self.elements.parallel.illustrator.svg.clone(),
684
- 'params': [self.adaptor.description.elements.parallel, node]},
685
- {'label': 'Decision',
686
- 'function_call': func,
687
- 'menu_icon': self.elements.choose.illustrator.svg.clone(),
688
- 'params': [self.adaptor.description.elements.choose, node]},
689
- {'label': 'Loop',
690
- 'function_call': func,
691
- 'menu_icon': self.elements.loop.illustrator.svg.clone(),
692
- 'params': [self.adaptor.description.elements.loop, node]},
693
- {'label': 'Critical',
694
- 'function_call': func,
695
- 'menu_icon': self.elements.critical.illustrator.svg.clone(),
696
- 'params': [self.adaptor.description.elements.critical, node]}
697
- ];
698
- }, //}}}
699
- 'adaptor' : {//{{{
700
- 'mousedown': function (node,e) {
701
- self.events.mousedown(node,e,true,false);
702
- },
703
- 'click': self.events.click,
704
- 'dblclick': self.events.dblclick,
705
- 'mouseover': self.events.mouseover,
706
- 'mouseout': self.events.mouseout,
707
- }//}}}
708
- }; /*}}}*/
709
-
710
- // Abstract Elements
711
- // * they may only have an illustrator (or other parts)
712
- // * they HAVE TO have a parent
713
- this.elements.callmanipulate = { /*{{{*/
714
- 'type' : 'abstract',
715
- 'parent': 'call',
716
- 'description': self.adaptor.theme_dir + 'rngs/callmanipulate.rng',
717
- 'illustrator': {//{{{
718
- 'svg': self.adaptor.theme_dir + 'symbols/callmanipulate.svg'
719
- },//}}}
720
- }; /*}}}*/
721
- this.elements.choose_inclusive = { /*{{{*/
722
- 'type' : 'abstract',
723
- 'parent': 'choose',
724
- 'illustrator': {//{{{
725
- 'svg': self.adaptor.theme_dir + 'symbols/choose_inclusive.svg'
726
- },//}}}
727
- }; /*}}}*/
728
- this.elements.choose_exclusive = { /*{{{*/
729
- 'type' : 'abstract',
730
- 'parent': 'choose',
731
- 'illustrator': {//{{{
732
- 'svg': self.adaptor.theme_dir + 'symbols/choose_exclusive.svg'
733
- },//}}}
734
- }; /*}}}*/
735
- this.elements.scripts = { /*{{{*/
736
- 'type' : 'abstract',
737
- 'description': [self.adaptor.theme_dir + 'rngs/update.rng',self.adaptor.theme_dir + 'rngs/finalize.rng']
738
- }; /*}}}*/
739
- }