2012-03-22 Sergio Martin <sergio.martin@artica.es>
* include/functions_html.php include/javascript/pandora.js operation/agentes/stat_win.php: Fixed period control in the popup graph menu (stat_win) merged from 4.0 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5811 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
5d5ab1ad64
commit
610a8d2a1b
|
@ -1,3 +1,10 @@
|
|||
2012-03-22 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_html.php
|
||||
include/javascript/pandora.js
|
||||
operation/agentes/stat_win.php: Fixed period control
|
||||
in the popup graph menu (stat_win) merged from 4.0
|
||||
|
||||
2012-03-21 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* godmode/agentes/module_manager_editor_common.php: Added global var
|
||||
|
|
|
@ -456,6 +456,7 @@ function html_print_extended_select_for_time ($name, $selected = '', $script = '
|
|||
echo "
|
||||
<script type='text/javascript'>
|
||||
$(document).ready (function () {
|
||||
period_select_init('$uniq_name');
|
||||
period_select_events('$uniq_name');
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -602,14 +602,13 @@ function agent_autocomplete (id_agent_name, id_server_name, id_agent_id ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Manage events into html_extended_select_for_time
|
||||
* Init values for html_extended_select_for_time
|
||||
*
|
||||
* This function has all the events to manage the extended select
|
||||
* for time
|
||||
* This function initialize the values of the control
|
||||
*
|
||||
* @param name string with the name of the select for time
|
||||
*/
|
||||
function period_select_events(name) {
|
||||
function period_select_init(name) {
|
||||
// Manual mode is hidden by default
|
||||
$('#'+name+'_manual').hide();
|
||||
|
||||
|
@ -623,7 +622,18 @@ function period_select_events(name) {
|
|||
$('#'+name+'_manual').toggle();
|
||||
$('#'+name+'_units option:last').removeAttr('selected');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage events into html_extended_select_for_time
|
||||
*
|
||||
* This function has all the events to manage the extended select
|
||||
* for time
|
||||
*
|
||||
* @param name string with the name of the select for time
|
||||
*/
|
||||
function period_select_events(name) {
|
||||
$('.'+name+'_toggler').click(function() {
|
||||
$('#'+name+'_default').toggle();
|
||||
$('#'+name+'_manual').toggle();
|
||||
|
@ -649,7 +659,7 @@ function period_select_events(name) {
|
|||
// the time in seconds is calculated into hidden input
|
||||
$('#'+name+'_units').change(function() {
|
||||
$('#'+name+'_select option:eq(0)').attr('selected', 'selected');
|
||||
calculateSeconds();
|
||||
calculateSeconds(name);
|
||||
});
|
||||
|
||||
// When write any character into custom input, it check to convert it to
|
||||
|
@ -663,14 +673,18 @@ function period_select_events(name) {
|
|||
$('#text-'+name+'_text').val(cleanValue);
|
||||
|
||||
$('#'+name+'_select option:eq(0)').attr('selected', 'selected');
|
||||
calculateSeconds();
|
||||
calculateSeconds(name);
|
||||
});
|
||||
|
||||
// Calculate the custom time in seconds into hidden input
|
||||
function calculateSeconds() {
|
||||
var calculated = $('#text-'+name+'_text').val()*$('#'+name+'_units').val();
|
||||
$('.'+name).val(calculated);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Calculate the custom time in seconds into hidden input
|
||||
*
|
||||
*/
|
||||
function calculateSeconds(name) {
|
||||
var calculated = $('#text-'+name+'_text').val()*$('#'+name+'_units').val();
|
||||
$('.'+name).val(calculated);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,6 +54,7 @@ if ($refresh > 0) {
|
|||
<script type='text/javascript' src='../../include/javascript/x_core.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/x_event.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/x_slide.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/pandora.js'></script>
|
||||
<script type='text/javascript' src='../../include/javascript/jquery-1.7.1.js'></script>
|
||||
<script type='text/javascript'><!--
|
||||
var defOffset = 2;
|
||||
|
|
Loading…
Reference in New Issue