cpee 2.0.24 → 2.0.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/{templates/.CPEE.xml → CPEE.xml} +1 -1
  3. data/cockpit/{templates/.Signavio.xml → Signavio.xml} +1 -1
  4. data/cockpit/css/model.css +1 -1
  5. data/cockpit/css/ui.css +30 -5
  6. data/cockpit/css/wfadaptor.css +11 -0
  7. data/cockpit/edit.html +260 -0
  8. data/cockpit/graph.html +3 -3
  9. data/cockpit/index.html +9 -8
  10. data/cockpit/js/details.js +0 -1
  11. data/cockpit/js/edit.js +32 -0
  12. data/cockpit/js/instance.js +51 -35
  13. data/cockpit/js/model.js +6 -36
  14. data/cockpit/js/parameters.js +9 -4
  15. data/cockpit/js/ui.js +7 -0
  16. data/cockpit/model.html +5 -3
  17. data/cockpit/replay.html +3 -2
  18. data/cockpit/templates/Coopis 2010.xml +1 -1
  19. data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +1 -1
  20. data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +1 -1
  21. data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +1 -1
  22. data/cockpit/templates/Track Test Local.xml +6 -2
  23. data/cockpit/templates/Track Test.xml +5 -1
  24. data/cockpit/templates/UR-VUE 2020 Manual Adjust.xml +5 -1
  25. data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +8 -4
  26. data/cockpit/templates/UR-VUE 2020 Solution NN.xml +8 -4
  27. data/cockpit/templates/UR-VUE 2020 Solution View.xml +8 -4
  28. data/cockpit/templates/UR-VUE 2020.xml +8 -4
  29. data/cockpit/themes/compact/rngs/call.rng +26 -1
  30. data/cockpit/themes/compact/rngs/callmanipulate.rng +32 -2
  31. data/cockpit/themes/compact/rngs/parallel.rng +6 -0
  32. data/cockpit/themes/compact/symbols/parallel_branch_event.svg +2 -2
  33. data/cockpit/themes/compact/symbols/parallel_eventbased_exclusive.svg +9 -0
  34. data/cockpit/themes/compact/symbols/parallel_eventbased_parallel.svg +8 -0
  35. data/cockpit/themes/compact/theme.js +102 -27
  36. data/cockpit/themes/control/rngs/call.rng +26 -1
  37. data/cockpit/themes/control/rngs/callmanipulate.rng +32 -2
  38. data/cockpit/themes/control/rngs/parallel.rng +6 -0
  39. data/cockpit/themes/control/symbols/parallel_branch_event.svg +2 -2
  40. data/cockpit/themes/control/symbols/parallel_eventbased_exclusive.svg +9 -0
  41. data/cockpit/themes/control/symbols/parallel_eventbased_parallel.svg +8 -0
  42. data/cockpit/themes/control/theme.js +95 -21
  43. data/cockpit/themes/default/rngs/call.rng +26 -1
  44. data/cockpit/themes/default/rngs/callmanipulate.rng +32 -2
  45. data/cockpit/themes/default/rngs/parallel.rng +6 -0
  46. data/cockpit/themes/default/symbols/parallel_branch_event.svg +2 -2
  47. data/cockpit/themes/default/symbols/parallel_eventbased_exclusive.svg +9 -0
  48. data/cockpit/themes/default/symbols/parallel_eventbased_parallel.svg +8 -0
  49. data/cockpit/themes/default/theme.js +94 -20
  50. data/cockpit/themes/extended/rngs/call.rng +26 -1
  51. data/cockpit/themes/extended/rngs/callmanipulate.rng +32 -2
  52. data/cockpit/themes/extended/rngs/parallel.rng +6 -0
  53. data/cockpit/themes/extended/symbols/parallel_branch_event.svg +2 -2
  54. data/cockpit/themes/extended/symbols/parallel_eventbased_exclusive.svg +9 -0
  55. data/cockpit/themes/extended/symbols/parallel_eventbased_parallel.svg +8 -0
  56. data/cockpit/themes/extended/theme.js +95 -21
  57. data/cockpit/themes/model/rngs/call.rng +21 -20
  58. data/cockpit/themes/model/rngs/callmanipulate.rng +23 -22
  59. data/cockpit/themes/model/symbols/parallel_branch_event.svg +2 -2
  60. data/cockpit/themes/model/symbols/parallel_eventbased_exclusive.svg +9 -0
  61. data/cockpit/themes/model/symbols/parallel_eventbased_parallel.svg +8 -0
  62. data/cockpit/themes/model/theme.js +96 -22
  63. data/cockpit/themes/packed/rngs/call.rng +26 -1
  64. data/cockpit/themes/packed/rngs/callmanipulate.rng +32 -2
  65. data/cockpit/themes/packed/rngs/parallel.rng +6 -0
  66. data/cockpit/themes/packed/symbols/parallel_branch_event.svg +2 -2
  67. data/cockpit/themes/packed/symbols/parallel_eventbased_exclusive.svg +9 -0
  68. data/cockpit/themes/packed/symbols/parallel_eventbased_parallel.svg +8 -0
  69. data/cockpit/themes/packed/theme.js +95 -21
  70. data/cockpit/themes/preset/rngs/call.rng +26 -1
  71. data/cockpit/themes/preset/rngs/callmanipulate.rng +32 -2
  72. data/cockpit/themes/preset/rngs/parallel.rng +6 -0
  73. data/cockpit/themes/preset/symbols/parallel_branch_event.svg +2 -2
  74. data/cockpit/themes/preset/symbols/parallel_eventbased_exclusive.svg +9 -0
  75. data/cockpit/themes/preset/symbols/parallel_eventbased_parallel.svg +8 -0
  76. data/cockpit/themes/preset/theme.js +94 -20
  77. data/cockpit/track.html +3 -3
  78. data/cockpit/{templates/.transformations.xml → transformations.xml} +0 -0
  79. data/cpee.gemspec +3 -3
  80. data/lib/callbacks.xml +5 -0
  81. data/lib/cpee/controller.rb +30 -28
  82. data/lib/cpee/implementation_callbacks.rb +60 -0
  83. data/lib/cpee/implementation_notifications.rb +6 -2
  84. data/server/handlerwrappers/default.rb +19 -3
  85. data/server/resources/transformation_dslx.xsl +5 -1
  86. data/server/routing/end.pid +1 -1
  87. data/server/routing/end.rb +1 -0
  88. data/server/routing/forward-events.pid +1 -1
  89. data/server/routing/forward-votes.pid +1 -1
  90. data/server/routing/forward-votes.rb +6 -5
  91. data/server/routing/persist.pid +1 -1
  92. data/server/routing/persist.rb +4 -4
  93. data/server/server.pid +1 -1
  94. metadata +24 -58
  95. data/cockpit/edit.html +0 -1
  96. data/cockpit/templates/.templates.xml +0 -13
  97. data/cockpit/themes/diana/rngs/alternative.rng +0 -25
  98. data/cockpit/themes/diana/rngs/call.rng +0 -149
  99. data/cockpit/themes/diana/rngs/callmanipulate.rng +0 -188
  100. data/cockpit/themes/diana/rngs/choose.rng +0 -14
  101. data/cockpit/themes/diana/rngs/closed_loop.rng +0 -62
  102. data/cockpit/themes/diana/rngs/closed_loop_cancel.rng +0 -5
  103. data/cockpit/themes/diana/rngs/closed_loop_control.rng +0 -31
  104. data/cockpit/themes/diana/rngs/closed_loop_measuring.rng +0 -12
  105. data/cockpit/themes/diana/rngs/critical.rng +0 -5
  106. data/cockpit/themes/diana/rngs/escape.rng +0 -1
  107. data/cockpit/themes/diana/rngs/group.rng +0 -3
  108. data/cockpit/themes/diana/rngs/loop.rng +0 -22
  109. data/cockpit/themes/diana/rngs/manipulate.rng +0 -9
  110. data/cockpit/themes/diana/rngs/otherwise.rng +0 -22
  111. data/cockpit/themes/diana/rngs/parallel.rng +0 -21
  112. data/cockpit/themes/diana/rngs/parallel_branch.rng +0 -8
  113. data/cockpit/themes/diana/rngs/scripts.rng +0 -23
  114. data/cockpit/themes/diana/rngs/stop.rng +0 -5
  115. data/cockpit/themes/diana/rngs/terminate.rng +0 -1
  116. data/cockpit/themes/diana/symbols/alternative.svg +0 -5
  117. data/cockpit/themes/diana/symbols/arrow.svg +0 -3
  118. data/cockpit/themes/diana/symbols/call.svg +0 -6
  119. data/cockpit/themes/diana/symbols/callmanipulate.svg +0 -8
  120. data/cockpit/themes/diana/symbols/choose.svg +0 -5
  121. data/cockpit/themes/diana/symbols/choose_exclusive.svg +0 -5
  122. data/cockpit/themes/diana/symbols/choose_inclusive.svg +0 -4
  123. data/cockpit/themes/diana/symbols/closed_loop.svg +0 -5
  124. data/cockpit/themes/diana/symbols/closed_loop_cancel.svg +0 -5
  125. data/cockpit/themes/diana/symbols/closed_loop_control.svg +0 -5
  126. data/cockpit/themes/diana/symbols/closed_loop_measuring.svg +0 -6
  127. data/cockpit/themes/diana/symbols/complex.svg +0 -8
  128. data/cockpit/themes/diana/symbols/critical.svg +0 -4
  129. data/cockpit/themes/diana/symbols/end.svg +0 -3
  130. data/cockpit/themes/diana/symbols/escape.svg +0 -5
  131. data/cockpit/themes/diana/symbols/event_end.svg +0 -3
  132. data/cockpit/themes/diana/symbols/loop.svg +0 -5
  133. data/cockpit/themes/diana/symbols/manipulate.svg +0 -4
  134. data/cockpit/themes/diana/symbols/otherwise.svg +0 -5
  135. data/cockpit/themes/diana/symbols/parallel.svg +0 -5
  136. data/cockpit/themes/diana/symbols/parallel_branch.svg +0 -5
  137. data/cockpit/themes/diana/symbols/parallel_branch_compact.svg +0 -4
  138. data/cockpit/themes/diana/symbols/parallel_branch_event.svg +0 -14
  139. data/cockpit/themes/diana/symbols/parallel_branch_normal.svg +0 -5
  140. data/cockpit/themes/diana/symbols/scripts.svg +0 -4
  141. data/cockpit/themes/diana/symbols/start.svg +0 -3
  142. data/cockpit/themes/diana/symbols/stop.svg +0 -5
  143. data/cockpit/themes/diana/symbols/terminate.svg +0 -4
  144. data/cockpit/themes/diana/theme.js +0 -1650
