Fixed duplicate relationships in networkmap

This commit is contained in:
danielmaya 2018-04-24 10:28:34 +02:00
parent de2b583583
commit 118f32e12e
2 changed files with 6 additions and 1 deletions

View File

@ -1815,7 +1815,8 @@ if (empty($list_networkmaps))
$table->data[1][0] = '';
$table->data[1][1] =
html_print_button(__('Add agent node'), '', false,
'add_agent_node();', 'class="sub"', true);
'add_agent_node();', 'class="sub"', true) . html_print_image('images/error_red.png', true,
array('id' => 'error_red', 'style' => 'vertical-align: bottom;display: none;', 'class' => 'forced_title', 'alt' => 'Esto es una prueba', 'data-title' => 'data-use_title_for_force_title:1'), false);
$add_agent_node_html = html_print_table($table, true);
ui_toggle($add_agent_node_html, __('Add agent node'),

View File

@ -1098,6 +1098,10 @@ function add_agent_node(agents) {
draw_elements_graph();
init_drag_and_drop();
set_positions_graph();
} else {
$("#error_red").show();
$("#error_red").attr("data-title","The agent is already added on the networkmap");
$("#error_red").attr("data-use_title_for_force_title","1");
}
}
});