Fixed the jQuery on the download data button

The click binding was getting lost after ajax reload
This commit is contained in:
Naomi 2018-10-01 17:55:41 +01:00
parent 5cde32c975
commit 56be669fe9
2 changed files with 4 additions and 8 deletions

View File

@ -1,3 +1,5 @@
jQuery('#opencase_reporting_buttons #download_data').click(function() {
location.href = location.href + "&_format=csv";
jQuery('body').on('click','#opencase_reporting_buttons #download_data',function(){
var url = new URL(location.href);
url.searchParams.append('_format', 'csv');
location.href = url.toString();
});

View File

@ -1,6 +0,0 @@
opencase_reporting.new_report:
title: 'Custom report'
description: 'Make your own report'
menu_name: opencase_reporting
url: internal:/opencase/reporting/actors?title=Custom+Report
weight: 0