|
|
|
@ -65,29 +65,34 @@ if ($export_csv) { |
|
|
|
|
} |
|
|
|
|
$csv_content = array(); |
|
|
|
|
// Scripts for reporting array hide / unhide columns |
|
|
|
|
$js = " |
|
|
|
|
<script> |
|
|
|
|
$js = "<script> |
|
|
|
|
// hide column and display the button to unhide it |
|
|
|
|
function foldup(in_id) { |
|
|
|
|
$('div#reporting_table table tr td:nth-child('+in_id+')').fadeToggle(); |
|
|
|
|
$('div#reporting_table table tr th:nth-child('+in_id+')').fadeToggle(); |
|
|
|
|
$('div#unhideButtons span:nth-child('+in_id+')').fadeToggle(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// add the red cross on top of each column |
|
|
|
|
function init_hide() { |
|
|
|
|
$('div#reporting_table table tr th').each( |
|
|
|
|
function(index) { |
|
|
|
|
num_index = index + 1; |
|
|
|
|
$(this).prepend('<div style=\"cursor:pointer\" onclick=\"foldup('+num_index+')\">".Display :: return_icon('visible.png', get_lang('HideColumn'), array('align' => 'absmiddle', 'hspace' => '3px'), 22)."</div>'); |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
// $(this).prepend('<div style=\"cursor:pointer\" onclick=\"foldup('+num_index+')\">".Display :: return_icon('visible.png', get_lang('HideColumn'), array('align' => 'absmiddle', 'hspace' => '3px'), 22)."</div>'); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// hide some column at startup |
|
|
|
|
// be sure that these columns always exists |
|
|
|
|
// see $tab_table_header = array(); // tab of header texts |
|
|
|
|
$(document).ready( function() { |
|
|
|
|
init_hide(); |
|
|
|
|
foldup(1);foldup(9);foldup(10);foldup(11);foldup(12); |
|
|
|
|
foldup(1); |
|
|
|
|
foldup(9); |
|
|
|
|
foldup(10); |
|
|
|
|
foldup(11); |
|
|
|
|
foldup(12); |
|
|
|
|
}) |
|
|
|
|
</script>"; |
|
|
|
|
|
|
|
|
|