Merge branch '1070-disable-interface-links-in-fictional-nodes-dev' into 'develop'

Removed interface link function in fictional nodes

See merge request !644
This commit is contained in:
vgilc 2017-09-11 09:35:35 +02:00
commit 6bf85a0789
2 changed files with 23 additions and 4 deletions

View File

@ -312,7 +312,7 @@ function networkmap_db_node_to_js_node($node, &$count, &$count_item_holding_area
$item = array();
$item['id'] = $count;
if (enterprise_installed()) {
enterprise_include_once('include/functions_pandora_networkmap.php');
$item['id_db'] = $node['id_in_db'];
@ -331,6 +331,9 @@ function networkmap_db_node_to_js_node($node, &$count, &$count_item_holding_area
$item['id_agent'] = (int)$node['style']['id_agent'];
$item['id_module'] = (int)$node['source_data'];
}
else {
$item['type'] = 3;
}
$item['fixed'] = true;
$item['x'] = (int)$node['x'];

View File

@ -1589,8 +1589,14 @@ function show_menu(item, data) {
name: interface_link_add,
icon: "interface_link_children",
disabled : function() {
console.log(data);
if (enterprise_installed) {
return false;
if (data.type == 3) {
return true;
}
else {
return false;
}
}
else {
return true;
@ -1657,7 +1663,12 @@ function show_menu(item, data) {
icon: "interface_link_parent",
disabled : function() {
if (enterprise_installed) {
return false;
if (data.type == 3) {
return true;
}
else {
return false;
}
}
else {
return true;
@ -1681,7 +1692,12 @@ function show_menu(item, data) {
icon: "interface_link_cancel",
disabled : function() {
if (enterprise_installed) {
return false;
if (data.type == 3) {
return true;
}
else {
return false;
}
}
else {
return true;