Fixed colour link and delete link
This commit is contained in:
parent
c96b9aac0d
commit
72aefbd96d
|
@ -87,7 +87,7 @@ function maps_duplicate_items_map($id, $map_items) {
|
||||||
'options' => $item['options'], 'style' => $item['style']);
|
'options' => $item['options'], 'style' => $item['style']);
|
||||||
$result_copy_item = db_process_sql_insert('titem', $copy_items);
|
$result_copy_item = db_process_sql_insert('titem', $copy_items);
|
||||||
if ($result_copy_item) {
|
if ($result_copy_item) {
|
||||||
$item_relations = db_get_all_rows_sql("SELECT * FROM trel_item WHERE id = " . $item['id']);
|
$item_relations = db_get_all_rows_sql("SELECT * FROM trel_item WHERE id = " . $item['id'] . " AND deleted = 0");
|
||||||
if ($item['id'] == $item_relations['parent_id']) {
|
if ($item['id'] == $item_relations['parent_id']) {
|
||||||
$copy_item_relations = array(
|
$copy_item_relations = array(
|
||||||
'id_parent' => $result_copy_item,
|
'id_parent' => $result_copy_item,
|
||||||
|
|
|
@ -582,10 +582,16 @@ function update_link(row_index, id_link) {
|
||||||
delete_link_from_id(index);
|
delete_link_from_id(index);
|
||||||
|
|
||||||
var temp_link = {};
|
var temp_link = {};
|
||||||
|
temp_link["status_start"] = "0";
|
||||||
|
temp_link["status_end"] = "0";
|
||||||
|
|
||||||
temp_link["id_db"] = String(data['id_db_link']);
|
temp_link["id_db"] = String(data['id_db_link']);
|
||||||
|
|
||||||
if (data['type_source'] == 1) {
|
if (data['type_source'] == 1) {
|
||||||
temp_link["arrow_start"] = "module";
|
temp_link["arrow_start"] = "module";
|
||||||
temp_link["id_module_start"] = interface_source;
|
temp_link["id_module_start"] = interface_source;
|
||||||
|
temp_link["status_start"] = data['status'];
|
||||||
|
temp_link["link_color"] = (data['status'] == "1") ? "#FC4444" : "#999";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
temp_link["arrow_start"] = "";
|
temp_link["arrow_start"] = "";
|
||||||
|
@ -595,14 +601,14 @@ function update_link(row_index, id_link) {
|
||||||
if (data['type_target'] == 1) {
|
if (data['type_target'] == 1) {
|
||||||
temp_link["arrow_end"] = "module";
|
temp_link["arrow_end"] = "module";
|
||||||
temp_link["id_module_end"] = interface_target;
|
temp_link["id_module_end"] = interface_target;
|
||||||
|
temp_link["status_end"] = data['status'];
|
||||||
|
temp_link["link_color"] = (data['status'] == "1") ? "#FC4444" : "#999";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
temp_link["arrow_end"] = "";
|
temp_link["arrow_end"] = "";
|
||||||
temp_link["id_agent_end"] = interface_target;
|
temp_link["id_agent_end"] = interface_target;
|
||||||
temp_link["id_module_end"] = 0;
|
temp_link["id_module_end"] = 0;
|
||||||
}
|
}
|
||||||
temp_link["status_start"] = "0";
|
|
||||||
temp_link["status_end"] = "0";
|
|
||||||
|
|
||||||
temp_link["text_start"] = data["text_start"];
|
temp_link["text_start"] = data["text_start"];
|
||||||
temp_link["text_end"] = data["text_end"];
|
temp_link["text_end"] = data["text_end"];
|
||||||
|
|
Loading…
Reference in New Issue