* chart: don't load page if no chart to be selected.

This commit is contained in:
liugang
2023-11-03 15:54:15 +08:00
parent 80c1ae915b
commit 56afe5400a
+8 -6
View File
@@ -7,12 +7,14 @@
*/
function previewCharts()
{
const form = new FormData();
const checks = $('#moduleMenu ul').zui('tree').$.getChecks();
if(checks.length > 0)
{
const form = new FormData();
checks.forEach((id) => {
if(id.includes(':')) form.append('charts[]', id.split(':')[1]);
});
checks.forEach((id) => {
if(id.includes(':')) form.append('charts[]', id.split(':')[1]);
});
postAndLoadPage(previewUrl, form);
postAndLoadPage(previewUrl, form, '#chartPanel');
}
}