New maps in progress... (tooltips data and click events)
This commit is contained in:
parent
6d7286ec6f
commit
799730c48d
|
@ -39,8 +39,13 @@ if (is_ajax ()) {
|
|||
WHERE id_agente = " . $id_node_data);
|
||||
$node_data = $node_data[0];
|
||||
if (!empty($node_data)) {
|
||||
$return_data .= '<div id="open_close_click_"' . $data_graph_id . '>';
|
||||
$return_data .= '<span><strong>Agent: </strong>' . $node_data['nombre'] . '</span>';
|
||||
/*-----------------PROVISIONAL, HABRÁ QUE METER ICONOS DE VERDAD------------------*/
|
||||
/*-*/$return_data .= '<span class="close_click" onClick="close_button_tooltip()" style="float:right;">| X </span>';/*-*/
|
||||
/*-*/$return_data .= '<span class="open_click" style="float:right;"> -> |</span>';/*-*/
|
||||
/*--------------------------------------------------------------------------------*/
|
||||
$return_data .= '<div id="agent_data_to_show_"' . $node_data['id_agente'] .'>';
|
||||
$return_data .= '<span><strong>Agent: </strong>' . $node_data['nombre'] . '</span></br>';
|
||||
$return_data .= '<span><strong>IP Addres: </strong>' . $node_data['direccion'] . '</span></br>';
|
||||
$agent_os = db_get_row_sql("SELECT name FROM tconfig_os WHERE id_os = " . $node_data['id_os']);
|
||||
$agent_os = $agent_os['name'];
|
||||
|
|
|
@ -180,7 +180,6 @@ Return void
|
|||
This function paint the nodes
|
||||
*/
|
||||
MapController.prototype.paint_nodes = function() {
|
||||
|
||||
this._viewport.selectAll(".node")
|
||||
.data(nodes)
|
||||
.enter()
|
||||
|
@ -267,9 +266,6 @@ MapController.prototype.click_event = function(event) {
|
|||
if ($(event.currentTarget).parent().hasClass("node")) {
|
||||
self.tooltip_map_create(self, event);
|
||||
}
|
||||
else {
|
||||
self.tooltip_map_close();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
|
@ -374,3 +370,15 @@ MapController.prototype.nodeData = function(data_id, type, id_map, data_graph_id
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*-----------------------------------------------*/
|
||||
/*-------------------Functions-------------------*/
|
||||
/*-----------------------------------------------*/
|
||||
/**
|
||||
Function close_button_tooltip
|
||||
Return void
|
||||
This function hide the tooltip
|
||||
*/
|
||||
function close_button_tooltip() {
|
||||
console.log($(this));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue