mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
#12100 Fix custom graph
This commit is contained in:
parent
963664c1d8
commit
e637866f72
@ -653,7 +653,8 @@ $("[data-button=export]").click(function(e) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#button-export-modal").click(function(e) {
|
// Export graph.
|
||||||
|
function exportCustomGraph() {
|
||||||
const filter = parseInt($("#export-filter-id").val());
|
const filter = parseInt($("#export-filter-id").val());
|
||||||
const group = parseInt($("#export-group-id").val());
|
const group = parseInt($("#export-group-id").val());
|
||||||
|
|
||||||
@ -682,8 +683,19 @@ $("#button-export-modal").click(function(e) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
confirmDialog({
|
||||||
|
title: titleExportError,
|
||||||
|
message: messageExportError,
|
||||||
|
hideCancelButton: true,
|
||||||
|
onAccept: function() {
|
||||||
|
$(
|
||||||
|
"button.ui-button.ui-corner-all.ui-widget.ui-button-icon-only.ui-dialog-titlebar-close"
|
||||||
|
).click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove graph.
|
// Remove graph.
|
||||||
function removeGraph(e) {
|
function removeGraph(e) {
|
||||||
|
@ -636,7 +636,7 @@ $data[2] = html_print_submit_button(
|
|||||||
'class' => 'mini w30p',
|
'class' => 'mini w30p',
|
||||||
'icon' => 'next',
|
'icon' => 'next',
|
||||||
'style' => 'margin-left: 208px; width: 130px;',
|
'style' => 'margin-left: 208px; width: 130px;',
|
||||||
'onclick' => '',
|
'onclick' => 'exportCustomGraph()',
|
||||||
],
|
],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
@ -937,6 +937,10 @@ const titleExport = "<?php echo __('Export to custom graph'); ?>";
|
|||||||
const titleExportConfirm = "<?php echo __('Exported successfully'); ?>";
|
const titleExportConfirm = "<?php echo __('Exported successfully'); ?>";
|
||||||
const messageExportConfirm = "<?php echo __('graphs have been created in Custom graphs'); ?>";
|
const messageExportConfirm = "<?php echo __('graphs have been created in Custom graphs'); ?>";
|
||||||
|
|
||||||
|
const titleExportError = "<?php echo __('Error to export'); ?>";
|
||||||
|
const messageExportError = "<?php echo __('Filter cannot be None'); ?>";
|
||||||
|
|
||||||
const titleRemoveConfirm = "<?php echo __('Delete graph'); ?>";
|
const titleRemoveConfirm = "<?php echo __('Delete graph'); ?>";
|
||||||
const messageRemoveConfirm = "<?php echo __('Do you want to delete the graph? Remember to save the changes.'); ?>";
|
const messageRemoveConfirm = "<?php echo __('Do you want to delete the graph? Remember to save the changes.'); ?>";
|
||||||
|
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user