cpee 1.3.176 → 1.3.177

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/ui.css +26 -65
  3. data/cockpit/index.html +60 -77
  4. data/cockpit/js/details.js +8 -3
  5. data/cockpit/js/instance.js +24 -23
  6. data/cockpit/js/ui.js +1 -18
  7. data/cockpit/js/wfadaptor.cpee.js +452 -598
  8. data/cockpit/lib/ui.css +120 -124
  9. data/cockpit/lib/ui.js +84 -34
  10. data/cockpit/lib/wfadaptor.css +5 -5
  11. data/cockpit/lib/wfadaptor.js +5 -11
  12. data/cockpit/testsets/Worklist Parallel.xml +97 -0
  13. data/cockpit/testsets/Worklist Test CPEE.xml +39 -0
  14. data/cpee.gemspec +5 -5
  15. data/lib/cpee/controller.rb +1 -1
  16. data/lib/cpee/processtransformation/cpee.rb +2 -3
  17. data/server/instances/38/properties.xml +46 -0
  18. data/server/instances/39/properties.xml +58 -0
  19. data/server/instances/40/properties.xml +148 -0
  20. data/server/instances/41/properties.xml +46 -0
  21. data/server/instances/42/properties.xml +148 -0
  22. data/server/instances/43/notifications/9e7d05164a8539415d008b5bca3e0672/consumer-secret +1 -0
  23. data/server/instances/43/notifications/9e7d05164a8539415d008b5bca3e0672/producer-secret +1 -0
  24. data/server/instances/{37/notifications/2b67c793efcea22d88beaa28249001be → 43/notifications/9e7d05164a8539415d008b5bca3e0672}/subscription.xml +0 -0
  25. data/server/instances/43/properties.xml +148 -0
  26. data/server/instances/44/properties.xml +148 -0
  27. data/server/instances/45/notifications/442ed76f5da42dc9c57713840d713510/consumer-secret +1 -0
  28. data/server/instances/45/notifications/442ed76f5da42dc9c57713840d713510/producer-secret +1 -0
  29. data/server/instances/45/notifications/442ed76f5da42dc9c57713840d713510/subscription.xml +34 -0
  30. data/server/instances/45/properties.xml +148 -0
  31. data/server/instances/46/properties.xml +46 -0
  32. data/server/instances/47/notifications/63fba892899cc92fca381a666089e8d9/consumer-secret +1 -0
  33. data/server/instances/47/notifications/63fba892899cc92fca381a666089e8d9/producer-secret +1 -0
  34. data/server/instances/47/notifications/63fba892899cc92fca381a666089e8d9/subscription.xml +34 -0
  35. data/server/instances/47/notifications/e0cdacd3147aa31b0478a3ab1155db6c/consumer-secret +1 -0
  36. data/server/instances/47/notifications/e0cdacd3147aa31b0478a3ab1155db6c/producer-secret +1 -0
  37. data/server/instances/47/notifications/e0cdacd3147aa31b0478a3ab1155db6c/subscription.xml +34 -0
  38. data/server/instances/47/properties.xml +148 -0
  39. data/server/resources/transformation_dslx.xsl +4 -4
  40. data/server/server.pid +1 -0
  41. data/test/cb.rb +3 -3
  42. metadata +39 -20
  43. data/cockpit/lib/jquery-ui.custom.min.js +0 -8
  44. data/cockpit/lib/jquery-ui.custom.min.txt +0 -16
  45. data/cockpit/lib/jquery.redraw.js +0 -3
  46. data/server/instances/37/notifications/2b67c793efcea22d88beaa28249001be/consumer-secret +0 -1
  47. data/server/instances/37/notifications/2b67c793efcea22d88beaa28249001be/producer-secret +0 -1
