2012-03-16 Sergio Martin <sergio.martin@artica.es>
* include/functions_html.php include/javascript/pandora.js: Fixed problem with two or more time controls at the same time adding uniq id to selects * godmode/agentes/module_manager_editor_common.php godmode/reporting/reporting_builder.item_editor.php: Clean code git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5785 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
3b633261c6
commit
4ce050d774
|
@ -1,3 +1,14 @@
|
|||
2012-03-16 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_html.php
|
||||
include/javascript/pandora.js: Fixed problem with two
|
||||
or more time controls at the same time adding uniq id
|
||||
to selects
|
||||
|
||||
* godmode/agentes/module_manager_editor_common.php
|
||||
godmode/reporting/reporting_builder.item_editor.php: Clean
|
||||
code
|
||||
|
||||
2012-03-16 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_html.php
|
||||
|
|
|
@ -233,9 +233,6 @@ $table_advanced->data[1][4] = html_print_input_text ('module_ff_interval', $ff_i
|
|||
$table_advanced->data[2][0] = __('Interval').ui_print_help_tip (__('Module execution time interval.'), true);
|
||||
|
||||
$table_advanced->colspan[2][1] = 2;
|
||||
//~ $table_advanced->data[2][1] = html_print_input_text ('module_interval', $interval,
|
||||
//~ '', 5, 10, true, $disabledBecauseInPolicy).ui_print_help_tip (__('Module execution time interval (in secs).'), true);
|
||||
//~
|
||||
$table_advanced->data[2][1] = html_print_extended_select_for_time ('module_interval' , $interval, '', '', '0', false, true);
|
||||
|
||||
$table_advanced->data[2][3] = __('Post process').' ' . ui_print_help_icon ('postprocess', true);
|
||||
|
|
|
@ -327,26 +327,6 @@ switch ($action) {
|
|||
break;
|
||||
}
|
||||
|
||||
$intervals = array ();
|
||||
$intervals[300] = human_time_description_raw (300);
|
||||
$intervals[600] = human_time_description_raw (600);
|
||||
$intervals[86400] = human_time_description_raw (86400);
|
||||
$intervals[432000] = human_time_description_raw (432000);
|
||||
$intervals[604800] = human_time_description_raw (604800);
|
||||
$intervals[1296000] = human_time_description_raw (1296000);
|
||||
$intervals[2592000] = human_time_description_raw (2592000);
|
||||
|
||||
// Intervals for projection graph
|
||||
$intervals_1 = array ();
|
||||
$intervals_1[432000] = human_time_description_raw (432000);
|
||||
$intervals_1[604800] = human_time_description_raw (604800);
|
||||
$intervals_1[1296000] = human_time_description_raw (1296000);
|
||||
$intervals_1[2592000] = human_time_description_raw (2592000);
|
||||
$intervals_1[5184000] = human_time_description_raw (5184000);
|
||||
$intervals_1[7776000] = human_time_description_raw (7776000);
|
||||
$intervals_1[10368000] = human_time_description_raw (10368000);
|
||||
$intervals_1[12960000] = human_time_description_raw (12960000);
|
||||
|
||||
$urlForm = 'index.php?sec=greporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=' . $actionParameter . '&id_report=' . $idReport;
|
||||
|
||||
echo '<form action="' . $urlForm . '" method="post">';
|
||||
|
|
|
@ -434,26 +434,29 @@ function html_print_extended_select_for_time ($name, $selected = '', $script = '
|
|||
2592000 => __('months'),
|
||||
31104000 => __('years'));
|
||||
|
||||
$uniq_name = uniqid($name);
|
||||
|
||||
ob_start();
|
||||
|
||||
echo '<div id="'.$name.'_default" style="width:100%">';
|
||||
html_print_select ($fields, $name . '_select', $selected,"" . $script,
|
||||
echo '<div id="'.$uniq_name.'_default" style="width:100%">';
|
||||
html_print_select ($fields, $uniq_name . '_select', $selected,"" . $script,
|
||||
$nothing, $nothing_value, false, false, false, '', false, 'font-size: xx-small;'.$select_style);
|
||||
echo ' <a href="javascript:">'.html_print_image('images/pencil.png',true,array('class' => $name . '_toggler', 'alt' => __('Manual'), 'title' => __('Manual'))).'</a>';
|
||||
echo ' <a href="javascript:">'.html_print_image('images/pencil.png',true,array('class' => $uniq_name . '_toggler', 'alt' => __('Custom'), 'title' => __('Custom'))).'</a>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div id="'.$name.'_manual" style="width:100%">';
|
||||
html_print_input_text ($name . '_text', $selected, '', $size);
|
||||
html_print_input_hidden ($name, $selected);
|
||||
html_print_select ($units, $name . '_units', 1, "" . $script,
|
||||
echo '<div id="'.$uniq_name.'_manual" style="width:100%">';
|
||||
html_print_input_text ($uniq_name . '_text', $selected, '', $size);
|
||||
|
||||
html_print_input_hidden ($name, $selected, false, $uniq_name);
|
||||
html_print_select ($units, $uniq_name . '_units', 1, "" . $script,
|
||||
$nothing, $nothing_value, false, false, false, '', false, 'font-size: xx-small;'.$select_style);
|
||||
echo ' <a href="javascript:">'.html_print_image('images/default_list.png',true,array('class' => $name . '_toggler', 'alt' => __('List'), 'title' => __('List'))).'</a>';
|
||||
echo ' <a href="javascript:">'.html_print_image('images/default_list.png',true,array('class' => $uniq_name . '_toggler', 'alt' => __('List'), 'title' => __('List'))).'</a>';
|
||||
echo '</div>';
|
||||
|
||||
echo "
|
||||
<script type='text/javascript'>
|
||||
$(document).ready (function () {
|
||||
period_select_events('$name');
|
||||
period_select_events('$uniq_name');
|
||||
});
|
||||
</script>
|
||||
";
|
||||
|
|
|
@ -656,7 +656,7 @@ function period_select_events(name) {
|
|||
value = 300;
|
||||
}
|
||||
|
||||
$('#hidden-'+name).val(value);
|
||||
$('.'.name).val(value);
|
||||
$('#text-'+name+'_text').val(value);
|
||||
adjustTextUnits();
|
||||
});
|
||||
|
@ -685,7 +685,7 @@ function period_select_events(name) {
|
|||
// Function to calculate the custom time in seconds into hidden input
|
||||
function calculateSeconds() {
|
||||
var calculated = $('#text-'+name+'_text').val()*$('#'+name+'_units').val();
|
||||
$('#hidden-'+name).val(calculated);
|
||||
$('.'+name).val(calculated);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue