Merge branch 'ent-1786-Rango-de-tiempo-en-container-graphs' into 'develop'

Ent 1786 rango de tiempo en container graphs

See merge request artica/pandorafms!2931
This commit is contained in:
Alejandro Fraguas 2019-12-23 10:18:39 +01:00
commit 69159d158d
2 changed files with 16 additions and 1 deletions

View File

@ -125,6 +125,20 @@ if ($report_r && $report_w) {
get_graphs_container(id_container,hash,time);
}
});
$("div[id^=period_container_] a").on('click', function(e){
if ($("div[id^=period_container_][id$=_default]").css('display') == 'none') {
$('#refresh_custom_time').show();
$('#refresh_custom_time').on('click', function(e){
var time = $('input[id *= hidden-period_container_'+hash+']').val();
get_graphs_container(id_container,hash,time);
});
}
else if ($("div[id^=period_container_][id$=_manual]").css('display') == 'none') {
$('#refresh_custom_time').hide();
}
});
}
});
}

View File

@ -171,8 +171,9 @@ if ($get_graphs) {
'',
false,
$periods,
'vertical-align: middle;'
'vertical-align: middle; margin-bottom:0;'
);
$single_table .= html_print_image('images/refresh_mc.png', true, ['id' => 'refresh_custom_time', 'title' => 'Refresh graph', 'style' => 'cursor:pointer; vertical-align: middle; display:none;']);
$single_table .= '</td>';
$single_table .= '</tr>';
$single_table .= '</table>';