b7e5dd4b66feb0ee7701dcaa7e7716a176aac181
[kivitendo-erp.git] / templates / webpages / csv_import / _deferred_report.html
1 [% PROCESS '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     get_report('#csv_import_report', 'controller.pl', { action: 'CsvImport/report', 'no_layout': 1, 'id': [% SELF.background_job.data_as_hash.report_id %] });
23   });
24
25
26 </script>
27