cockpit/js/wfadaptor.cpee.js in cpee-1.3.119 vs cockpit/js/wfadaptor.cpee.js in cpee-1.3.120
- old
+ new
@@ -87,11 +87,11 @@
if(sibling) {
group = elements[xml_node.parent().get(0).tagName].description.permissible_children(xml_node);
if(group.length > 0) menu['Insert after'] = group;
}
- if(xml_node.get(0).tagName != 'description')
+ if(xml_node.get(0).tagName != 'description' && !elements[xml_node.get(0).tagName].description.deleteable)
menu['Remove Element'] = [{'label': 'Actual Element',
'function_call': adaptor.description.remove,
'menu_icon': function() {
var icon = elements[xml_node.get(0).tagName].illustrator.svg();
icon.children('.rfill').css({'fill':'red','fill-opacity':'0.5'});
@@ -184,16 +184,10 @@
// add the sizer in order for colspan to work
tab.append(create_sizer());
save['details'] = serialize_details(tab).serializeXML();
} // }}}
this.events.dblclick = function(svgid, e) { // {{{
- $('.tile[element-id = "' + svgid + '"]').css('display','none');
- var xml_node = adaptor.description.get_node_by_svg_id(svgid);
- if(xml_node.attr('collapsed') == undefined || xml_node.attr('collapsed') == 'false') {xml_node.attr('collapsed','true');}
- else {xml_node.attr('collapsed','false');}
- adaptor.description.update(svgid);
- return false;
} // }}}
this.events.mouseover = function(svgid, e) { // {{{
$('.tile[element-id = "' + svgid + '"]').css('display','block');
return false;
} // }}}
@@ -477,14 +471,10 @@
'description' : {//{{{
'create': function(target) {
var node = $X('<choose xmlns="http://cpee.org/ns/description/1.0"><otherwise/></choose>');
return node;
},
- 'insertable' : function(parent_node, index) {
- return true;
- return false;
- },
'permissible_children': function(node) {
var func = null;
if(node.get(0).tagName == 'choose') { func = adaptor.description.insert_first_into }
else { func = adaptor.description.insert_after }
if(node.children('parallel_branch').length > 0) {
@@ -531,24 +521,21 @@
'col_shift' : function(node) {
return false;
},
'svg': function() {
return $X('<svg class="clickable" xmlns="http://www.w3.org/2000/svg">' +
- '<line x1="15" y1="0" x2="15" y2="28" class="standwithout"/>' +
+ '<circle cx="15" cy="15" r="9" class="standtrans"/>' +
'<line x1="9" y1="21" x2="21" y2="9" class="stand"/>' +
'</svg>');
}
},//}}}
'description' : {//{{{
'create': function(target) {
var node = $X('<otherwise xmlns="http://cpee.org/ns/description/1.0"/>');
return node;
},
- 'insertable' : function(parent_node, index) {
- return true;
- return false;
- },
+ 'deleteable': true,
'permissible_children': function(node) {
var func = null;
var childs = null;
if(node.get(0).tagName == 'otherwise') { func = adaptor.description.insert_first_into }
else { func = adaptor.description.insert_after }
@@ -614,13 +601,9 @@
},//}}}
'description' : {//{{{
'create': function(target) {
var node = $X('<alternative condition="" xmlns="http://cpee.org/ns/description/1.0"/>');
return node;
- },
- 'insertable' : function(parent_node, index) {
- return true;
- return false;
},
'permissible_children': function(node) {
if(node.get(0).tagName == 'alternative') { func = adaptor.description.insert_first_into }
else { func = adaptor.description.insert_after }
if(node.parents('parallel').length > node.parents('parallel_branch').length && node.get(0).tagName == 'alternative')