Files
EasySoft-ZenTaoPMS/module/bug/js/report.ui.js
T

34 lines
832 B
JavaScript

window.selectAll = function(e)
{
let allChecked = true;
$('input[name=charts]').each(function()
{
if(!$(this).prop('checked')) allChecked = false;
});
$('input[name=charts]').each(function()
{
$(this).prop('checked', !allChecked);
});
};
window.clickInit = function(e)
{
initReport();
};
$(document).off('click', 'a[data-toggle=tab].active').on('click', 'a[data-toggle=tab]', function()
{
initReport();
});
function initReport()
{
const chartType = $('a[data-toggle=tab].active').data('param');
const form = new FormData();
$('input[name=charts]').each(function()
{
if($(this).prop('checked')) form.append('charts[]', $(this).val());
})
postAndLoadPage($.createLink('bug', 'report', params + '&chartType=' + chartType), form, '#report');
}