New networkmaps in progress... (Added menu control)
This commit is contained in:
parent
55747ce557
commit
b8ad4a0fa3
|
@ -549,6 +549,8 @@ function networkmap_write_js_array($id, $nodes_and_relations = array()) {
|
|||
echo "var networkmap_dimensions = [ " .
|
||||
$networkmap['width'] . ", " .
|
||||
$networkmap['height'] . "];\n";
|
||||
|
||||
echo "var enterprise_installed = " . enterprise_installed() . ";\n";
|
||||
|
||||
echo "var networkmap_holding_area_dimensions = " .
|
||||
json_encode($networkmap['filter']['holding_area']) . ";\n";
|
||||
|
@ -1558,6 +1560,7 @@ function show_networkmap($id = 0, $user_readonly = false, $nodes_and_relations =
|
|||
networkmap_center: networkmap_center,
|
||||
url_popup: url_popup_pandora,
|
||||
networkmap_dimensions: networkmap_dimensions,
|
||||
enterprise_installed: enterprise_installed,
|
||||
holding_area_dimensions: networkmap_holding_area_dimensions,
|
||||
url_background_grid: url_background_grid
|
||||
});
|
||||
|
|
|
@ -1207,6 +1207,14 @@ function show_menu(item, data) {
|
|||
items_list["edit"] = {
|
||||
name: edit_menu,
|
||||
icon: "edit",
|
||||
disabled : function() {
|
||||
if (enterprise_installed) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
"callback": function(key, options) {
|
||||
edit_node(data);
|
||||
}
|
||||
|
@ -1214,6 +1222,14 @@ function show_menu(item, data) {
|
|||
items_list["children"] = {
|
||||
name: set_as_children_menu,
|
||||
icon: "children",
|
||||
disabled : function() {
|
||||
if (enterprise_installed) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
"callback": function(key, options) {
|
||||
var selection = d3.selectAll('.node_children');
|
||||
selection
|
||||
|
@ -1241,6 +1257,14 @@ function show_menu(item, data) {
|
|||
items_list["set_parent"] = {
|
||||
name: set_parent_menu,
|
||||
icon: "set_parent",
|
||||
disabled : function() {
|
||||
if (enterprise_installed) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
"callback": function(key, options) {
|
||||
set_parent(data);
|
||||
}
|
||||
|
@ -1250,6 +1274,14 @@ function show_menu(item, data) {
|
|||
items_list["cancel_set_parent"] = {
|
||||
name: abort_relationship_menu,
|
||||
icon: "cancel_set_parent",
|
||||
disabled : function() {
|
||||
if (enterprise_installed) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
"callback": function(key, options) {
|
||||
cancel_set_parent();
|
||||
}
|
||||
|
@ -1260,6 +1292,14 @@ function show_menu(item, data) {
|
|||
items_list["delete"] = {
|
||||
name: delete_menu,
|
||||
icon: "delete",
|
||||
disabled : function() {
|
||||
if (enterprise_installed) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
"callback": function(key, options) {
|
||||
delete_nodes();
|
||||
}
|
||||
|
@ -1702,6 +1742,7 @@ function init_graph(parameter_object) {
|
|||
window.flag_drag_running = false;
|
||||
window.in_a_node = false;
|
||||
window.url_popup = "";
|
||||
window.enterprise_installed = false;
|
||||
window.flag_setting_relationship_running = false;
|
||||
|
||||
window.minimap_w = 0;
|
||||
|
@ -1738,6 +1779,12 @@ function init_graph(parameter_object) {
|
|||
if (typeof(parameter_object.url_popup) != "undefined") {
|
||||
window.url_popup = parameter_object.url_popup;
|
||||
}
|
||||
|
||||
window.enterprise_installed = '';
|
||||
if (typeof(parameter_object.enterprise_installed) != "undefined") {
|
||||
window.enterprise_installed = parameter_object.enterprise_installed;
|
||||
}
|
||||
|
||||
window.networkmap_dimensions = [];
|
||||
if (typeof(parameter_object.networkmap_dimensions) != "undefined") {
|
||||
window.networkmap_dimensions = parameter_object.networkmap_dimensions;
|
||||
|
|
|
@ -49,18 +49,17 @@ $user_readonly = !$networkmap_write && !$networkmap_manage;
|
|||
|
||||
$refresh_state = (int)get_parameter('refresh_state', 0);
|
||||
|
||||
$style = db_get_value('style', 'titem', 'id', $id_node);
|
||||
$style = json_decode($style, true);
|
||||
$style = json_decode($row['style'], true);
|
||||
|
||||
//The next line "<!DOCTYPE...." it is necesary for the fucking IE9 because
|
||||
//this crap browser doesn't execute correcly the getContext without this line.
|
||||
//The next line "<!DOCTYPE...." it is necesary for IE9 because
|
||||
//this browser doesn't execute correcly the getContext without this line.
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo __('Details of node:') . ' ' . $style['label'];?></title>
|
||||
<script type="text/javascript" src="../../include/javascript/jquery-1.6.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../include/javascript/jquery.colorpicker.js"></script>
|
||||
<script type="text/javascript" src="../../include/javascript/jquery.colorpicker.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<style type="text/css">
|
||||
|
|
Loading…
Reference in New Issue