mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
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
679af3b3f0
commit
8cc38eed0a
@ -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>
|
2012-03-21 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* godmode/agentes/module_manager_editor_common.php: Added global var
|
* 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 "
|
echo "
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
|
period_select_init('$uniq_name');
|
||||||
period_select_events('$uniq_name');
|
period_select_events('$uniq_name');
|
||||||
});
|
});
|
||||||
</script>
|
</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
|
* This function initialize the values of the control
|
||||||
* for time
|
|
||||||
*
|
*
|
||||||
* @param name string with the name of the select for time
|
* @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
|
// Manual mode is hidden by default
|
||||||
$('#'+name+'_manual').hide();
|
$('#'+name+'_manual').hide();
|
||||||
|
|
||||||
@ -624,6 +623,17 @@ function period_select_events(name) {
|
|||||||
$('#'+name+'_units option:last').removeAttr('selected');
|
$('#'+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+'_toggler').click(function() {
|
||||||
$('#'+name+'_default').toggle();
|
$('#'+name+'_default').toggle();
|
||||||
$('#'+name+'_manual').toggle();
|
$('#'+name+'_manual').toggle();
|
||||||
@ -649,7 +659,7 @@ function period_select_events(name) {
|
|||||||
// the time in seconds is calculated into hidden input
|
// the time in seconds is calculated into hidden input
|
||||||
$('#'+name+'_units').change(function() {
|
$('#'+name+'_units').change(function() {
|
||||||
$('#'+name+'_select option:eq(0)').attr('selected', 'selected');
|
$('#'+name+'_select option:eq(0)').attr('selected', 'selected');
|
||||||
calculateSeconds();
|
calculateSeconds(name);
|
||||||
});
|
});
|
||||||
|
|
||||||
// When write any character into custom input, it check to convert it to
|
// 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);
|
$('#text-'+name+'_text').val(cleanValue);
|
||||||
|
|
||||||
$('#'+name+'_select option:eq(0)').attr('selected', 'selected');
|
$('#'+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();
|
* Calculate the custom time in seconds into hidden input
|
||||||
$('.'+name).val(calculated);
|
*
|
||||||
}
|
*/
|
||||||
|
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_core.js'></script>
|
||||||
<script type='text/javascript' src='../../include/javascript/x_event.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/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' src='../../include/javascript/jquery-1.7.1.js'></script>
|
||||||
<script type='text/javascript'><!--
|
<script type='text/javascript'><!--
|
||||||
var defOffset = 2;
|
var defOffset = 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user