@@ -49,7 +49,6 @@ function do_main_work() { //{{{
49
49
  var origtype = orignode.attr('element-type') + '_' + orignode.attr('element-endpoint');
50
50
 
51
51
  var url = $('body').attr('current-instance');
52
- $('#main ui-tabbar ui-behind button').removeClass('highlight');
53
52
  save['details'].set_checkpoint();
54
53
 
55
54
  var nnew = $(save['details'].save().documentElement);
@@ -0,0 +1,32 @@
1
+ document.addEventListener('graph:changed', function (e) {
2
+ $("button[name=save]").prop("disabled",false);
3
+ }, false);
4
+ document.addEventListener('parameters:changed', function (e) {
5
+ $("button[name=save]").prop("disabled",false);
6
+ }, false);
7
+
8
+ $(document).ready(function() {
9
+ $("button[name=save]").click(function(){
10
+ var def = new $.Deferred();
11
+ def.done(function(name,testset) {
12
+ $.ajax({
13
+ url: $('body').attr('current-save') + ($('body').attr('current-save-dir') ? ($('body').attr('current-save-dir') + '/').replace(/\/+/,'/') : '') + name + '.xml',
14
+ type: 'PUT',
15
+ contentType: 'application/xml',
16
+ data: testset.serializePrettyXML(),
17
+ headers: { 'Content-ID': 'content' },
18
+ success: function() {
19
+ $("button[name=save]").prop("disabled",true);
20
+ $("#lastsavedline").removeClass('hidden');
21
+ var dt = new Date();
22
+ var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
23
+ $("#lastsaved").text(time);
24
+ },
25
+ error: function() {
26
+ alert('File was moved or deleted. Save testset to disk.');
27
+ }
28
+ });
29
+ });
30
+ get_testset(def);
31
+ });
32
+ });
@@ -82,7 +82,7 @@ var sub_less = 'topic' + '=' + 'activity' + '&' +// {{{
82
82
 
83
83
  function cockpit() { //{{{
84
84
  $("button[name=base]").click(function(){ create_instance($("input[name=base-url]").val(),null,false,false); });
85
- $("button[name=instance]").click(function(){ ui_activate_tab("#tabinstance"); monitor_instance($("input[name=instance-url]").val(),$("input[name=res-url]").val(),false,false); });
85
+ $("button[name=instance]").click(function(){ uidash_activate_tab("#tabinstance"); monitor_instance($("input[name=instance-url]").val(),$("input[name=res-url]").val(),false,false); });
86
86
  $("button[name=loadtestset]").click(function(e){new CustomMenu(e).menu($('#templates'),function(){ load_testset(false) } ); });
87
87
  $("button[name=loadtestsetfile]").click(load_testsetfile);
88
88
  $("button[name=loadmodelfile]").click(load_modelfile);
@@ -97,17 +97,23 @@ function cockpit() { //{{{
97
97
  $("input[name=modelfile]").change(load_modelfile_after);
98
98
 
99
99
  $.ajax({
100
- url: $('body').attr('current-templates') + ".templates.xml",
101
- dataType: 'xml',
100
+ url: $('body').attr('current-templates'),
101
+ dataType: 'json',
102
102
  success: function(res){
103
- $('testset',res).each(function(){
104
- var ts = $(this).text();
105
- $('#templates').append($("<div class='menuitem'></div>").text(ts));
103
+ $(res).each(function(){
104
+ if (this.type == 'file') {
105
+ $('#templates').append($("<div class='menuitem'></div>").text(this.name.replace(/\.xml/,'')));
106
+ }
106
107
  });
108
+ },
109
+ error: function() {
110
+ $("button[name=loadtestset]").attr('disabled','disabled');
111
+ },
112
+ complete: function() {
107
113
  var q = $.parseQuerySimple();
108
114
  if (q.min || q.min == "") {
109
- ui_toggle_vis_tab($('#instance'));
110
- ui_toggle_vis_tab($('#parameters'));
115
+ uidash_toggle_vis_tab($('#instance'));
116
+ uidash_toggle_vis_tab($('#parameters'));
111
117
  }
112
118
  if (q.monitor && q.load) {
113
119
  if (q.load.match(/https?:\/\//)) {
@@ -117,7 +123,7 @@ function cockpit() { //{{{
117
123
  if ($(v).text() == q.load) { $(v).attr('data-selected','selected'); }
118
124
  });
119
125
  }
120
- ui_activate_tab("#tabexecution");
126
+ uidash_activate_tab("#tabexecution");
121
127
  monitor_instance(q.monitor,$("body").attr('current-resources'),true,false);
122
128
  } else if (q.load) {
123
129
  if (q.load.match(/https?:\/\//)) {
@@ -127,20 +133,20 @@ function cockpit() { //{{{
127
133
  if ($(v).text() == q.load) { $(v).attr('data-selected','selected'); }
128
134
  });
129
135
  }
130
- ui_activate_tab("#tabexecution");
136
+ uidash_activate_tab("#tabexecution");
131
137
  create_instance($("body").attr('current-base'),q.load,true,false);
132
138
  } else if (q.instantiate) {
133
139
  if (q.instantiate.match(/https?:\/\//)) {
134
- ui_activate_tab("#tabexecution");
140
+ uidash_activate_tab("#tabexecution");
135
141
  create_instance_from($("body").attr('current-base'),q.instantiate,false);
136
142
  } else {
137
143
  alert('Nope. Url!');
138
144
  }
139
145
  } else if (q.new || q.new == "") {
140
- ui_activate_tab("#tabinstance");
146
+ uidash_activate_tab("#tabinstance");
141
147
  create_instance($("body").attr('current-base'),"Plain Instance",false,false);
142
148
  } else if (q.monitor) {
143
- ui_activate_tab("#tabexecution");
149
+ uidash_activate_tab("#tabinstance");
144
150
  monitor_instance(q.monitor,$("body").attr('current-resources'),false,false);
145
151
  } else if (q.exec) {
146
152
  if (q.exec.match(/https?:\/\//)) {
@@ -150,13 +156,13 @@ function cockpit() { //{{{
150
156
  if ($(v).text() == q.exec) { $(v).attr('data-selected','selected'); }
151
157
  });
152
158
  }
153
- ui_activate_tab("#tabexecution");
159
+ uidash_activate_tab("#tabexecution");
154
160
  create_instance($("body").attr('current-base'),q.exec,true,true);
155
161
  }
156
162
  }
157
163
  });
158
164
  $.ajax({
159
- url: $('body').attr('current-templates') + ".transformations.xml",
165
+ url: "transformations.xml",
160
166
  dataType: 'xml',
161
167
  success: function(res){
162
168
  $('transformation',res).each(function(){
@@ -323,7 +329,7 @@ function monitor_instance(cin,rep,load,exec) {// {{{
323
329
  $("input[name=instance-url]").val($("body").attr('current-instance'));
324
330
  $("input[name=res-url]").val($("body").attr('current-resources'));
325
331
 
326
- $('.tabbehind button').hide();
332
+ $('#parameters ui-content ui-area > button').attr('disabled','disabled');
327
333
  $('#dat_details').empty();
328
334
 
329
335
  url = $("body").attr('current-instance');
@@ -379,7 +385,7 @@ function monitor_instance(cin,rep,load,exec) {// {{{
379
385
  },
380
386
  error: function(a,b,c) {
381
387
  alert("This ain't no CPEE instance");
382
- ui_activate_tab("#tabnew");
388
+ uidash_activate_tab("#tabnew");
383
389
  }
384
390
  });
385
391
  }// }}}
@@ -628,8 +634,6 @@ function monitor_instance_state() {// {{{
628
634
  }// }}}
629
635
  function monitor_instance_transformation() {// {{{
630
636
  var url = $('body').attr('current-instance');
631
- console.log('hallo');
632
- console.log(url);
633
637
  $.ajax({
634
638
  type: "GET",
635
639
  url: url + "/properties/attributes/modeltype/",
@@ -658,17 +662,21 @@ function monitor_instance_pos() {// {{{
658
662
  function monitor_instance_running(content,event) {// {{{
659
663
  if (save['state'] == "stopping") return;
660
664
  if (event == "calling") {
661
- save['activity_states'][content.activity_uuid] = true
662
- format_visual_add(content.activity,"active")
663
- }
664
- if (event == "manipulating") {
665
- if (!save['activity_states'][content.activity_uuid]) {
665
+ if (!save['activity_states'][content['activity-uuid']]) {
666
+ save['activity_states'][content['activity-uuid']] = true
666
667
  format_visual_add(content.activity,"active")
667
668
  }
668
- }
669
- if (event == "done") {
670
- delete save['activity_states'][content.activity_uuid];
671
- format_visual_remove(content.activity,"active")
669
+ } else if (event == "manipulating") {
670
+ if (!save['activity_states'][content['activity-uuid']]) {
671
+ save['activity_states'][content['activity-uuid']] = true
672
+ format_visual_add(content.activity,"active")
673
+ }
674
+ } else if (event == "done") {
675
+ if (save['activity_states'][content['activity-uuid']]) {
676
+ save['activity_states'][content['activity-uuid']] = true
677
+ format_visual_remove(content.activity,"active")
678
+ setTimeout(() => {delete save['activity_states'][content['activity-uuid']]},5000);
679
+ }
672
680
  }
673
681
  } // }}}
674
682
  function monitor_instance_state_change(notification) { //{{{
@@ -718,13 +726,16 @@ function monitor_instance_state_change(notification) { //{{{
718
726
  // remove all markings with state change
719
727
  if (save['graph_adaptor'] && save['graph_adaptor'].illustrator) {
720
728
  save['graph_adaptor'].illustrator.get_elements().removeClass('marked');
729
+ localStorage.removeItem('marked');
730
+ localStorage.removeItem('marked_from');
721
731
  }
722
732
 
723
733
  if (notification != "ready" && notification != "stopped" && notification != "running") {
724
- $('.tabbehind button').hide();
734
+ console.log('rrr');
735
+ $('#parameters ui-content ui-area > button').attr('disabled','disabled');
725
736
  $('#state_any').hide();
726
737
  } else {
727
- $('#parameters .tabbehind button').show();
738
+ $('#parameters ui-content ui-area > button').removeAttr('disabled');
728
739
  $('#state_any').show();
729
740
  }
730
741
 
@@ -1004,7 +1015,11 @@ function load_testset(exec) {// {{{
1004
1015
  var name = $("#templates div.menuitem[data-selected=selected]").text();
1005
1016
  var url;
1006
1017
  if (name) {
1007
- url = $('body').attr('current-templates') + name + ".xml";
1018
+ if ($('body').attr('current-templates').match(/\?/)) {
1019
+ url = $('body').attr('current-templates').replace(/\?/,name + '.xml?');
1020
+ } else {
1021
+ url = $('body').attr('current-templates') + name + ".xml";
1022
+ }
1008
1023
  } else {
1009
1024
  if ($('body').attr('load-testset').length > 0) {
1010
1025
  url = $('body').attr('load-testset');
@@ -1017,7 +1032,6 @@ function load_testset(exec) {// {{{
1017
1032
  url: url,
1018
1033
  success: function(res){
1019
1034
  save['dsl'] = null; // reload dsl and position under all circumstances
1020
- $('#main .tabbehind button').hide();
1021
1035
  $('#dat_details').empty();
1022
1036
 
1023
1037
  document.title = "Untitled";
@@ -1038,7 +1052,7 @@ function load_modeltype() {// {{{
1038
1052
  $.ajax({
1039
1053
  cache: false,
1040
1054
  dataType: 'xml',
1041
- url: $('body').attr('current-templates') + "." + name + ".xml",
1055
+ url: name + ".xml",
1042
1056
  success: function(res){
1043
1057
  $.ajax({
1044
1058
  type: "PUT",
@@ -1201,8 +1215,10 @@ function format_visual_vote_clear() {//{{{
1201
1215
 
1202
1216
  function format_instance_pos() { //{{{
1203
1217
  $(save['instance_pos']).each(function(){
1204
- var what = this.nodeName;
1205
- format_visual_add(what,save['state'] == 'running' ? 'active' : 'passive');
1218
+ console.log(this);
1219
+ var taskname = this.nodeName;
1220
+ var taskstate = this.textContent;
1221
+ format_visual_add(taskname,save['state'] == 'running' ? (taskstate == 'at' ? 'active' : 'passive') : 'passive');
1206
1222
  });
1207
1223
  } //}}}
1208
1224
 
data/cockpit/js/model.js CHANGED
@@ -1,41 +1,11 @@
1
- document.addEventListener('graph:changed', function (e) {
2
- $("button[name=save]").prop("disabled",false);
3
- }, false);
4
-
5
1
  $(document).ready(function() {
6
- $('#tabmodel').click(function(event){
7
- $('#model ui-behind button:nth-child(1)').addClass('hidden');
8
- });
9
- $('#tabdataelements').click(function(event){
10
- $('#model ui-behind button:nth-child(1)').removeClass('hidden');
11
- });
12
-
13
- $('#model ui-behind button:nth-child(1)').click(function(event){
14
- var but = $(document).find('#model ui-content ui-area:not(.inactive) button');
2
+ $('#model ui-content ui-area > button').click(function(event){
3
+ var but = $(document).find('#model ui-content ui-area:not(.inactive) > div button');
15
4
  but.click();
16
- var are = $(document).find('#model ui-content ui-area:not(.inactive)');
17
- var tab = $(document).find('#model ui-content ui-area:not(.inactive) .relaxngui_table');
5
+ var inp = $(document).find('#model ui-content ui-area:not(.inactive) > div input');
6
+ $(inp[inp.length-2]).focus();
7
+ var are = $(document).find('#model ui-content ui-area:not(.inactive) > div');
8
+ var tab = $(document).find('#model ui-content ui-area:not(.inactive) > div > div');
18
9
  are.animate({ scrollTop: tab.height() }, "slow");
19
10
  });
20
-
21
- $("button[name=save]").click(function(){
22
- var def = new $.Deferred();
23
- def.done(function(name,testset) {
24
- $.ajax({
25
- url: $('body').attr('current-save') + ($('body').attr('current-save-dir') ? ($('body').attr('current-save-dir') + '/').replace(/\/+/,'/') : '') + name + '.xml',
26
- type: 'PUT',
27
- contentType: 'application/xml',
28
- data: testset.serializePrettyXML(),
29
- headers: { 'Content-ID': 'content' },
30
- success: function() {
31
- $("button[name=save]").prop("disabled",true);
32
- $("#lastsavedline").removeClass('hidden');
33
- var dt = new Date();
34
- var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
35
- $("#lastsaved").text(time);
36
- }
37
- });
38
- });
39
- get_testset(def);
40
- });
41
11
  });
@@ -1,3 +1,5 @@
1
+ var parameters_changed = new Event("parameters:changed", {"bubbles":true, "cancelable":false});
2
+
1
3
  $(document).ready(function() {
2
4
  // hook up dataelements with relaxngui //{{{
3
5
  $.ajax({
@@ -28,11 +30,13 @@ $(document).ready(function() {
28
30
  }); //}}}
29
31
 
30
32
  // new entry //{{{
31
- $('#parameters ui-behind button:nth-child(1)').click(function(event){
32
- var but = $(document).find('#parameters ui-content ui-area:not(.inactive) button');
33
+ $('#parameters ui-content ui-area > button').click(function(event){
34
+ var but = $(document).find('#parameters ui-content ui-area:not(.inactive) > div button');
33
35
  but.click();
34
- var are = $(document).find('#parameters ui-content ui-area:not(.inactive)');
35
- var tab = $(document).find('#parameters ui-content ui-area:not(.inactive) .relaxngui_table');
36
+ var inp = $(document).find('#parameters ui-content ui-area:not(.inactive) > div input');
37
+ $(inp[inp.length-2]).focus();
38
+ var are = $(document).find('#parameters ui-content ui-area:not(.inactive) > div');
39
+ var tab = $(document).find('#parameters ui-content ui-area:not(.inactive) > div > div');
36
40
  are.animate({ scrollTop: tab.height() }, "slow");
37
41
  }); //}}}
38
42
 
@@ -68,6 +72,7 @@ function do_parameters_save(event) { //{{{
68
72
  var url = $('body').attr('current-instance');
69
73
  save[visid].set_checkpoint();
70
74
  var send = save[visid].save_text();
75
+ document.dispatchEvent(parameters_changed);
71
76
  $.ajax({
72
77
  type: "PUT",
73
78
  url: url + "/properties/" + visid + "/",
data/cockpit/js/ui.js CHANGED
@@ -102,3 +102,10 @@ $(document).on('paste', '[contenteditable]', function (e) {
102
102
  document.execCommand('insertText', false, content);
103
103
  }
104
104
  });
105
+
106
+ // unmark if storage changes. shit has potentially been copied or marked in other tabs.
107
+ $(window).bind('storage', function (e) {
108
+ if (localStorage.getItem('marked_from') != myid) {
109
+ save['graph_adaptor'].illustrator.get_elements().removeClass('marked');
110
+ }
111
+ });
data/cockpit/model.html CHANGED
@@ -36,11 +36,11 @@
36
36
 
37
37
  <script type="text/javascript" src="/js_libs/relaxngui.js"></script>
38
38
 
39
- <script type="text/javascript" src="/js_libs/ui.js"></script>
39
+ <script type="text/javascript" src="/js_libs/uidash.js"></script>
40
40
  <script type="text/javascript" src="/js_libs/custommenu.js"></script>
41
41
 
42
42
  <link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
43
- <link rel="stylesheet" href="/js_libs/ui.css" type="text/css"/>
43
+ <link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
44
44
 
45
45
  <link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
46
46
 
@@ -54,6 +54,7 @@
54
54
  <script type="text/javascript" src="js/details.js"></script>
55
55
  <script type="text/javascript" src="js/parameters.js"></script>
56
56
  <script type="text/javascript" src="js/model.js"></script>
57
+ <script type="text/javascript" src="js/edit.js"></script>
57
58
  <link rel="stylesheet" href="css/ui.css" type="text/css"/>
58
59
  <link rel="stylesheet" href="css/model.css" type="text/css"/>
59
60
  <link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
@@ -62,7 +63,7 @@
62
63
  /* shit balls, no elegance is left in this world */
63
64
  </style>
64
65
  </head>
65
- <body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui">
66
+ <body data-base-port="8298" data-res-port="9303" data-theme-base="themes" is="x-ui-">
66
67
  <div id='disclaimer' class='hidden'> <!--{{{-->
67
68
  <h1>Disclaimer</h1>
68
69
 
@@ -160,6 +161,7 @@
160
161
  </div>
161
162
  </ui-area> <!--}}}-->
162
163
  <ui-area data-belongs-to-tab="dataelements" id="areadataelements" class="inactive"> <!--{{{-->
164
+ <button title='add entry'><span>New</span></button>
163
165
  <div id="dat_dataelements"></div>
164
166
  </ui-area> <!--}}}-->
165
167
  </ui-content>
data/cockpit/replay.html CHANGED
@@ -36,14 +36,15 @@
36
36
  <script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
37
37
  <script type="text/javascript" src="/js_libs/js-yaml.min.js"></script>
38
38
 
39
- <script type="text/javascript" src="/js_libs/ui.js"></script>
39
+ <script type="text/javascript" src="/js_libs/uidash.js"></script>
40
+ <link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
40
41
 
41
42
  <!-- custom stuff, play arround -->
42
43
  <script type="text/javascript" src="js/replay.js"></script>
43
44
  <link rel="stylesheet" href="css/ui.css" type="text/css"/>
44
45
  <link rel="stylesheet" href="css/replay.css" type="text/css"/>
45
46
  </head>
46
- <body is="x-ui">
47
+ <body is="x-ui-">
47
48
  <div id="replayer">
48
49
  <div id="replay"><span>Replay:</span><input type="text" value="http://localhost/logs/4b92138d-1f68-4d18-b676-92fb1cbe2c78.xes.yaml"/><button>Prepare!</button></div>
49
50
  <iframe id="content" src=""></iframe>
@@ -73,4 +73,4 @@ data.costs += result.value('costs').to_f</finalize>
73
73
  <dataelements type="rest"/>
74
74
  <endpoints type="rest"/>
75
75
  </transformation>
76
- </testset>
76
+ </testset>
@@ -74,4 +74,4 @@
74
74
  <dataelements type="rest"/>
75
75
  <endpoints type="rest"/>
76
76
  </transformation>
77
- </testset>
77
+ </testset>
@@ -74,4 +74,4 @@
74
74
  <dataelements type="rest"/>
75
75
  <endpoints type="rest"/>
76
76
  </transformation>
77
- </testset>
77
+ </testset>
@@ -74,4 +74,4 @@
74
74
  <dataelements type="rest"/>
75
75
  <endpoints type="rest"/>
76
76
  </transformation>
77
- </testset>
77
+ </testset>
@@ -73,10 +73,14 @@
73
73
  <endpoints type="none"/>
74
74
  </transformation>
75
75
  <attributes>
76
- <info>Track Test</info>
76
+ <info>Track Test Local</info>
77
77
  <modeltype>CPEE</modeltype>
78
78
  <theme>default</theme>
79
79
  <customer>pilotfabrik</customer>
80
80
  <status>development</status>
81
+ <creator>Christine Ashcreek</creator>
82
+ <author>Christine Ashcreek</author>
83
+ <design_stage>development</design_stage>
84
+ <design_dir>/home/demo/Projects/cpee/cockpit/templates</design_dir>
81
85
  </attributes>
82
- </testset>
86
+ </testset>
@@ -78,5 +78,9 @@
78
78
  <theme>default</theme>
79
79
  <customer>pilotfabrik</customer>
80
80
  <status>development</status>
81
+ <creator>Christine Ashcreek</creator>
82
+ <author>Christine Ashcreek</author>
83
+ <design_stage>development</design_stage>
84
+ <design_dir>/home/demo/Projects/cpee/cockpit/templates</design_dir>
81
85
  </attributes>
82
- </testset>
86
+ </testset>