2012-03-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.preview.php: fixed the calendar js show, fixed the double update button and added the enterprise posibility to generate PDF from this report. * include/javascript/pandora.js: fixed the re-enable the module list widget when sometimes start as disabled. * include/functions_reporting.php, operation/reporting/reporting_viewer.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5757 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8345131eb5
commit
c8c4b93ded
|
@ -1,3 +1,15 @@
|
|||
2012-03-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/reporting/reporting_builder.preview.php: fixed the calendar js
|
||||
show, fixed the double update button and added the enterprise posibility to
|
||||
generate PDF from this report.
|
||||
|
||||
* include/javascript/pandora.js: fixed the re-enable the module list widget
|
||||
when sometimes start as disabled.
|
||||
|
||||
* include/functions_reporting.php, operation/reporting/reporting_viewer.php:
|
||||
cleaned source code style.
|
||||
|
||||
2012-03-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_visual_map.php,
|
||||
|
|
|
@ -47,7 +47,7 @@ $datetime = strtotime ($date.' '.$time);
|
|||
$report["datetime"] = $datetime;
|
||||
|
||||
// Calculations in order to modify init date of the report
|
||||
$date_init_less = strtotime(date ('Y-m-j')) - 86400;
|
||||
$date_init_less = strtotime(date ('Y-m-j')) - 86400; //TODO: Ohh! a magic number like as pink unicorn.
|
||||
$date_init = get_parameter('date_init', date ('Y-m-j', $date_init_less));
|
||||
$time_init = get_parameter('time_init', date ('h:iA'));
|
||||
$datetime_init = strtotime ($date_init.' '.$time_init);
|
||||
|
@ -61,7 +61,8 @@ if ($config["pure"] == 0) {
|
|||
$options[] = "<a href='$url&pure=1'>"
|
||||
. html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
|
||||
. "</a>";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$options[] = "<a href='$url&pure=0'>"
|
||||
. html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
|
||||
. "</a>";
|
||||
|
@ -90,7 +91,8 @@ $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'];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$table->data[0][1] = $report['name'];
|
||||
}
|
||||
|
||||
|
@ -98,6 +100,7 @@ $table->data[1][0] = __('Date');
|
|||
$table->data[1][1] = html_print_input_text ('date', $date, '', 12, 10, true). ' ';
|
||||
$table->data[1][1] .= html_print_input_text ('time', $time, '', 7, 7, true). ' ';
|
||||
$table->data[1][1] .= html_print_submit_button (__('Update'), 'date_submit', false, 'class="sub next"', true);
|
||||
$table->data[1][1] .= enterprise_hook('reporting_print_button_PDF', array($id_report));
|
||||
$table->data[1][2] = __('Set initial date of all reports') . html_print_checkbox('enable_init_date', 1, $enable_init_date, true);
|
||||
$table->data[1][3] = '<b>' . __('Date') . '</b>' . ui_print_help_tip(__('This is the begin date for all reports'), true);
|
||||
$table->data[1][4] = html_print_input_text ('date_init', $date_init, '', 12, 10, true). ' ';
|
||||
|
@ -118,9 +121,6 @@ echo '</div>';
|
|||
/* We must add javascript here. Otherwise, the date picker won't
|
||||
work if the date is not correct because php is returning. */
|
||||
|
||||
ui_require_css_file ('datepicker');
|
||||
ui_require_jquery_file ('ui.core');
|
||||
ui_require_jquery_file ('ui.datepicker');
|
||||
ui_require_jquery_file ('timeentry');
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
@ -142,11 +142,13 @@ $(document).ready (function () {
|
|||
$("#table1-1-3").css("display", "");
|
||||
$("#table1-1-4").css("display", "");
|
||||
$("#table1-1-5").css("display", "none");
|
||||
$("#submit-date_submit").css("display", "none");
|
||||
}
|
||||
else {
|
||||
$("#table1-1-3").css("display", "none");
|
||||
$("#table1-1-4").css("display", "none");
|
||||
$("#table1-1-5").css("display", "");
|
||||
$("#submit-date_submit").css("display", "");
|
||||
$("#table1-1-5").css("width", "380.583px");
|
||||
}
|
||||
});
|
||||
|
@ -157,10 +159,14 @@ $(document).ready (function () {
|
|||
|
||||
if ($datetime === false || $datetime == -1) {
|
||||
echo '<h3 class="error">'.__('Invalid date selected').'</h3>';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Evaluate if it's better to render blocks when are calculated (enabling realtime flush) or if it's better to wait report to be finished before showing anything (this could break the execution by overflowing the running PHP memory on HUGE reports).
|
||||
// TODO: Evaluate if it's better to render blocks when are calculated
|
||||
// (enabling realtime flush) or if it's better to wait report to be finished
|
||||
// before showing anything (this could break the execution by overflowing the
|
||||
// running PHP memory on HUGE reports).
|
||||
|
||||
|
||||
$table->size = array ();
|
||||
|
@ -228,13 +234,13 @@ foreach ($contents as $content) {
|
|||
$table->rowstyle = array ();
|
||||
|
||||
// Calculate new inteval for all reports
|
||||
if ($enable_init_date){
|
||||
if ($enable_init_date) {
|
||||
$datetime_init = strtotime ($date_init.' '.$time_init);
|
||||
$new_interval = $report['datetime'] - $datetime_init;
|
||||
$content['period'] = $new_interval;
|
||||
}
|
||||
}
|
||||
|
||||
reporting_render_report_html_item ($content, $table, $report);
|
||||
reporting_render_report_html_item ($content, $table, $report);
|
||||
echo '<div style = "overflow:auto;">';
|
||||
html_print_table ($table);
|
||||
echo "</div>";
|
||||
|
|
|
@ -2391,7 +2391,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
array_push ($table->data, $data);
|
||||
|
||||
// Put description at the end of the module (if exists)
|
||||
|
||||
|
||||
$table->colspan[1][0] = 3;
|
||||
if ($content["description"] != ""){
|
||||
$data_desc = array();
|
||||
|
|
|
@ -479,6 +479,7 @@ function agent_module_autocomplete (id_agent_name, id_agent_id, id_agent_module_
|
|||
$(id_agent_module_selector).append (option);
|
||||
});
|
||||
$(id_agent_module_selector).fadeIn ('normal');
|
||||
$(id_agent_module_selector).removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -69,7 +69,8 @@ if ($config["pure"] == 0) {
|
|||
$options['screen'] = "<a href='$url&pure=1'>"
|
||||
. html_print_image ("images/fullscreen.png", true, array ("title" => __('Full screen mode')))
|
||||
. "</a>";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$options['screen'] = "<a href='$url&pure=0'>"
|
||||
. html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode')))
|
||||
. "</a>";
|
||||
|
@ -89,14 +90,14 @@ $table->style = array ();
|
|||
$table->style[0] = 'width: 60px;';
|
||||
|
||||
// Set initial conditions for these controls, later will be modified by javascript
|
||||
if (!$enable_init_date){
|
||||
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[3] = 'display: none';
|
||||
//~ $table->style[5] = 'width: 380.583px';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$table->style[0] .= 'font-weight: bold; display: ""';
|
||||
$table->style[1] = 'display: ""';
|
||||
$table->style[2] = 'display: none';
|
||||
|
@ -112,7 +113,8 @@ $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'];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$table->data[0][1] = $report['name'];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue