From dfca5db6daedc4829e40df71b702f5cfffeebf45 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 20 Mar 2012 15:17:44 +0000 Subject: [PATCH] 2012-03-20 Sergio Martin * include/functions_reporting.php operation/reporting/reporting_viewer.php godmode/reporting/reporting_builder.php: Improved period form in the report view and navegability merged from 4.0 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5801 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++ .../godmode/reporting/reporting_builder.php | 5 +- .../include/functions_reporting.php | 4 +- .../operation/reporting/reporting_viewer.php | 59 +++++++++---------- 4 files changed, 38 insertions(+), 37 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index fb2d66ea0e..d873b9a5a5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-03-20 Sergio Martin + + * include/functions_reporting.php + operation/reporting/reporting_viewer.php + godmode/reporting/reporting_builder.php: Improved period form in the + report view and navegability merged from 4.0 + 2012-03-20 Miguel de Dios * ChangeLog: added lost lines. diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 3ca40ce466..9d9ea6f873 100644 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -43,7 +43,6 @@ switch ($action) { case 'sort_items': switch ($activeTab) { case 'list_items': - //NO FUNCIONA $resultOperationDB = null; $position_to_sort = (int)get_parameter('position_to_sort', 1); @@ -803,9 +802,9 @@ if ($enterpriseEnable) { $buttons = reporting_enterprise_add_Tabs($buttons, $idReport); } -$buttons['preview'] = array('active' => false, +$buttons['view'] = array('active' => false, 'text' => '' . - html_print_image("images/reporting.png", true, array ("title" => __('Preview'))) .''); + html_print_image("images/reporting.png", true, array ("title" => __('View report'))) .''); $buttons[$activeTab]['active'] = true; diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 3af6d9dbd7..101330f58b 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -2157,8 +2157,8 @@ function header_content($mini, $content, $report, &$table, $title = false, $name else { $data[] = "
" . $sizh . "(" . human_time_description_raw ($content['period']) . ") " . - __("From:") . " " . date("Y-m-d H:i", $report["datetime"]) . "
" . - __("To:") . " " . date("Y-m-d H:i", $report["datetime"] - $content['period']) . "
" . + __("From:") . " " . date("Y-m-d H:i", $report["datetime"] - $content['period']) . "
" . + __("To:") . " " . date("Y-m-d H:i", $report["datetime"]) . "
" . $sizhfin . "
"; } diff --git a/pandora_console/operation/reporting/reporting_viewer.php b/pandora_console/operation/reporting/reporting_viewer.php index 5145118352..4280fcffa4 100644 --- a/pandora_console/operation/reporting/reporting_viewer.php +++ b/pandora_console/operation/reporting/reporting_viewer.php @@ -67,17 +67,17 @@ $enable_init_date = get_parameter('enable_init_date', 0); $url = "index.php?sec=reporting&sec2=operation/reporting/reporting_viewer&id=$id_report&date=$date&time=$time"; -$options['setup'] = "" +$options['setup'] = "" . html_print_image ("images/setup.png", true, array ("title" => __('Setup'))) . ""; if ($config["pure"] == 0) { - $options['screen'] = "" + $options['screen'] = "" . html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode'))) . ""; } else { - $options['screen'] = "" + $options['screen'] = "" . html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode'))) . ""; } @@ -98,50 +98,48 @@ $table->style[0] = 'width: 60px;'; // Set initial conditions for these controls, later will be modified by javascript if (!$enable_init_date) { - $table->style[0] .= 'font-weight: bold; display: none'; $table->style[1] = 'display: none'; $table->style[2] = 'display: ""'; - $table->style[3] = 'display: none'; - //~ $table->style[5] = 'width: 380.583px'; + $display_to = 'none'; + $display_item = ''; } else { - $table->style[0] .= 'font-weight: bold; display: ""'; $table->style[1] = 'display: ""'; - $table->style[2] = 'display: none'; - $table->style[3] = 'display: ""'; - $table->style[5] = 'display: none'; + $table->style[2] = 'display: ""'; + $display_to = ''; + $display_item = 'none'; } $table->size = array (); $table->size[0] = '60px'; -$table->size[2] = '60px'; $table->colspan[0][1] = 2; $table->data = array (); $table->data[0][0] = html_print_image("images/reporting.png", true, array("width" => "32", "height" => "32")); if ($report['description'] != '') { - $table->data[0][1] = $report['description']; + $table->data[0][1] = '
'.$report['description'].'
'; } else { - $table->data[0][1] = $report['name']; + $table->data[0][1] = '
'.$report['name'].'
'; } -$table->data[0][3] = ''.__('Set initial date of all reports') . html_print_checkbox('enable_init_date', 1, $enable_init_date, true).''; +$table->data[0][1] .= '
'.__('Set initial date') . html_print_checkbox('enable_init_date', 1, $enable_init_date, true); $html_enterprise = enterprise_hook('reporting_print_button_PDF', array($id_report)); if ($html_enterprise !== ENTERPRISE_NOT_HOOK) { - $table->data[0][3] .= $html_enterprise; + $table->data[0][1] .= $html_enterprise; } +$table->data[0][1] .= '
'; -$table->data[1][0] = '' . __('From') . ':'; -$table->data[1][1] = html_print_input_text ('date_init', $date_init, '', 12, 10, true). ' '; +$table->data[1][0] = ''; +$table->data[1][1] = '
' . __('From') . ':
'; +$table->data[1][1] .= html_print_input_text ('date_init', $date_init, '', 12, 10, true). ' '; $table->data[1][1] .= html_print_input_text ('time_init', $time_init, '', 7, 7, true). ' '; -$table->data[1][2] = '' . __('Interval before') . ':'; -$table->data[1][3] = '' . __('to') . ':'; -$table->data[1][4] = html_print_input_text ('date', $date, '', 12, 10, true). ' '; -$table->data[1][4] .= html_print_input_text ('time', $time, '', 7, 7, true). ' '; -$table->data[1][4] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true); -$table->data[1][5] = ''; +$table->data[1][2] = '
' . __('Items period before') . ':
'; +$table->data[1][2] .= '
' . __('to') . ':
'; +$table->data[1][2] .= html_print_input_text ('date', $date, '', 12, 10, true). ' '; +$table->data[1][2] .= html_print_input_text ('time', $time, '', 7, 7, true). ' '; +$table->data[1][2] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true); -echo '
'; +echo ''; html_print_table ($table); html_print_input_hidden ('id_report', $id_report); echo '
'; @@ -241,19 +239,16 @@ $(document).ready (function () { $("#checkbox-enable_init_date").click(function() { flag = $("#checkbox-enable_init_date").is(':checked'); if (flag == true) { - $("#table1-1-0").css("display", ""); $("#table1-1-1").css("display", ""); - $("#table1-1-2").css("display", "none"); - $("#table1-1-3").css("display", ""); - $("#table1-1-6").css("display", "none"); + $("#table1-1-2").css("display", ""); + $("#string_to").show(); + $("#string_items").hide(); } else { - $("#table1-1-0").css("display", "none"); $("#table1-1-1").css("display", "none"); $("#table1-1-2").css("display", ""); - $("#table1-1-3").css("display", "none"); - $("#table1-1-6").css("display", ""); - $("#table1-1-6").css("width", "380.583px"); + $("#string_to").hide(); + $("#string_items").show(); } }); });