Merge branch '1466-problems-with-linked-visualmap-status-dev' into 'develop'

Added change about linked visualmaps

See merge request artica/pandorafms!938
This commit is contained in:
vgilc 2017-10-20 11:57:28 +02:00
commit 6944705855
3 changed files with 23 additions and 21 deletions

View File

@ -2899,9 +2899,6 @@ function updateDB(type, idElement , values, event) {
}
function copyDB(idItem) {
console.log(idItem);
metaconsole = $("input[name='metaconsole']").val();
parameter = Array();
@ -3357,8 +3354,6 @@ function eventsItems(drag) {
}
}
else{
console.log('Dragstart');
multiDragStart(event);
}
@ -3375,8 +3370,6 @@ function eventsItems(drag) {
updateDB(selectedItem, idItem, values, 'dragstop');
}
else{
console.log('Dragstop');
multidragStop(event);
}
});
@ -3464,10 +3457,6 @@ function eventsItems(drag) {
break;
}
}
else{
console.log('Drag');
}
});
}

View File

@ -515,13 +515,13 @@ switch ($action) {
$values['id_agent'] = $id_agent;
}
}
else if (!empty($id_agent)) {
$values['id_agent'] = $id_agent;
}
else if ($agent !== null) {
$id_agent = agents_get_agent_id($agent);
$values['id_agent'] = $id_agent;
}
else {
$values['id_agent'] = $id_agent;
}
if ($id_module !== null) {
$values['id_agente_modulo'] = $id_module;
}

View File

@ -556,12 +556,11 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) {
'</td>';
$form_items_advance['map_linked_row'] = array();
$form_items_advance['map_linked_row']['items'] = array(
'group_item', 'static_graph', 'percentile_bar',
'percentile_item', 'module_graph', 'simple_value',
'icon', 'label', 'datos');
$form_items_advance['map_linked_row']['items'] = array('static_graph', 'label');
$form_items_advance['map_linked_row']['html'] = '<td align="left">'.
__('Map linked') . '</td>' .
__('Map linked') . ui_print_help_tip (
__("If a parent visual console is selected here, an agent or module cannot be selected and will be removed if a previous selection was done."), true) .
'</td>' .
'<td align="left">' . html_print_select_from_sql (
'SELECT id, name
FROM tlayout
@ -748,3 +747,17 @@ function visual_map_editor_print_hack_translate_strings() {
__('Could not be save') .'</span>';
}
?>
<script type="text/javascript">
$(document).ready (function () {
$("#map_linked").change(function () {
$("#text-agent").val("");
$("input[name=id_agent]").val(0);
$("#module").empty();
$("#module")
.append($("<option>")
.attr("value", 0)
.html("<?php echo __('Any'); ?>"));
})
});
</script>