cpee 1.3.209 → 1.3.211
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +5 -5
- data/cockpit/contrib/transformation1.xsl +9 -9
- data/cockpit/index.html +6 -4
- data/cockpit/js/details.js +54 -56
- data/cockpit/js/instance.js +15 -5
- data/cockpit/js/parameters.js +28 -28
- data/cockpit/js/wfadaptor.js +32 -16
- data/cockpit/testsets/Centurio.xml +72 -0
- data/cockpit/testsets/Lego Plate.xml +1 -1
- data/cockpit/testsets/Lego Transporter.xml +11 -147
- data/cockpit/testsets/Linear.xml +3 -0
- data/cockpit/testsets/Syncing P34 1.xml +9 -1
- data/cockpit/testsets/Syncing P34 2.xml +9 -1
- data/cockpit/testsets/Syncing P34 3.xml +9 -1
- data/cockpit/testsets/Syncing P34.xml +9 -1
- data/cockpit/testsets/testsets.xml +1 -0
- data/cockpit/themes/default/theme.js +22 -21
- data/cockpit/themes/labels/theme.js +786 -0
- data/cpee.gemspec +4 -2
- data/lib/cpee/controller.rb +0 -5
- data/server/handlerwrappers/default.rb +9 -15
- data/server/handlerwrappers/soap.rb +10 -10
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/consumer-secret +1 -0
- data/server/instances/10/notifications/182434032285ca1d06a8b6554b8889c8/producer-secret +1 -0
- data/server/instances/{6/notifications/0e9f3728f00c0562870110697bd8819c → 10/notifications/182434032285ca1d06a8b6554b8889c8}/subscription.xml +6 -21
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/consumer-secret +1 -0
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/producer-secret +1 -0
- data/server/instances/10/notifications/512a3785631a5245dbb45fa150ea72ed/subscription.xml +6 -0
- data/server/instances/10/properties.xml +187 -0
- data/server/instances/11/properties.xml +191 -0
- data/server/instances/12/properties.xml +191 -0
- data/server/instances/13/properties.xml +204 -0
- data/server/instances/14/properties.xml +31 -0
- data/server/instances/15/properties.xml +30 -0
- data/server/instances/16/properties.xml +29 -0
- data/server/instances/17/properties.xml +29 -0
- data/server/instances/18/properties.xml +31 -0
- data/server/instances/19/properties.xml +31 -0
- data/server/instances/20/properties.xml +191 -0
- data/server/instances/7/properties.xml +120 -0
- data/server/instances/8/properties.xml +118 -0
- data/server/instances/9/properties.xml +120 -0
- data/test/callback.rb +2 -2
- data/tools/cpee +38 -0
- data/tools/server/resources/notifications/logging/consumer-secret +1 -0
- data/tools/server/resources/notifications/logging/producer-secret +1 -0
- data/tools/server/resources/notifications/logging/subscription.xml +7 -0
- data/tools/server/resources/properties.init +47 -0
- data/tools/server/server.rb +14 -0
- metadata +33 -7
- data/server/instances/6/notifications/0e9f3728f00c0562870110697bd8819c/consumer-secret +0 -1
- data/server/instances/6/notifications/0e9f3728f00c0562870110697bd8819c/producer-secret +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9dfbc4a7336bc2c8c2362dcbf908e405513651b
|
4
|
+
data.tar.gz: 1a598ec52063b0be720385d56ad43a6a34a5675b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51fa98d57404c06840e661579968c1972320fa78c164e972a2d3d29c85a8fc2aeff9ecc82b397b4a093e1d6acc76e025cdf5f97989f97492255e5eb4daa1804c
|
7
|
+
data.tar.gz: c44f85f3d3596ffc9fb9c8b70d3ee1570a37c0a8121e156d3b67c00485a8a2b265a0e316604f7dca675850594c413eb05db20c18fe488e847aa2f77c65116dda
|
data/Rakefile
CHANGED
@@ -18,15 +18,15 @@ end
|
|
18
18
|
|
19
19
|
task :push => :gem do |r|
|
20
20
|
`gem push pkg/cpee.gem`
|
21
|
-
end
|
21
|
+
end
|
22
22
|
|
23
23
|
task :install => :gem do |r|
|
24
|
-
`
|
25
|
-
end
|
24
|
+
`gem install pkg/cpee.gem`
|
25
|
+
end
|
26
26
|
|
27
27
|
desc "Clean instances"
|
28
28
|
task :clean do
|
29
29
|
Dir.glob("server/instances/*").collect{ |i| i if i =~ /\/\d+$/ }.compact.each do |i|
|
30
|
-
rm_rf i if File.exists?(i)
|
30
|
+
rm_rf i if File.exists?(i)
|
31
31
|
end
|
32
|
-
end
|
32
|
+
end
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<xsl:template match="//d:description">
|
11
11
|
<xsl:apply-templates>
|
12
12
|
<xsl:with-param name="myspace"><xsl:value-of select="-1*$myspacemultiplier"/></xsl:with-param>
|
13
|
-
</xsl:apply-templates>
|
13
|
+
</xsl:apply-templates>
|
14
14
|
</xsl:template>
|
15
15
|
|
16
16
|
<xsl:template match="*">
|
@@ -20,7 +20,7 @@
|
|
20
20
|
<xsl:with-param name="count"><xsl:value-of select="$myspace+$myspacemultiplier"/></xsl:with-param>
|
21
21
|
</xsl:call-template>
|
22
22
|
<xsl:if test="name()='call' or name()='manipulate'">
|
23
|
-
<xsl:choose>
|
23
|
+
<xsl:choose>
|
24
24
|
<xsl:when test="@lay">
|
25
25
|
<xsl:text>activity [:</xsl:text>
|
26
26
|
<xsl:value-of select="@id"/>
|
@@ -106,7 +106,7 @@
|
|
106
106
|
<xsl:call-template name="print-newline"/>
|
107
107
|
</xsl:if>
|
108
108
|
</xsl:template>
|
109
|
-
|
109
|
+
|
110
110
|
<xsl:template match="d:alternative">
|
111
111
|
<xsl:param name="myspace"/>
|
112
112
|
<xsl:call-template name="print-space">
|
@@ -179,12 +179,12 @@
|
|
179
179
|
<xsl:template match="d:parameters">
|
180
180
|
<xsl:apply-templates select="d:*" mode="parameter"/>
|
181
181
|
</xsl:template>
|
182
|
-
|
182
|
+
|
183
183
|
<xsl:template match="d:*" mode="parameter">
|
184
184
|
<xsl:text>, :</xsl:text>
|
185
185
|
<xsl:value-of select="name()"/>
|
186
186
|
<xsl:text> => </xsl:text>
|
187
|
-
<xsl:choose>
|
187
|
+
<xsl:choose>
|
188
188
|
<xsl:when test="count(*) > 0">
|
189
189
|
<xsl:text>[</xsl:text>
|
190
190
|
<xsl:apply-templates select="d:*" mode="sub-parameter"/>
|
@@ -195,23 +195,23 @@
|
|
195
195
|
<xsl:value-of select="text()"/>
|
196
196
|
<xsl:text>"</xsl:text>
|
197
197
|
</xsl:otherwise>
|
198
|
-
</xsl:choose>
|
198
|
+
</xsl:choose>
|
199
199
|
</xsl:template>
|
200
|
-
|
200
|
+
|
201
201
|
<xsl:template match="d:*" mode="sub-parameter">
|
202
202
|
<xsl:text> { :</xsl:text>
|
203
203
|
<xsl:value-of select="name()"/>
|
204
204
|
<xsl:text> => </xsl:text>
|
205
205
|
<xsl:value-of select="text()"/>
|
206
206
|
<xsl:text> }</xsl:text>
|
207
|
-
<xsl:choose>
|
207
|
+
<xsl:choose>
|
208
208
|
<xsl:when test=". = ../*[last()]">
|
209
209
|
<xsl:text> </xsl:text>
|
210
210
|
</xsl:when>
|
211
211
|
<xsl:otherwise>
|
212
212
|
<xsl:text>,</xsl:text>
|
213
213
|
</xsl:otherwise>
|
214
|
-
</xsl:choose>
|
214
|
+
</xsl:choose>
|
215
215
|
</xsl:template>
|
216
216
|
|
217
217
|
<xsl:template match="d:manipulate" mode="part-of-call">
|
data/cockpit/index.html
CHANGED
@@ -189,7 +189,9 @@
|
|
189
189
|
<ui-area data-belongs-to-tab="instance" id="areainstance" class="inactive"> <!--{{{-->
|
190
190
|
<div class='section'>
|
191
191
|
<div>
|
192
|
-
<
|
192
|
+
<form id='fuckchrome'>
|
193
|
+
<input type='file' name='testsetfile' id='testsetfile'/>
|
194
|
+
</form>
|
193
195
|
<button title='a testset includes various setting, subscriptions and a model' name="loadtestset">load predefined testset</button><button title='a testset includes various setting, subscriptions and a model' name="loadtestsetfile">load testset file</button>
|
194
196
|
</div>
|
195
197
|
<div>
|
@@ -220,7 +222,7 @@
|
|
220
222
|
</tbody>
|
221
223
|
<tbody class='exe'>
|
222
224
|
<tr>
|
223
|
-
<td>
|
225
|
+
<td>State:</td>
|
224
226
|
<td id='state'></td>
|
225
227
|
</tr>
|
226
228
|
<tr>
|
@@ -239,7 +241,7 @@
|
|
239
241
|
<ui-tab class="" data-tab="dataelements" id="tabdataelements">Data Elements</ui-tab>
|
240
242
|
<ui-tab class="inactive" data-tab="endpoints" id="tabendpoints" >Endpoints</ui-tab>
|
241
243
|
<ui-tab class="inactive" data-tab="attributes" id="tabattributes" >Attributes</ui-tab>
|
242
|
-
<ui-behind ><button title='
|
244
|
+
<ui-behind ><button title='add entry'>New</button></ui-behind>
|
243
245
|
</ui-tabbar>
|
244
246
|
<ui-content>
|
245
247
|
<ui-area data-belongs-to-tab="dataelements" id="areadataelements"> <!--{{{-->
|
@@ -262,7 +264,7 @@
|
|
262
264
|
<ui-tab class="" data-tab="details" id="tabdetails">Graph</ui-tab>
|
263
265
|
<ui-tab class="inactive" data-tab="dsl" id="tabdsl" >Description</ui-tab>
|
264
266
|
<ui-tab class="inactive" data-tab="log" id="tablog" >Log</ui-tab>
|
265
|
-
<ui-behind
|
267
|
+
<ui-behind ></ui-behind>
|
266
268
|
</ui-tabbar>
|
267
269
|
<ui-content>
|
268
270
|
<ui-area data-belongs-to-tab="details" id='graphcolumn'>
|
data/cockpit/js/details.js
CHANGED
@@ -1,65 +1,63 @@
|
|
1
1
|
$(document).ready(function() {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
2
|
+
var timer;
|
3
|
+
|
4
|
+
$(document).on('input','#dat_details input, #dat_details textarea',function(e){
|
5
|
+
clearTimeout(timer);
|
6
|
+
timer = setTimeout(do_main_save, 5000);
|
7
|
+
});
|
8
|
+
$(document).on('change','#dat_details select',function(e){
|
9
|
+
clearTimeout(timer);
|
10
|
+
do_main_save();
|
11
|
+
});
|
12
|
+
$(document).on('blur','#dat_details input, #dat_details textarea',function(e){
|
13
|
+
clearTimeout(timer);
|
14
|
+
do_main_save();
|
15
|
+
});
|
16
|
+
$(document).on('keypress','#dat_details input',function(e){
|
17
|
+
if (e.keyCode == 13) {
|
18
|
+
clearTimeout(timer);
|
19
|
+
do_main_save();
|
15
20
|
}
|
16
|
-
});
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
var desc = save[visid + '_target'].model;
|
23
|
-
var node = desc.get_node_by_svg_id(svgid);
|
24
|
-
|
25
|
-
var url = $("#current-instance").text();
|
26
|
-
$('#main ui-tabbar ui-behind button').removeClass('highlight');
|
27
|
-
save['details'].set_checkpoint();
|
28
|
-
|
29
|
-
// pull out xml and add XMLNS
|
30
|
-
// sadly we have to serialze, add in string and then parse again
|
31
|
-
// as adding namespaces to nodes is not supported
|
32
|
-
// serialization and reparsing is faster and more robust than xslt option
|
33
|
-
var nnew = $(save['details'].save().documentElement);
|
34
|
-
nnew.attr('svg-id',svgid);
|
35
|
-
nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
|
36
|
-
|
37
|
-
if ($('*[svg-id]',node).length > 0) {
|
38
|
-
// TODO maybe not all children. Maybe only thingies that have svg-id but nothing with svg-id between it and node.
|
39
|
-
nnew.append(node.children());
|
40
|
-
}
|
41
|
-
|
42
|
-
var ntxt = nnew.serializeXML();
|
43
|
-
ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
|
21
|
+
});
|
22
|
+
$(document).on('relaxngui_remove', '#dat_details', function(e){
|
23
|
+
clearTimeout(timer);
|
24
|
+
do_main_save();
|
25
|
+
});
|
26
|
+
});
|
44
27
|
|
45
|
-
|
28
|
+
function do_main_save() { //{{{
|
29
|
+
if (save['details'].has_changed()) {
|
30
|
+
var visid = 'details';
|
31
|
+
var svgid = save[visid + '_target'].svgid;
|
32
|
+
var desc = save[visid + '_target'].model;
|
33
|
+
var node = desc.get_node_by_svg_id(svgid);
|
46
34
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
35
|
+
var url = $("#current-instance").text();
|
36
|
+
$('#main ui-tabbar ui-behind button').removeClass('highlight');
|
37
|
+
save['details'].set_checkpoint();
|
38
|
+
|
39
|
+
// pull out xml and add XMLNS
|
40
|
+
// sadly we have to serialze, add in string and then parse again
|
41
|
+
// as adding namespaces to nodes is not supported
|
42
|
+
// serialization and reparsing is faster and more robust than xslt option
|
43
|
+
var nnew = $(save['details'].save().documentElement);
|
44
|
+
nnew.attr('svg-id',svgid);
|
45
|
+
nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
|
46
|
+
|
47
|
+
if ($('*[svg-id]',node).length > 0) {
|
48
|
+
// TODO maybe not all children. Maybe only thingies that have svg-id but nothing with svg-id between it and node.
|
49
|
+
nnew.append(node.children());
|
52
50
|
}
|
53
|
-
}); //}}}
|
54
51
|
|
55
|
-
|
56
|
-
|
57
|
-
});
|
52
|
+
var ntxt = nnew.serializeXML();
|
53
|
+
ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
|
58
54
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
55
|
+
node.replaceWith($X(ntxt));
|
56
|
+
|
57
|
+
$.ajax({
|
58
|
+
type: "PUT",
|
59
|
+
url: url + "/properties/values/description/",
|
60
|
+
data: ({'content': '<content>' + desc.get_description() + '</content>'})
|
61
|
+
});
|
64
62
|
}
|
65
63
|
} //}}}
|
data/cockpit/js/instance.js
CHANGED
@@ -56,7 +56,12 @@ var sub_less = 'topic' + '=' + 'activity' + '&' +// {{{
|
|
56
56
|
'events' + '=' + 'change';// }}}
|
57
57
|
|
58
58
|
$(document).ready(function() {// {{{
|
59
|
-
|
59
|
+
console.log(location.protocol);
|
60
|
+
if (location.protocol.match(/^file/)) {
|
61
|
+
$("input[name=base-url]").val("http://localhost:" + $('body').data('defaultport'));
|
62
|
+
} else {
|
63
|
+
$("input[name=base-url]").val(location.protocol + "//" + location.host + ":" + $('body').data('defaultport'));
|
64
|
+
}
|
60
65
|
$("button[name=base]").click(function(){ create_instance(null,false); });
|
61
66
|
$("button[name=instance]").click(function(){ ui_activate_tab("#tabinstance"); monitor_instance(false,false); });
|
62
67
|
$("button[name=loadtestset]").click(function(e){new CustomMenu(e).menu($('#predefinedtestsets'),function(){ load_testset(false) } ); });
|
@@ -78,6 +83,10 @@ $(document).ready(function() {// {{{
|
|
78
83
|
$('#predefinedtestsets').append($("<div class='menuitem'></div>").text(ts));
|
79
84
|
});
|
80
85
|
var q = $.parseQuerySimple();
|
86
|
+
if (q.min || q.min == "") {
|
87
|
+
ui_toggle_vis_tab($('#instance ui-tabbar'));
|
88
|
+
ui_toggle_vis_tab($('#parameters ui-tabbar'));
|
89
|
+
}
|
81
90
|
if (q.monitor && q.load) {
|
82
91
|
$("input[name=instance-url]").val(q.monitor);
|
83
92
|
$("#predefinedtestsets div.menuitem").each(function(k,v){
|
@@ -194,7 +203,8 @@ function monitor_instance(load,exec) {// {{{
|
|
194
203
|
$("#current-instance-subscriptions").text('S');
|
195
204
|
$("#current-instance-callbacks").attr('href',url + 'callbacks/');
|
196
205
|
$("#current-instance-callbacks").text('C');
|
197
|
-
|
206
|
+
var q = $.parseQuerySimple();
|
207
|
+
history.replaceState({}, '', '?' + (q.min || q.min=="" ? "min&" : "") + 'monitor='+url);
|
198
208
|
|
199
209
|
// Change url to return to current instance when reloading (because new subscription is made)
|
200
210
|
$("input[name=votecontinue]").removeAttr('checked');
|
@@ -597,7 +607,6 @@ function save_svg() {// {{{
|
|
597
607
|
});
|
598
608
|
}// }}}
|
599
609
|
function set_testset(testset,exec) {// {{{
|
600
|
-
console.log(exec);
|
601
610
|
var url = $("#current-instance").text();
|
602
611
|
|
603
612
|
$.ajax({
|
@@ -669,10 +678,11 @@ function load_testsetfile_after() { //{{{
|
|
669
678
|
var reader = new FileReader();
|
670
679
|
reader.onload = function(){
|
671
680
|
set_testset($.parseXML(reader.result),false);
|
681
|
+
document.getElementById("fuckchrome").reset();
|
672
682
|
running = false;
|
673
683
|
}
|
674
|
-
reader.onerror = function(){ running = false; }
|
675
|
-
reader.onabort = function(){ running = false; }
|
684
|
+
reader.onerror = function(){ console.log('error reading file'); running = false; }
|
685
|
+
reader.onabort = function(){ console.log('abort reading file'); running = false; }
|
676
686
|
reader.readAsText(files[0]);
|
677
687
|
} //}}}
|
678
688
|
function load_testsetfile() {// {{{
|
data/cockpit/js/parameters.js
CHANGED
@@ -27,26 +27,6 @@ $(document).ready(function() {
|
|
27
27
|
}
|
28
28
|
}); //}}}
|
29
29
|
|
30
|
-
// color of save button when changeing tabs //{{{
|
31
|
-
$('#parameters ui-tabbar ui-tab:not(.switch)').click(function(event){
|
32
|
-
highlight_save_button(event);
|
33
|
-
}); //}}}
|
34
|
-
|
35
|
-
// save entries //{{{
|
36
|
-
$('#parameters ui-behind button:nth-child(2)').click(function(event){
|
37
|
-
var visid = $('ui-tabbar ui-tab',$(event.target).parents('ui-tabbed')).not('.switch').not('.inactive').attr('data-tab');
|
38
|
-
if (save[visid].has_changed()) {
|
39
|
-
var url = $("#current-instance").text();
|
40
|
-
$('#parameters ui-tabbar ui-behind button:nth-child(2)').removeClass('highlight');
|
41
|
-
save[visid].set_checkpoint();
|
42
|
-
$.ajax({
|
43
|
-
type: "PUT",
|
44
|
-
url: url + "/properties/values/" + visid + "/",
|
45
|
-
data: ({'content': save[visid].save_text()}),
|
46
|
-
});
|
47
|
-
}
|
48
|
-
}); //}}}
|
49
|
-
|
50
30
|
// new entry //{{{
|
51
31
|
$('#parameters ui-behind button:nth-child(1)').click(function(event){
|
52
32
|
var but = $(document).find('#parameters ui-content ui-area:not(.inactive) button');
|
@@ -56,17 +36,37 @@ $(document).ready(function() {
|
|
56
36
|
are.animate({ scrollTop: tab.height() }, "slow");
|
57
37
|
}); //}}}
|
58
38
|
|
59
|
-
|
60
|
-
|
61
|
-
|
39
|
+
var timer;
|
40
|
+
// when input in one of the inputs, save
|
41
|
+
$(document).on('input','#dat_dataelements input, #dat_endpoints input, #dat_attributes input',function(event){
|
42
|
+
clearTimeout(timer);
|
43
|
+
timer = setTimeout(function(){ do_parameters_save(event); }, 5000);
|
44
|
+
});
|
45
|
+
$(document).on('blur','#dat_dataelements input, #dat_endpoints input, #dat_attributes input',function(event){
|
46
|
+
clearTimeout(timer);
|
47
|
+
do_parameters_save(event);
|
48
|
+
}); //}}}
|
49
|
+
$(document).on('keypress','#dat_dataelements input, #dat_endpoints input, #dat_attributes input',function(event){
|
50
|
+
if (event.keyCode == 13) {
|
51
|
+
clearTimeout(timer);
|
52
|
+
do_parameters_save(event);
|
53
|
+
}
|
62
54
|
}); //}}}
|
55
|
+
$(document).on('relaxngui_remove', '#dat_dataelements, #dat_endpoints, #dat_attributes', function(event){
|
56
|
+
clearTimeout(timer);
|
57
|
+
do_parameters_save(event);
|
58
|
+
});
|
63
59
|
});
|
64
60
|
|
65
|
-
function
|
61
|
+
function do_parameters_save(event) { //{{{
|
66
62
|
var visid = $('ui-tabbar ui-tab',$(event.target).parents('ui-tabbed')).not('.switch').not('.inactive').attr('data-tab');
|
67
63
|
if (save[visid].has_changed()) {
|
68
|
-
$(
|
69
|
-
|
70
|
-
|
64
|
+
var url = $("#current-instance").text();
|
65
|
+
save[visid].set_checkpoint();
|
66
|
+
$.ajax({
|
67
|
+
type: "PUT",
|
68
|
+
url: url + "/properties/values/" + visid + "/",
|
69
|
+
data: ({'content': save[visid].save_text()}),
|
70
|
+
});
|
71
71
|
}
|
72
|
-
}
|
72
|
+
} //}}}
|
data/cockpit/js/wfadaptor.js
CHANGED
@@ -59,6 +59,7 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
59
59
|
$.getScript(theme_base, function() {
|
60
60
|
manifestation = new WFAdaptorManifestation(self);
|
61
61
|
illustrator.noarrow = manifestation.noarrow;
|
62
|
+
illustrator.compact = manifestation.compact == true ? true : false;
|
62
63
|
description.source = manifestation.source;
|
63
64
|
var deferreds = [];
|
64
65
|
// copy parent stuff
|
@@ -135,6 +136,7 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
135
136
|
this.elements = {}; // the svgs
|
136
137
|
this.svg = {};
|
137
138
|
this.draw = {};
|
139
|
+
this.compact = true;
|
138
140
|
// private
|
139
141
|
var self = this;
|
140
142
|
var adaptor = null;
|
@@ -226,31 +228,38 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
226
228
|
);
|
227
229
|
} else if (end['row']-start['row'] > 0) { // downwards
|
228
230
|
if (end['col']-start['col'] > 0) {// left - right
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
231
|
+
if (self.compact) {
|
232
|
+
line.attr("d", "M " + String(start['col']*self.width) + "," + String(start['row']*self.height-15) +" "+
|
233
|
+
String(start['col']*self.width+14) + "," + String((end['row']-1)*self.height) +" "+ // first turn of hotizontal-line going away from node
|
234
|
+
String(end['col']*self.width) + "," + String((end['row']-1)*self.height) +" "+
|
235
|
+
String(end['col']*self.width) + "," + String(end['row']*self.height-15)
|
236
|
+
);
|
237
|
+
} else {
|
238
|
+
line.attr("d", "M " + String(start['col']*self.width) + "," + String(start['row']*self.height-15) +" "+
|
239
|
+
String(end['col']*self.width) + "," + String(start['row']*self.height-15) +" "+
|
240
|
+
String(end['col']*self.width) + "," + String(end['row']*self.height-15)
|
241
|
+
);
|
242
|
+
}
|
234
243
|
} else { // right - left
|
235
244
|
line.attr("d", "M " + String(start['col']*self.width) + "," + String(start['row']*self.height-15) +" "+
|
236
|
-
|
237
|
-
|
238
|
-
|
245
|
+
String(start['col']*self.width) + "," + String(end['row']*self.height-35) +" "+
|
246
|
+
String(end['col']*self.width+14) + "," + String(end['row']*self.height-35) +" "+ // last turn of horizontal-line going into the node
|
247
|
+
String(end['col']*self.width) + "," + String(end['row']*self.height-15)
|
239
248
|
);
|
240
249
|
}
|
241
250
|
} else if(end['row']-start['row'] < 0) { // upwards
|
242
251
|
if(num_lines > 1) {// ??? no idea
|
243
252
|
line.attr("d", "M " + String(start['col']*self.width) + "," + String(start['row']*self.height-15) +" "+
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
253
|
+
String(start['col']*self.width) + "," + String((max_line-1)*self.height+5) +" "+
|
254
|
+
String(end['col']*self.width+20) + "," + String((max_line-1)*self.height+5) +" "+
|
255
|
+
String(end['col']*self.width+20) + "," + String(end['row']*self.height+25)+" "+
|
256
|
+
String(end['col']*self.width) + "," + String(end['row']*self.height-15)
|
248
257
|
);
|
249
258
|
} else {
|
250
259
|
line.attr("d", "M " + String(start['col']*self.width) + "," + String(start['row']*self.height-15) +" "+
|
251
|
-
|
252
|
-
|
253
|
-
|
260
|
+
String(end['col']*self.width+20) + "," + String(start['row']*self.height-15) +" "+
|
261
|
+
String(end['col']*self.width+20) + "," + String(end['row']*self.height+25)+" "+
|
262
|
+
String(end['col']*self.width) + "," + String(end['row']*self.height-15)
|
254
263
|
);
|
255
264
|
}
|
256
265
|
}
|
@@ -449,7 +458,14 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
449
458
|
if($(this).attr('collapsed') == undefined || $(this).attr('collapsed') == 'false') { collapsed = false; }
|
450
459
|
else { collapsed = true; }
|
451
460
|
if(root_expansion == 'vertical') pos.row++;
|
452
|
-
if(root_expansion == 'horizontal')
|
461
|
+
if(root_expansion == 'horizontal') {
|
462
|
+
pos.col++;
|
463
|
+
if (!illustrator.compact) {
|
464
|
+
if (block.max.row) {
|
465
|
+
pos.row = block.max.row + 1;
|
466
|
+
}
|
467
|
+
}
|
468
|
+
}
|
453
469
|
if(illustrator.elements[tname] != undefined && illustrator.elements[tname].type == 'complex' && !collapsed) {
|
454
470
|
if(illustrator.elements[tname] != undefined && !illustrator.elements[tname].svg) pos.row--;
|
455
471
|
// TODO: Remaining problem is the order inside the svg. Thats why the connection is above the icon
|