2680cfe3e6efd0e3c418b956e3f8aa1572a4fde8
[kivitendo-erp.git] / templates / webpages / csv_import / _deferred_report.html
1 [% INCLUDE 'common/flash.html' %]
2 <div id='csv_import_report'></div>
3
4 <script type='text/javascript'>
5   function get_report(target, source, data){
6     $.ajax({
7       url:        source,
8       success:    function (rsp) {
9         $(target).html(rsp);
10         $(target).find('.paginate').find('a').click(function(event){ redirect_event(event, target) });
11       },
12       data:       data,
13     });
14   };
15
16   function redirect_event(event, target){
17     event.preventDefault();
18     get_report(target, event.target + '', {});
19   }
20
21   $(document).ready(function(){
22     [%- IF SELF.background_job.data_as_hash.report_id %]
23       get_report('#csv_import_report', 'controller.pl', { action: 'CsvImport/report', 'no_layout': 1, 'id': [% SELF.background_job.data_as_hash.report_id %] });
24     [%- END %]
25   });
26
27
28 </script>