@@ -1,8 +1,4 @@
1
1
  $(document).ready(function() {
2
- if (!($.browser.name == "Firefox" && $.browser.version >= 20) && !($.browser.name == "Chrome" && $.browser.version >= 30)) {
3
- $('body').children().remove();
4
- $('body').append('Sorry, only Firefox >= 20.0 and Chrom(e|ium) >= 17 for now.');
5
- }
6
2
  if (!($.cookie('cpee_iagree'))) {
7
3
  var skip = false;
8
4
 
@@ -29,20 +25,7 @@ $(document).ready(function() {
29
25
  }
30
26
 
31
27
  // Resize areas
32
- $('#detailcolumn').resizable({
33
- handles: { 'w' : '#handle2'},
34
- resize: function(event, ui) {
35
- if ($.browser.name == "Chrome") {
36
- $('#handle2').offset({ left: ui.helper.offset().left+3 });
37
- }
38
- }
39
- });
40
- $('#parameters .tabbelow').resizable({
41
- handles: { 's' : '#handle1'},
42
- resize: function(event, ui) {
43
- $('#parameters .tabbelow').css('width','');
44
- }
45
- });
28
+ $('#parameters .tabbelow').resizable();
46
29
  });
47
30
 
48
31
  // flexible parameter input
@@ -81,15 +81,15 @@ function CPEE(adaptor) {
81
81
  var menu = {};
82
82
 
83
83
  if(child) {
84
- group = elements[xml_node.get(0).tagName].description.permissible_children(xml_node);
84
+ group = elements[xml_node.get(0).tagName].permissible_children(xml_node);
85
85
  if(group.length > 0) menu['Insert into'] = group;
86
86
  }
87
87
  if(sibling) {
88
- group = elements[xml_node.parent().get(0).tagName].description.permissible_children(xml_node);
88
+ group = elements[xml_node.parent().get(0).tagName].permissible_children(xml_node);
89
89
  if(group.length > 0) menu['Insert after'] = group;
90
90
  }
91
91
 
92
- if(xml_node.get(0).tagName != 'description' && !elements[xml_node.get(0).tagName].description.deleteable)
92
+ if(xml_node.get(0).tagName != 'description' && !elements[xml_node.get(0).tagName].neverdelete)
93
93
  menu['Remove Element'] = [{'label': 'Actual Element',
94
94
  'function_call': adaptor.description.remove,
95
95
  'menu_icon': function() {
@@ -99,7 +99,7 @@ function CPEE(adaptor) {
99
99
  },
100
100
  'params': [null, xml_node]}];
101
101
  if($('> manipulate', xml_node).length > 0 && xml_node.get(0).tagName == 'call') {
102
- menu['Remove Element'].push({'label': 'Remove Script Block',
102
+ menu['Remove Element'].push({'label': 'Remove Scripts',
103
103
  'function_call': adaptor.description.remove,
104
104
  'menu_icon': function() {
105
105
  var icon = elements.callmanipulate.illustrator.svg();
@@ -138,8 +138,10 @@ function CPEE(adaptor) {
138
138
  tab.append(create_readonly_property('ID',$(node).attr('id')));
139
139
  tab.append(create_input_property('Endpoint','',$(node).attr('endpoint')));
140
140
 
141
- if ($('manipulate',node).length > 0)
142
- tab.append(create_area_property('Script','',format_text_skim($('manipulate',node).text())));
141
+ if ($('finalize',node).length > 0)
142
+ tab.append(create_area_property('Finalize','',format_text_skim($('finalize',node).text())));
143
+ if ($('update',node).length > 0)
144
+ tab.append(create_area_property('Update','',format_text_skim($('update',node).text())));
143
145
 
144
146
  tab.append(create_header('Parameters:'));
145
147
 
@@ -202,114 +204,6 @@ function CPEE(adaptor) {
202
204
  } //}}}
203
205
 
204
206
  // Abstract Elements (they only have an illustrator)
205
- this.elements.callinjection = { /*{{{*/
206
- 'illustrator': {//{{{
207
- 'type' : 'abstract',
208
- 'svg': function() {
209
- return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
210
- '<circle cx="15" cy="15" r="14" class="rfill stand"/>' +
211
- '<text transform="translate(15,21)" class="normal">c</text>' +
212
- '<circle cx="28" cy="27" r="9" class="rfill stand"/>' +
213
- '<text transform="translate(28,31)" class="small">i</text>' +
214
- '</svg>');
215
- }
216
- },//}}}
217
- 'description' : {//{{{
218
- 'create': function(target) {
219
- var node = null;
220
- node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><manipulate output="result"/></call>');
221
- return node;
222
- },
223
- 'permissible_children': function(node) {
224
- if(node.children('manipulate').lenght < 1)
225
- return [
226
- {'label': 'Script Block',
227
- 'function_call': adaptor.description.insert_last_into,
228
- 'menu_icon': elements.callmanipulate.illustrator.svg,
229
- 'params': [adaptor.description.elements.manipulate.create, node]}
230
- ];
231
- return [];
232
- }
233
- },//}}}
234
- 'adaptor' : {//{{{
235
- 'mousedown': function (node, e) {
236
- events.mousedown(node,e,true, true);
237
- },
238
- 'click': events.click,
239
- }//}}}
240
- }; /*}}}*/
241
- this.elements.callcorrelation = { /*{{{*/
242
- 'illustrator': {//{{{
243
- 'type' : 'abstract',
244
- 'svg': function() {
245
- return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
246
- '<rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>' +
247
- '<path transform="scale(0.7) translate(12, 2)" class="stand" style="fill:#000000;" d="m 19.511059,31.248618 0,-23.6413153 -3.940219,0 0,15.7608793 -7.8804404,-7.88044 0,7.88044 -7.88043943,-7.88044 0,15.760876 z"/>' +
248
- '<circle cx="28" cy="27" r="9" class="rfill stand"/>' +
249
- '<text transform="translate(28,31)" class="small">c</text>' +
250
- '</svg>');
251
- }
252
- },//}}}
253
- 'description' : {//{{{
254
- 'create': function(target) {
255
- var node = null;
256
- node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="correlation" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><manipulate output="result"/></call>');
257
- return node;
258
- },
259
- 'permissible_children': function(node) {
260
- if(node.children('manipulate').lenght < 1)
261
- return [
262
- {'label': 'Script Block',
263
- 'function_call': adaptor.description.insert_last_into,
264
- 'menu_icon': elements.callmanipulate.illustrator.svg,
265
- 'params': [adaptor.description.elements.manipulate.create, node]}
266
- ];
267
- return [];
268
- }
269
- },//}}}
270
- 'adaptor' : {//{{{
271
- 'mousedown': function (node, e) {
272
- events.mousedown(node,e,true, true);
273
- },
274
- 'click': events.click,
275
- }//}}}
276
- }; /*}}}*/
277
- this.elements.callinstantiation = { /*{{{*/
278
- 'illustrator': {//{{{
279
- 'type' : 'abstract',
280
- 'svg': function() {
281
- return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
282
- '<rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>' +
283
- '<path transform="scale(0.7) translate(12, 2)" class="stand" style="fill:#000000;" d="m 19.511059,31.248618 0,-23.6413153 -3.940219,0 0,15.7608793 -7.8804404,-7.88044 0,7.88044 -7.88043943,-7.88044 0,15.760876 z"/>' +
284
- '<circle cx="28" cy="27" r="9" class="rfill stand"/>' +
285
- '<text transform="translate(28,32)" class="small">i</text>' +
286
- '</svg>');
287
- }
288
- },//}}}
289
- 'description' : {//{{{
290
- 'create': function(target) {
291
- var node = null;
292
- node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="instantiate" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><manipulate output="result"/></call>');
293
- return node;
294
- },
295
- 'permissible_children': function(node) {
296
- if(node.children('manipulate').lenght < 1)
297
- return [
298
- {'label': 'Script Block',
299
- 'function_call': adaptor.description.insert_last_into,
300
- 'menu_icon': elements.callmanipulate.illustrator.svg,
301
- 'params': [adaptor.description.elements.manipulate.create, node]}
302
- ];
303
- return [];
304
- }
305
- },//}}}
306
- 'adaptor' : {//{{{
307
- 'mousedown': function (node, e) {
308
- events.mousedown(node,e,true, true);
309
- },
310
- 'click': events.click,
311
- }//}}}
312
- }; /*}}}*/
313
207
  this.elements.callmanipulate = { /*{{{*/
314
208
  'illustrator': {//{{{
315
209
  'type' : 'abstract',
@@ -322,23 +216,17 @@ function CPEE(adaptor) {
322
216
  '</svg>');
323
217
  }
324
218
  },//}}}
325
- 'description' : {//{{{
326
- 'create': function(target) {
327
- var node = null;
328
- node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><manipulate output="result"/></call>');
329
- return node;
330
- },
331
- 'permissible_children': function(node) {
332
- if(node.children('manipulate').lenght < 1)
333
- return [
334
- {'label': 'Script Block',
335
- 'function_call': adaptor.description.insert_last_into,
336
- 'menu_icon': elements.callmanipulate.illustrator.svg,
337
- 'params': [adaptor.description.elements.manipulate.create, node]}
338
- ];
339
- return [];
340
- }
341
- },//}}}
219
+ 'description': '<call id="###" endpoint="" xmlns="http://this.org/ns/description/1.0"><parameters><label>""</label><method>:post</method><parameters/></parameters><finalize output="result"/><update output="result"/></call>',
220
+ 'permissible_children': function(node) { //{{{
221
+ if(node.children('manipulate').lenght < 1)
222
+ return [
223
+ {'label': 'Scripts',
224
+ 'function_call': adaptor.description.insert_last_into,
225
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
226
+ 'params': [adaptor.description.elements.manipulate, node]}
227
+ ];
228
+ return [];
229
+ }, //}}}
342
230
  'adaptor' : {//{{{
343
231
  'mousedown': function (node, e) {
344
232
  events.mousedown(node,e,true, true);
@@ -395,23 +283,17 @@ function CPEE(adaptor) {
395
283
  '</svg>');
396
284
  }
397
285
  },//}}}
398
- 'description' : {//{{{
399
- 'create': function(target) {
400
- var node = $X('<call id="' + adaptor.description.get_free_id() + '" endpoint="" xmlns="http://cpee.org/ns/description/1.0"/>');
401
- node.append($X('<parameters xmlns="http://cpee.org/ns/description/1.0"><label>""</label><method>:post</method><parameters/></parameters>'));
402
- return node;
403
- },
404
- 'permissible_children': function(node) {
405
- if(node.children('manipulate').length < 1)
406
- return [
407
- {'label': 'Script Block',
408
- 'function_call': adaptor.description.insert_last_into,
409
- 'menu_icon': elements.callmanipulate.illustrator.svg,
410
- 'params': [adaptor.description.elements.manipulate.create, node]}
411
- ];
412
- return [];
413
- }
414
- },//}}}
286
+ 'description': '<call id="###" endpoint="" xmlns="http://cpee.org/ns/description/1.0"><parameters xmlns="http://cpee.org/ns/description/1.0"><label>""</label><method>:post</method><parameters/></parameters></call>',
287
+ 'permissible_children': function(node) { //{{{
288
+ if(node.children('manipulate').length < 1)
289
+ return [
290
+ {'label': 'Scripts',
291
+ 'function_call': adaptor.description.insert_last_into,
292
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
293
+ 'params': [adaptor.description.elements.scripts, node]}
294
+ ];
295
+ return [];
296
+ }, //}}}
415
297
  'adaptor' : {//{{{
416
298
  'mousedown': function (node, e) {
417
299
  events.mousedown(node,e,true, true);
@@ -420,7 +302,7 @@ function CPEE(adaptor) {
420
302
  'dragstart': events.dragstart,
421
303
  }//}}}
422
304
  }; /*}}}*/
423
- this.elements.manipulate = { /*{{{*/
305
+ this.elements.scripts = { /*{{{*/
424
306
  'illustrator': {//{{{
425
307
  'type' : 'primitive',
426
308
  'endnodes' : 'this',
@@ -431,15 +313,32 @@ function CPEE(adaptor) {
431
313
  '</svg>');
432
314
  }
433
315
  },//}}}
434
- 'description' : {//{{{
435
- 'create': function(target) {
436
- var node = $X('<manipulate id="' + adaptor.description.get_free_id() + '" xmlns="http://cpee.org/ns/description/1.0"/>');
437
- return node;
316
+ 'description': '<finalize xmlns="http://cpee.org/ns/description/1.0"/><update xmlns="http://cpee.org/ns/description/1.0"/>',
317
+ 'permissible_children': function(node) { //{{{
318
+ return [];
319
+ }, //}}}
320
+ 'adaptor': { //{{{
321
+ 'mousedown': function (node, e) {
322
+ events.mousedown(node,e,false, true);
438
323
  },
439
- 'permissible_children': function(node) {
440
- return [];
324
+ 'click': events.click,
325
+ } //}}}
326
+ }; /*}}}*/
327
+ this.elements.manipulate = { /*{{{*/
328
+ 'illustrator': {//{{{
329
+ 'type' : 'primitive',
330
+ 'endnodes' : 'this',
331
+ 'svg': function() {
332
+ return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
333
+ '<rect x="1" y="1" width="28" height="28" rx="4" class="rfill stand"/>' +
334
+ '<text transform="translate(15,21)" class="normal">s</text>' +
335
+ '</svg>');
441
336
  }
442
337
  },//}}}
338
+ 'description': '<manipulate id="###" xmlns="http://cpee.org/ns/description/1.0"/>',
339
+ 'permissible_children': function(node) { //{{{
340
+ return [];
341
+ }, //}}}
443
342
  'adaptor' : {//{{{
444
343
  'mousedown': function (node, e) {
445
344
  events.mousedown(node,e,false, true);
@@ -459,21 +358,16 @@ function CPEE(adaptor) {
459
358
  '</svg>');
460
359
  }
461
360
  },//}}}
462
- 'description' : {//{{{
463
- 'create': function(target) {
464
- var node = $X('<escape xmlns="http://cpee.org/ns/description/1.0"/>');
465
- return node;
361
+ 'description': '<escape xmlns="http://cpee.org/ns/description/1.0"/>',
362
+ 'permissible_children': function(node) { //{{{
363
+ return [];
364
+ }, //}}}
365
+ 'adaptor' : {//{{{
366
+ 'mousedown': function (node, e) {
367
+ events.mousedown(node,e,false, true);
466
368
  },
467
- 'permissible_children': function(node) {
468
- return [];
469
- }
470
- },//}}}
471
- 'adaptor' : {//{{{
472
- 'mousedown': function (node, e) {
473
- events.mousedown(node,e,false, true);
474
- },
475
- 'click': events.click,
476
- }//}}}
369
+ 'click': events.click,
370
+ }//}}}
477
371
  }; /*}}}*/
478
372
 
479
373
  // Complex Elements
@@ -502,47 +396,42 @@ function CPEE(adaptor) {
502
396
  '</svg>');
503
397
  }
504
398
  },//}}}
505
- 'description' : {//{{{
506
- 'create': function(target) {
507
- var node = $X('<choose mode="exclusive" xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>');
508
- return node;
509
- },
510
- 'permissible_children': function(node) {
511
- var func = null;
512
- if(node.get(0).tagName == 'choose') { func = adaptor.description.insert_first_into }
513
- else { func = adaptor.description.insert_after }
514
- if(node.children('parallel_branch').length > 0) {
515
- return [{'label': 'Parallel Branch',
516
- 'function_call': func,
517
- 'menu_icon': elements.parallel_branch.illustrator.svg,
518
- 'params': [adaptor.description.elements.parallel_branch.create, node]}];
519
- }
520
- var childs = [{'label': 'Alternative',
399
+ 'description': '<choose mode="exclusive" xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>',
400
+ 'permissible_children': function(node) { //{{{
401
+ var func = null;
402
+ if(node.get(0).tagName == 'choose') { func = adaptor.description.insert_first_into }
403
+ else { func = adaptor.description.insert_after }
404
+ if(node.children('parallel_branch').length > 0) {
405
+ return [{'label': 'Parallel Branch',
521
406
  'function_call': func,
522
- 'menu_icon': elements.alternative.illustrator.svg,
523
- 'params': [adaptor.description.elements.alternative.create, node]}];
524
- if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
525
- childs.push({'label': 'Otherwise',
526
- 'function_call': func,
527
- 'menu_icon': elements.otherwise.illustrator.svg,
528
- 'params': [adaptor.description.elements.otherwise.create, node]});
529
- if(node.parents('parallel').length > node.parents('parallel_branch').length)
530
- childs.push({'label': 'Parallel Branch',
531
- 'function_call': func,
532
- 'menu_icon': elements.parallel_branch.illustrator.svg,
533
- 'params': [adaptor.description.elements.parallel_branch.create, node]});
534
- return childs;
535
- }
536
- },//}}}
537
- 'adaptor' : {//{{{
538
- 'mousedown': function (node, e) {
539
- events.mousedown(node,e,true, true);
540
- },
541
- 'click': events.click,
542
- 'dblclick': events.dblclick,
543
- 'mouseover': events.mouseover,
544
- 'mouseout': events.mouseout,
545
- }//}}}
407
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
408
+ 'params': [adaptor.description.elements.parallel_branch, node]}];
409
+ }
410
+ var childs = [{'label': 'Alternative',
411
+ 'function_call': func,
412
+ 'menu_icon': elements.alternative.illustrator.svg,
413
+ 'params': [adaptor.description.elements.alternative, node]}];
414
+ if((node.children('otherwise').length == 0) && node.parents('parallel').length == node.parents('parallel_branch').length)
415
+ childs.push({'label': 'Otherwise',
416
+ 'function_call': func,
417
+ 'menu_icon': elements.otherwise.illustrator.svg,
418
+ 'params': [adaptor.description.elements.otherwise, node]});
419
+ if(node.parents('parallel').length > node.parents('parallel_branch').length)
420
+ childs.push({'label': 'Parallel Branch',
421
+ 'function_call': func,
422
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
423
+ 'params': [adaptor.description.elements.parallel_branch, node]});
424
+ return childs;
425
+ }, //}}}
426
+ 'adaptor' : {//{{{
427
+ 'mousedown': function (node, e) {
428
+ events.mousedown(node,e,true, true);
429
+ },
430
+ 'click': events.click,
431
+ 'dblclick': events.dblclick,
432
+ 'mouseover': events.mouseover,
433
+ 'mouseout': events.mouseout,
434
+ }//}}}
546
435
  }; /*}}}*/
547
436
  this.elements.otherwise = { /*{{{*/
548
437
  'illustrator': {//{{{
@@ -562,58 +451,53 @@ function CPEE(adaptor) {
562
451
  '</svg>');
563
452
  }
564
453
  },//}}}
565
- 'description' : {//{{{
566
- 'create': function(target) {
567
- var node = $X('<otherwise xmlns="http://cpee.org/ns/description/1.0"/>');
568
- return node;
454
+ 'description': '<otherwise xmlns="http://cpee.org/ns/description/1.0"/>',
455
+ 'neverdelete': true,
456
+ 'permissible_children': function(node) { //{{{
457
+ var func = null;
458
+ var childs = null;
459
+ if(node.get(0).tagName == 'otherwise') { func = adaptor.description.insert_first_into }
460
+ else { func = adaptor.description.insert_after }
461
+ return [
462
+ {'label': 'Service Call with Scripts',
463
+ 'function_call': func,
464
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
465
+ 'params': [adaptor.description.elements.callmanipulate, node]},
466
+ {'label': 'Service Call',
467
+ 'function_call': func,
468
+ 'menu_icon': elements.call.illustrator.svg,
469
+ 'params': [adaptor.description.elements.call, node]},
470
+ {'label': 'Script',
471
+ 'function_call': func,
472
+ 'menu_icon': elements.manipulate.illustrator.svg,
473
+ 'params': [adaptor.description.elements.manipulate, node]},
474
+ {'label': 'Parallel',
475
+ 'function_call': func,
476
+ 'menu_icon': elements.parallel.illustrator.svg,
477
+ 'params': [adaptor.description.elements.parallel, node]},
478
+ {'label': 'Choose',
479
+ 'function_call': func,
480
+ 'menu_icon': elements.choose.illustrator.svg,
481
+ 'params': [adaptor.description.elements.choose, node]},
482
+ {'label': 'Loop',
483
+ 'function_call': func,
484
+ 'menu_icon': elements.loop.illustrator.svg,
485
+ 'params': [adaptor.description.elements.loop, node]},
486
+ {'label': 'Critical',
487
+ 'function_call': func,
488
+ 'menu_icon': elements.critical.illustrator.svg,
489
+ 'params': [adaptor.description.elements.critical, node]}
490
+ ];
491
+ }, //}}}
492
+ 'adaptor' : {//{{{
493
+ 'mousedown': function (node, e) {
494
+ events.mousedown(node,e,true, false);
569
495
  },
570
- 'deleteable': true,
571
- 'permissible_children': function(node) {
572
- var func = null;
573
- var childs = null;
574
- if(node.get(0).tagName == 'otherwise') { func = adaptor.description.insert_first_into }
575
- else { func = adaptor.description.insert_after }
576
- return [
577
- {'label': 'Service Call with Script Block',
578
- 'function_call': func,
579
- 'menu_icon': elements.callmanipulate.illustrator.svg,
580
- 'params': [adaptor.description.elements.callmanipulate.create, node]},
581
- {'label': 'Service Call',
582
- 'function_call': func,
583
- 'menu_icon': elements.call.illustrator.svg,
584
- 'params': [adaptor.description.elements.call.create, node]},
585
- {'label': 'Script',
586
- 'function_call': func,
587
- 'menu_icon': elements.manipulate.illustrator.svg,
588
- 'params': [adaptor.description.elements.manipulate.create, node]},
589
- {'label': 'Parallel',
590
- 'function_call': func,
591
- 'menu_icon': elements.parallel.illustrator.svg,
592
- 'params': [adaptor.description.elements.parallel.create, node]},
593
- {'label': 'Choose',
594
- 'function_call': func,
595
- 'menu_icon': elements.choose.illustrator.svg,
596
- 'params': [adaptor.description.elements.choose.create, node]},
597
- {'label': 'Loop',
598
- 'function_call': func,
599
- 'menu_icon': elements.loop.illustrator.svg,
600
- 'params': [adaptor.description.elements.loop.create, node]},
601
- {'label': 'Critical',
602
- 'function_call': func,
603
- 'menu_icon': elements.critical.illustrator.svg,
604
- 'params': [adaptor.description.elements.critical.create, node]}
605
- ];
606
- }
607
- },//}}}
608
- 'adaptor' : {//{{{
609
- 'mousedown': function (node, e) {
610
- events.mousedown(node,e,true, false);
611
- },
612
- 'click': events.click,
613
- 'dblclick': events.dblclick,
614
- 'mouseover': events.mouseover,
615
- 'mouseout': events.mouseout,
616
- }//}}}
496
+ 'click': events.click,
497
+ 'dblclick': events.dblclick,
498
+ 'mouseover': events.mouseover,
499
+ 'mouseout': events.mouseout,
500
+ }//}}}
617
501
  }; /*}}}*/
618
502
  this.elements.alternative = { /*{{{*/
619
503
  'illustrator': {//{{{
@@ -633,60 +517,56 @@ function CPEE(adaptor) {
633
517
  '</svg>');
634
518
  }
635
519
  },//}}}
636
- 'description' : {//{{{
637
- 'create': function(target) {
638
- var node = $X('<alternative condition="" xmlns="http://cpee.org/ns/description/1.0"/>');
639
- return node;
520
+ 'description': '<alternative condition="" xmlns="http://cpee.org/ns/description/1.0"/>',
521
+ 'permissible_children': function(node) { //{{{
522
+ if(node.get(0).tagName == 'alternative') { func = adaptor.description.insert_first_into }
523
+ else { func = adaptor.description.insert_after }
524
+ if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative') {
525
+ return [{'label': 'Parallel Branch',
526
+ 'function_call': func,
527
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
528
+ 'params': [adaptor.description.elements.parallel_branch, node]}];
529
+ }
530
+ return [
531
+ {'label': 'Service Call with Scripts',
532
+ 'function_call': func,
533
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
534
+ 'params': [adaptor.description.elements.callmanipulate, node]},
535
+ {'label': 'Service Call',
536
+ 'function_call': func,
537
+ 'menu_icon': elements.call.illustrator.svg,
538
+ 'params': [adaptor.description.elements.call, node]},
539
+ {'label': 'Script',
540
+ 'function_call': func,
541
+ 'menu_icon': elements.manipulate.illustrator.svg,
542
+ 'params': [adaptor.description.elements.manipulate, node]},
543
+ {'label': 'Parallel',
544
+ 'function_call': func,
545
+ 'menu_icon': elements.parallel.illustrator.svg,
546
+ 'params': [adaptor.description.elements.parallel, node]},
547
+ {'label': 'Choose',
548
+ 'function_call': func,
549
+ 'menu_icon': elements.choose.illustrator.svg,
550
+ 'params': [adaptor.description.elements.choose, node]},
551
+ {'label': 'Loop',
552
+ 'function_call': func,
553
+ 'menu_icon': elements.loop.illustrator.svg,
554
+ 'params': [adaptor.description.elements.loop, node]},
555
+ {'label': 'Critical',
556
+ 'function_call': func,
557
+ 'menu_icon': elements.critical.illustrator.svg,
558
+ 'params': [adaptor.description.elements.critical, node]}
559
+ ];
560
+ }, //}}}
561
+ 'adaptor' : {//{{{
562
+ 'mousedown': function (node, e) {
563
+ events.mousedown(node,e,true, false);
640
564
  },
641
- 'permissible_children': function(node) {
642
- if(node.get(0).tagName == 'alternative') { func = adaptor.description.insert_first_into }
643
- else { func = adaptor.description.insert_after }
644
- if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative')
645
- return [{'label': 'Parallel Branch',
646
- 'function_call': func,
647
- 'menu_icon': elements.parallel_branch.illustrator.svg,
648
- 'params': [adaptor.description.elements.parallel_branch.create, node]}];
649
- return [
650
- {'label': 'Service Call with Script Block',
651
- 'function_call': func,
652
- 'menu_icon': elements.callmanipulate.illustrator.svg,
653
- 'params': [adaptor.description.elements.callmanipulate.create, node]},
654
- {'label': 'Service Call',
655
- 'function_call': func,
656
- 'menu_icon': elements.call.illustrator.svg,
657
- 'params': [adaptor.description.elements.call.create, node]},
658
- {'label': 'Script',
659
- 'function_call': func,
660
- 'menu_icon': elements.manipulate.illustrator.svg,
661
- 'params': [adaptor.description.elements.manipulate.create, node]},
662
- {'label': 'Parallel',
663
- 'function_call': func,
664
- 'menu_icon': elements.parallel.illustrator.svg,
665
- 'params': [adaptor.description.elements.parallel.create, node]},
666
- {'label': 'Choose',
667
- 'function_call': func,
668
- 'menu_icon': elements.choose.illustrator.svg,
669
- 'params': [adaptor.description.elements.choose.create, node]},
670
- {'label': 'Loop',
671
- 'function_call': func,
672
- 'menu_icon': elements.loop.illustrator.svg,
673
- 'params': [adaptor.description.elements.loop.create, node]},
674
- {'label': 'Critical',
675
- 'function_call': func,
676
- 'menu_icon': elements.critical.illustrator.svg,
677
- 'params': [adaptor.description.elements.critical.create, node]}
678
- ];
679
- }
680
- },//}}}
681
- 'adaptor' : {//{{{
682
- 'mousedown': function (node, e) {
683
- events.mousedown(node,e,true, false);
684
- },
685
- 'click': events.click,
686
- 'dblclick': events.dblclick,
687
- 'mouseover': events.mouseover,
688
- 'mouseout': events.mouseout,
689
- }//}}}
565
+ 'click': events.click,
566
+ 'dblclick': events.dblclick,
567
+ 'mouseover': events.mouseover,
568
+ 'mouseout': events.mouseout,
569
+ }//}}}
690
570
  }; /*}}}*/
691
571
  this.elements.loop = { /*{{{*/
692
572
  'illustrator': {//{{{
@@ -707,66 +587,61 @@ function CPEE(adaptor) {
707
587
  '</svg>');
708
588
  }
709
589
  },// }}}
710
- 'description' : {//{{{
711
- 'create': function(target) {
712
- var node = $X('<loop pre_test="" xmlns="http://cpee.org/ns/description/1.0"/>');
713
- return node;
590
+ 'description': '<loop pre_test="" xmlns="http://cpee.org/ns/description/1.0"/>',
591
+ 'permissible_children': function(node) { //{{{
592
+ var func = null;
593
+ if(node.get(0).tagName == 'loop') { func = adaptor.description.insert_first_into }
594
+ else { func = adaptor.description.insert_after }
595
+ var childs = [
596
+ {'label': 'Service Call with Scripts',
597
+ 'function_call': func,
598
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
599
+ 'params': [adaptor.description.elements.callmanipulate, node]},
600
+ {'label': 'Service Call',
601
+ 'function_call': func,
602
+ 'menu_icon': elements.call.illustrator.svg,
603
+ 'params': [adaptor.description.elements.call, node]},
604
+ {'label': 'Manipulate',
605
+ 'function_call': func,
606
+ 'menu_icon': elements.manipulate.illustrator.svg,
607
+ 'params': [adaptor.description.elements.manipulate, node]},
608
+ {'label': 'Choose',
609
+ 'function_call': func,
610
+ 'menu_icon': elements.choose.illustrator.svg,
611
+ 'params': [adaptor.description.elements.choose, node]},
612
+ {'label': 'Loop',
613
+ 'function_call': func,
614
+ 'menu_icon': elements.loop.illustrator.svg,
615
+ 'params': [adaptor.description.elements.loop, node]},
616
+ {'label': 'Critical',
617
+ 'function_call': func,
618
+ 'menu_icon': elements.critical.illustrator.svg,
619
+ 'params': [adaptor.description.elements.critical, node]}
620
+ ];
621
+ if(node.parent('parallel').length > node.parent('parallel_branch').length) {
622
+ childs.push({'label': 'Parallel Branch',
623
+ 'function_call': func,
624
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
625
+ 'params': [adaptor.description.elements.parallel_branch, node]}
626
+ );
627
+ } else {
628
+ childs.push({'label': 'Parallel',
629
+ 'function_call': func,
630
+ 'menu_icon': elements.parallel.illustrator.svg,
631
+ 'params': [adaptor.description.elements.parallel, node]}
632
+ );
633
+ }
634
+ return childs;
635
+ }, //}}}
636
+ 'adaptor' : {//{{{
637
+ 'mousedown': function (node, e) {
638
+ events.mousedown(node,e,true, true);
714
639
  },
715
- 'permissible_children': function(node) {
716
- var func = null;
717
- if(node.get(0).tagName == 'loop') { func = adaptor.description.insert_first_into }
718
- else { func = adaptor.description.insert_after }
719
- var childs = [
720
- {'label': 'Service Call with Script Block',
721
- 'function_call': func,
722
- 'menu_icon': elements.callmanipulate.illustrator.svg,
723
- 'params': [adaptor.description.elements.callmanipulate.create, node]},
724
- {'label': 'Service Call',
725
- 'function_call': func,
726
- 'menu_icon': elements.call.illustrator.svg,
727
- 'params': [adaptor.description.elements.call.create, node]},
728
- {'label': 'Manipulate',
729
- 'function_call': func,
730
- 'menu_icon': elements.manipulate.illustrator.svg,
731
- 'params': [adaptor.description.elements.manipulate.create, node]},
732
- {'label': 'Choose',
733
- 'function_call': func,
734
- 'menu_icon': elements.choose.illustrator.svg,
735
- 'params': [adaptor.description.elements.choose.create, node]},
736
- {'label': 'Loop',
737
- 'function_call': func,
738
- 'menu_icon': elements.loop.illustrator.svg,
739
- 'params': [adaptor.description.elements.loop.create, node]},
740
- {'label': 'Critical',
741
- 'function_call': func,
742
- 'menu_icon': elements.critical.illustrator.svg,
743
- 'params': [adaptor.description.elements.critical.create, node]}
744
- ];
745
- if(node.parent('parallel').length > node.parent('parallel_branch').length) {
746
- childs.push({'label': 'Parallel Branch',
747
- 'function_call': func,
748
- 'menu_icon': elements.parallel_branch.illustrator.svg,
749
- 'params': [adaptor.description.elements.parallel_branch.create, node]}
750
- );
751
- } else {
752
- childs.push({'label': 'Parallel',
753
- 'function_call': func,
754
- 'menu_icon': elements.parallel.illustrator.svg,
755
- 'params': [adaptor.description.elements.parallel.create, node]}
756
- );
757
- }
758
- return childs;
759
- }
760
- },//}}}
761
- 'adaptor' : {//{{{
762
- 'mousedown': function (node, e) {
763
- events.mousedown(node,e,true, true);
764
- },
765
- 'click': events.click,
766
- 'dblclick': events.dblclick,
767
- 'mouseover': events.mouseover,
768
- 'mouseout': events.mouseout,
769
- }//}}}
640
+ 'click': events.click,
641
+ 'dblclick': events.dblclick,
642
+ 'mouseover': events.mouseover,
643
+ 'mouseout': events.mouseout,
644
+ }//}}}
770
645
  }; /*}}}*/
771
646
  this.elements.parallel = { /*{{{*/
772
647
  'illustrator': {//{{{
@@ -790,59 +665,54 @@ function CPEE(adaptor) {
790
665
  '</svg>');
791
666
  }
792
667
  },//}}}
793
- 'description' : {//{{{
794
- 'create': function(target) {
795
- var node = $X('<parallel xmlns="http://cpee.org/ns/description/1.0"/>');
796
- return node;
797
- },
798
- 'permissible_children': function(node) {
799
- var childs = [
800
- {'label': 'Service Call with Script Block',
668
+ 'description': '<parallel xmlns="http://cpee.org/ns/description/1.0"/>',
669
+ 'permissible_children': function(node) { //{{{
670
+ var childs = [
671
+ {'label': 'Service Call with Scripts',
672
+ 'function_call': adaptor.description.insert_last_into,
673
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
674
+ 'params': [adaptor.description.elements.callmanipulate, node]},
675
+ {'label': 'Service Call',
676
+ 'function_call': adaptor.description.insert_last_into,
677
+ 'menu_icon': elements.call.illustrator.svg,
678
+ 'params': [adaptor.description.elements.call, node]},
679
+ {'label': 'Manipulate',
680
+ 'function_call': adaptor.description.insert_last_into,
681
+ 'menu_icon': elements.manipulate.illustrator.svg,
682
+ 'params': [adaptor.description.elements.manipulate, node]},
683
+ {'label': 'Choose',
684
+ 'function_call': adaptor.description.insert_last_into,
685
+ 'menu_icon': elements.choose.illustrator.svg,
686
+ 'params': [adaptor.description.elements.choose, node]},
687
+ {'label': 'Loop',
688
+ 'function_call': adaptor.description.insert_last_into,
689
+ 'menu_icon': elements.loop.illustrator.svg,
690
+ 'params': [adaptor.description.elements.loop, node]},
691
+ {'label': 'Critical',
692
+ 'function_call': adaptor.description.insert_last_into,
693
+ 'menu_icon': elements.critical.illustrator.svg,
694
+ 'params': [adaptor.description.elements.critical, node]},
695
+ {'label': 'Parallel Branch',
696
+ 'function_call': adaptor.description.insert_last_into,
697
+ 'menu_icon': elements.parallel_branch.illustrator.svg,
698
+ 'params': [adaptor.description.elements.parallel_branch, node]}
699
+ ];
700
+ if(node.get(0).tagName != 'parallel')
701
+ childs.push({'label': 'Parallel',
801
702
  'function_call': adaptor.description.insert_last_into,
802
- 'menu_icon': elements.callmanipulate.illustrator.svg,
803
- 'params': [adaptor.description.elements.callmanipulate.create, node]},
804
- {'label': 'Service Call',
805
- 'function_call': adaptor.description.insert_last_into,
806
- 'menu_icon': elements.call.illustrator.svg,
807
- 'params': [adaptor.description.elements.call.create, node]},
808
- {'label': 'Manipulate',
809
- 'function_call': adaptor.description.insert_last_into,
810
- 'menu_icon': elements.manipulate.illustrator.svg,
811
- 'params': [adaptor.description.elements.manipulate.create, node]},
812
- {'label': 'Choose',
813
- 'function_call': adaptor.description.insert_last_into,
814
- 'menu_icon': elements.choose.illustrator.svg,
815
- 'params': [adaptor.description.elements.choose.create, node]},
816
- {'label': 'Loop',
817
- 'function_call': adaptor.description.insert_last_into,
818
- 'menu_icon': elements.loop.illustrator.svg,
819
- 'params': [adaptor.description.elements.loop.create, node]},
820
- {'label': 'Critical',
821
- 'function_call': adaptor.description.insert_last_into,
822
- 'menu_icon': elements.critical.illustrator.svg,
823
- 'params': [adaptor.description.elements.critical.create, node]},
824
- {'label': 'Parallel Branch',
825
- 'function_call': adaptor.description.insert_last_into,
826
- 'menu_icon': elements.parallel_branch.illustrator.svg,
827
- 'params': [adaptor.description.elements.parallel_branch.create, node]}
828
- ];
829
- if(node.get(0).tagName != 'parallel')
830
- childs.push({'label': 'Parallel',
831
- 'function_call': adaptor.description.insert_last_into,
832
- 'menu_icon': elements.parallel.illustrator.svg,
833
- 'params': [adaptor.description.elements.parallel.create, node]});
834
- return childs;
835
- }
836
- },//}}}
837
- 'adaptor' : {//{{{
838
- 'mousedown': function (node, e) {
839
- events.mousedown(node,e,true, true);
840
- },
841
- 'click': events.click,
842
- 'dblclick': events.dblclick,
843
- 'mouseover': events.mouseover,
844
- 'mouseout': events.mouseout,
845
- }//}}}
703
+ 'menu_icon': elements.parallel.illustrator.svg,
704
+ 'params': [adaptor.description.elements.parallel, node]});
705
+ return childs;
706
+ }, //}}}
707
+ 'adaptor' : {//{{{
708
+ 'mousedown': function (node, e) {
709
+ events.mousedown(node,e,true, true);
710
+ },
711
+ 'click': events.click,
712
+ 'dblclick': events.dblclick,
713
+ 'mouseover': events.mouseover,
714
+ 'mouseout': events.mouseout,
715
+ }//}}}
846
716
  }; /*}}}*/
847
717
  this.elements.parallel_branch = { /*{{{*/
848
718
  'illustrator': {//{{{
@@ -864,64 +734,59 @@ function CPEE(adaptor) {
864
734
  '</svg>');
865
735
  }
866
736
  },//}}}
867
- 'description' : {//{{{
868
- 'create': function(target) {
869
- var node = $X('<parallel_branch xmlns="http://cpee.org/ns/description/1.0"/>');
870
- return node;
871
- },
872
- 'permissible_children': function(node) {
873
- var func = null;
874
- var childs = null;
875
- if(node.get(0).tagName == 'parallel_branch') { func = adaptor.description.insert_first_into }
876
- else { func = adaptor.description.insert_after }
877
- childs = [
878
- {'label': 'Service Call with Script Block',
879
- 'function_call': func,
880
- 'menu_icon': elements.callmanipulate.illustrator.svg,
881
- 'params': [adaptor.description.elements.callmanipulate.create, node]},
882
- {'label': 'Service Call',
883
- 'function_call': func,
884
- 'menu_icon': elements.call.illustrator.svg,
885
- 'params': [adaptor.description.elements.call.create, node]},
886
- {'label': 'Script',
887
- 'function_call': func,
888
- 'menu_icon': elements.manipulate.illustrator.svg,
889
- 'params': [adaptor.description.elements.manipulate.create, node]},
890
- {'label': 'Parallel',
891
- 'function_call': func,
892
- 'menu_icon': elements.parallel.illustrator.svg,
893
- 'params': [adaptor.description.elements.parallel.create, node]},
894
- {'label': 'Choose',
895
- 'function_call': func,
896
- 'menu_icon': elements.choose.illustrator.svg,
897
- 'params': [adaptor.description.elements.choose.create, node]},
898
- {'label': 'Loop',
899
- 'function_call': func,
900
- 'menu_icon': elements.loop.illustrator.svg,
901
- 'params': [adaptor.description.elements.loop.create, node]},
902
- {'label': 'Critical',
903
- 'function_call': func,
904
- 'menu_icon': elements.critical.illustrator.svg,
905
- 'params': [adaptor.description.elements.critical.create, node]},
906
- ];
907
- if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
908
- return [{'label': 'Alternative',
909
- 'function_call': func,
910
- 'menu_icon': elements.alternative.illustrator.svg,
911
- 'params': [adaptor.description.elements.alternative.create, node]}];
912
- }
913
- return childs;
737
+ 'description': '<parallel_branch xmlns="http://cpee.org/ns/description/1.0"/>',
738
+ 'permissible_children': function(node) { //{{{
739
+ var func = null;
740
+ var childs = null;
741
+ if(node.get(0).tagName == 'parallel_branch') { func = adaptor.description.insert_first_into }
742
+ else { func = adaptor.description.insert_after }
743
+ childs = [
744
+ {'label': 'Service Call with Scripts',
745
+ 'function_call': func,
746
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
747
+ 'params': [adaptor.description.elements.callmanipulate, node]},
748
+ {'label': 'Service Call',
749
+ 'function_call': func,
750
+ 'menu_icon': elements.call.illustrator.svg,
751
+ 'params': [adaptor.description.elements.call, node]},
752
+ {'label': 'Script',
753
+ 'function_call': func,
754
+ 'menu_icon': elements.manipulate.illustrator.svg,
755
+ 'params': [adaptor.description.elements.manipulate, node]},
756
+ {'label': 'Parallel',
757
+ 'function_call': func,
758
+ 'menu_icon': elements.parallel.illustrator.svg,
759
+ 'params': [adaptor.description.elements.parallel, node]},
760
+ {'label': 'Choose',
761
+ 'function_call': func,
762
+ 'menu_icon': elements.choose.illustrator.svg,
763
+ 'params': [adaptor.description.elements.choose, node]},
764
+ {'label': 'Loop',
765
+ 'function_call': func,
766
+ 'menu_icon': elements.loop.illustrator.svg,
767
+ 'params': [adaptor.description.elements.loop, node]},
768
+ {'label': 'Critical',
769
+ 'function_call': func,
770
+ 'menu_icon': elements.critical.illustrator.svg,
771
+ 'params': [adaptor.description.elements.critical, node]},
772
+ ];
773
+ if(node.parents('choose').length > node.parents('alternative, otherwise').length && node.get(0).tagName == 'parallel_branch') {
774
+ return [{'label': 'Alternative',
775
+ 'function_call': func,
776
+ 'menu_icon': elements.alternative.illustrator.svg,
777
+ 'params': [adaptor.description.elements.alternative, node]}];
914
778
  }
915
- },//}}}
916
- 'adaptor' : {//{{{
917
- 'mousedown': function (node, e) {
918
- events.mousedown(node,e,true, false);
919
- },
920
- 'click': events.click,
921
- 'dblclick': events.dblclick,
922
- 'mouseover': events.mouseover,
923
- 'mouseout': events.mouseout,
924
- }//}}}
779
+ return childs;
780
+ }, //}}}
781
+ 'adaptor' : {//{{{
782
+ 'mousedown': function (node, e) {
783
+ events.mousedown(node,e,true, false);
784
+ },
785
+ 'click': events.click,
786
+ 'dblclick': events.dblclick,
787
+ 'mouseover': events.mouseover,
788
+ 'mouseout': events.mouseout,
789
+ }//}}}
925
790
  }; /*}}}*/
926
791
  this.elements.critical = { /*{{{*/
927
792
  'illustrator': {//{{{
@@ -942,56 +807,51 @@ function CPEE(adaptor) {
942
807
  '</svg>');
943
808
  }
944
809
  },//}}}
945
- 'description' : {//{{{
946
- 'create': function(target) {
947
- var node = $X('<critical sid="section" xmlns="http://cpee.org/ns/description/1.0"/>');
948
- return node;
810
+ 'description': '<critical sid="section" xmlns="http://cpee.org/ns/description/1.0"/>',
811
+ 'permissible_children': function(node) { //{{{
812
+ var func = null;
813
+ if(node.get(0).tagName == 'critical') { func = adaptor.description.insert_first_into }
814
+ else { func = adaptor.description.insert_after }
815
+ return [
816
+ {'label': 'Service Call with Scripts',
817
+ 'function_call': func,
818
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
819
+ 'params': [adaptor.description.elements.callmanipulate, node]},
820
+ {'label': 'Service Call',
821
+ 'function_call': func,
822
+ 'menu_icon': elements.call.illustrator.svg,
823
+ 'params': [adaptor.description.elements.call, node]},
824
+ {'label': 'Script',
825
+ 'function_call': func,
826
+ 'menu_icon': elements.manipulate.illustrator.svg,
827
+ 'params': [adaptor.description.elements.manipulate, node]},
828
+ {'label': 'Parallel',
829
+ 'function_call': func,
830
+ 'menu_icon': elements.parallel.illustrator.svg,
831
+ 'params': [adaptor.description.elements.parallel, node]},
832
+ {'label': 'Choose',
833
+ 'function_call': func,
834
+ 'menu_icon': elements.choose.illustrator.svg,
835
+ 'params': [adaptor.description.elements.choose, node]},
836
+ {'label': 'Loop',
837
+ 'function_call': func,
838
+ 'menu_icon': elements.loop.illustrator.svg,
839
+ 'params': [adaptor.description.elements.loop, node]},
840
+ {'label': 'Critical',
841
+ 'function_call': func,
842
+ 'menu_icon': elements.critical.illustrator.svg,
843
+ 'params': [adaptor.description.elements.critical, node]},
844
+ ];
845
+ }, //}}}
846
+ 'adaptor' : {//{{{
847
+ 'mousedown': function (node, e) {
848
+ events.mousedown(node,e,true, true);
949
849
  },
950
- 'permissible_children': function(node) {
951
- var func = null;
952
- if(node.get(0).tagName == 'critical') { func = adaptor.description.insert_first_into }
953
- else { func = adaptor.description.insert_after }
954
- return [
955
- {'label': 'Service Call with Script Block',
956
- 'function_call': func,
957
- 'menu_icon': elements.callmanipulate.illustrator.svg,
958
- 'params': [adaptor.description.elements.callmanipulate.create, node]},
959
- {'label': 'Service Call',
960
- 'function_call': func,
961
- 'menu_icon': elements.call.illustrator.svg,
962
- 'params': [adaptor.description.elements.call.create, node]},
963
- {'label': 'Script',
964
- 'function_call': func,
965
- 'menu_icon': elements.manipulate.illustrator.svg,
966
- 'params': [adaptor.description.elements.manipulate.create, node]},
967
- {'label': 'Parallel',
968
- 'function_call': func,
969
- 'menu_icon': elements.parallel.illustrator.svg,
970
- 'params': [adaptor.description.elements.parallel.create, node]},
971
- {'label': 'Choose',
972
- 'function_call': func,
973
- 'menu_icon': elements.choose.illustrator.svg,
974
- 'params': [adaptor.description.elements.choose.create, node]},
975
- {'label': 'Loop',
976
- 'function_call': func,
977
- 'menu_icon': elements.loop.illustrator.svg,
978
- 'params': [adaptor.description.elements.loop.create, node]},
979
- {'label': 'Critical',
980
- 'function_call': func,
981
- 'menu_icon': elements.critical.illustrator.svg,
982
- 'params': [adaptor.description.elements.critical.create, node]},
983
- ];
984
- }
985
- },//}}}
986
- 'adaptor' : {//{{{
987
- 'mousedown': function (node, e) {
988
- events.mousedown(node,e,true, true);
989
- },
990
- 'click': events.click,
991
- 'dblclick': events.dblclick,
992
- 'mouseover': events.mouseover,
993
- 'mouseout': events.mouseout,
994
- }//}}}
850
+ 'click': events.click,
851
+ 'dblclick': events.dblclick,
852
+ 'mouseover': events.mouseover,
853
+ 'mouseout': events.mouseout,
854
+ }//}}}
995
855
  }; /*}}}*/
996
856
  this.elements.group = { /*{{{*/
997
857
  'illustrator': {//{{{
@@ -1009,28 +869,23 @@ function CPEE(adaptor) {
1009
869
  return false;
1010
870
  }
1011
871
  },//}}}
1012
- 'description' : {//{{{
1013
- 'create': function(target) {
1014
- var node = $X('<group xmlns="http://cpee.org/ns/description/1.0"/>');
1015
- return node;
872
+ 'description': '<group xmlns="http://cpee.org/ns/description/1.0"/>',
873
+ 'permissible_children': function(node) { //{{{
874
+ var func = null;
875
+ if(node.get(0).tagName == 'group') { func = adaptor.description.insert_first_into }
876
+ else { func = adaptor.description.insert_after }
877
+ return [
878
+ ];
879
+ }, //}}}
880
+ 'adaptor' : {//{{{
881
+ 'mousedown': function (node, e) {
882
+ events.mousedown(node,e,true, true);
1016
883
  },
1017
- 'permissible_children': function(node) {
1018
- var func = null;
1019
- if(node.get(0).tagName == 'group') { func = adaptor.description.insert_first_into }
1020
- else { func = adaptor.description.insert_after }
1021
- return [
1022
- ];
1023
- }
1024
- },//}}}
1025
- 'adaptor' : {//{{{
1026
- 'mousedown': function (node, e) {
1027
- events.mousedown(node,e,true, true);
1028
- },
1029
- 'click': events.click,
1030
- 'dblclick': events.dblclick,
1031
- 'mouseover': events.mouseover,
1032
- 'mouseout': events.mouseout,
1033
- }//}}}
884
+ 'click': events.click,
885
+ 'dblclick': events.dblclick,
886
+ 'mouseover': events.mouseover,
887
+ 'mouseout': events.mouseout,
888
+ }//}}}
1034
889
  }; /*}}}*/
1035
890
  this.elements.start = this.elements.description = { /*{{{*/
1036
891
  'illustrator': {//{{{
@@ -1049,51 +904,50 @@ function CPEE(adaptor) {
1049
904
  '</svg>');
1050
905
  }
1051
906
  },//}}}
1052
- 'description' : {//{{{
1053
- 'permissible_children': function(node) {
1054
- var func = null;
1055
- if(node.get(0).tagName == 'description') { func = adaptor.description.insert_first_into }
1056
- else { func = adaptor.description.insert_after }
1057
- return [
1058
- {'label': 'Service Call with Script Block',
1059
- 'function_call': func,
1060
- 'menu_icon': elements.callmanipulate.illustrator.svg,
1061
- 'params': [adaptor.description.elements.callmanipulate.create, node]},
1062
- {'label': 'Service Call',
1063
- 'function_call': func,
1064
- 'menu_icon': elements.call.illustrator.svg,
1065
- 'params': [adaptor.description.elements.call.create, node]},
1066
- {'label': 'Script Task',
1067
- 'function_call': func,
1068
- 'menu_icon': elements.manipulate.illustrator.svg,
1069
- 'params': [adaptor.description.elements.manipulate.create, node]},
1070
- {'label': 'Parallel',
1071
- 'function_call': func,
1072
- 'menu_icon': elements.parallel.illustrator.svg,
1073
- 'params': [adaptor.description.elements.parallel.create, node]},
1074
- {'label': 'Choose',
1075
- 'function_call': func,
1076
- 'menu_icon': elements.choose.illustrator.svg,
1077
- 'params': [adaptor.description.elements.choose.create, node]},
1078
- {'label': 'Loop',
1079
- 'function_call': func,
1080
- 'menu_icon': elements.loop.illustrator.svg,
1081
- 'params': [adaptor.description.elements.loop.create, node]},
1082
- {'label': 'Critical',
1083
- 'function_call': func,
1084
- 'menu_icon': elements.critical.illustrator.svg,
1085
- 'params': [adaptor.description.elements.critical.create, node]}
1086
- ];
1087
- }
1088
- },//}}}
1089
- 'adaptor' : {//{{{
1090
- 'mousedown': function (node, e) {
1091
- events.mousedown(node,e,true, false);
1092
- },
1093
- 'click': events.click,
1094
- 'dblclick': events.dblclick,
1095
- 'mouseover': events.mouseover,
1096
- 'mouseout': events.mouseout,
1097
- }//}}}
907
+ 'description': null,
908
+ 'permissible_children': function(node) { //{{{
909
+ var func = null;
910
+ if(node.get(0).tagName == 'description') { func = adaptor.description.insert_first_into }
911
+ else { func = adaptor.description.insert_after }
912
+ return [
913
+ {'label': 'Service Call with Scripts',
914
+ 'function_call': func,
915
+ 'menu_icon': elements.callmanipulate.illustrator.svg,
916
+ 'params': [adaptor.description.elements.callmanipulate, node]},
917
+ {'label': 'Service Call',
918
+ 'function_call': func,
919
+ 'menu_icon': elements.call.illustrator.svg,
920
+ 'params': [adaptor.description.elements.call, node]},
921
+ {'label': 'Script Task',
922
+ 'function_call': func,
923
+ 'menu_icon': elements.manipulate.illustrator.svg,
924
+ 'params': [adaptor.description.elements.manipulate, node]},
925
+ {'label': 'Parallel',
926
+ 'function_call': func,
927
+ 'menu_icon': elements.parallel.illustrator.svg,
928
+ 'params': [adaptor.description.elements.parallel, node]},
929
+ {'label': 'Choose',
930
+ 'function_call': func,
931
+ 'menu_icon': elements.choose.illustrator.svg,
932
+ 'params': [adaptor.description.elements.choose, node]},
933
+ {'label': 'Loop',
934
+ 'function_call': func,
935
+ 'menu_icon': elements.loop.illustrator.svg,
936
+ 'params': [adaptor.description.elements.loop, node]},
937
+ {'label': 'Critical',
938
+ 'function_call': func,
939
+ 'menu_icon': elements.critical.illustrator.svg,
940
+ 'params': [adaptor.description.elements.critical, node]}
941
+ ];
942
+ }, //}}}
943
+ 'adaptor' : {//{{{
944
+ 'mousedown': function (node, e) {
945
+ events.mousedown(node,e,true, false);
946
+ },
947
+ 'click': events.click,
948
+ 'dblclick': events.dblclick,
949
+ 'mouseover': events.mouseover,
950
+ 'mouseout': events.mouseout,
951
+ }//}}}
1098
952
  }; /*}}}*/
1099
- .5}
953
+ }