721c0661ba1837d54d0200d2d8484bb212b3e6f9
[kivitendo-erp.git] / templates / webpages / chart / test_page.html
1 [% USE L %]
2 [% USE P %]
3 [% SET style="width: 400px" %]
4
5 <h1>Chart Picker Testpage</h1>
6
7 <div>
8
9 <p>
10 All charts: [% P.chart.picker('chart_id', '', style=style) %]text after icon<br>
11 Only booked charts: [% P.chart.picker('chart_id_booked', '', booked=1, style=style) %]<br>
12 All charts choose: [% P.chart.picker('chart_id_choose', '', choose=1, style=style) %]<br>
13 </p>
14
15 <p>
16 Filter by link:<br>
17 AR_paid: [% P.chart.picker('chart_id_ar_paid', undef, type='AR_paid', category='I,A' style=style) %]<br>
18 AR: [% P.chart.picker('chart_id_ar', undef, type='AR', style=style) %]<br>
19 AP: [% P.chart.picker('chart_id_ap', undef, type='AP', style=style) %]<br>
20 AR or AP: [% P.chart.picker('chart_id_arap', undef, type='AR,AP', style=style) %]<br>
21 IC_income,IC_sale: [% P.chart.picker('chart_id_icis', undef, type='IC_income,IC_sale', style=style) %]<br>
22 IC_expense,IC_cogs: [% P.chart.picker('chart_id_icco', undef, type='IC_expense,IC_cogs', style=style) %]<br>
23 IC: [% P.chart.picker('chart_id_ic', undef, type='IC', style=style) %]<br>
24 </p>
25
26 <p>
27 Filter by category:<br>
28 I: [% P.chart.picker('chart_id_i', undef, category='I', style=style) %]<br>
29 IE: [% P.chart.picker('chart_id_ie', undef, category='I,E', style=style) %]<br>
30 AQL: [% P.chart.picker('chart_id_aql', undef, category='A,Q,L', style=style) %]<br>
31 </p>
32
33 <p>
34 Filter by special type:<br>
35 GuV: [% P.chart.picker('chart_id_guv', undef, type='guv', style=style) %]<br>
36 </p>
37
38 <p>bank (fat): [% P.chart.picker('bank_id', '', type='bank', fat_set_item=1, choose=1, style=style) %]
39 </p>
40 <p id="banktext"></p>
41
42
43 <p>
44 [% FOREACH i IN [ 1 2 3 4 5 6 ] %]
45 S [% i %]: [% P.chart.picker('credit_' _ i) %] - &nbsp;&nbsp;  H [% i %]: [% P.chart.picker('debit' _ i) %] <br>
46 [% END %]
47 </p>
48
49 <p>
50 Pre-filled chart object: [% P.chart.picker('pre_filled_chart_object', pre_filled_chart, style=style) %]<br>
51 Pre-filled chart ID: [% P.chart.picker('pre_filled_chart_id', pre_filled_chart.id, style=style) %]<br>
52 </p>
53
54 </div>
55
56 <script type='text/javascript'>
57   $(function(){
58       // do something when a chartpicker with fat_set_item and a certain id changes
59       $('#bank_id').on('set_item:ChartPicker', function (e, item) {
60         console.log(item)
61         $('#banktext').html('Selected fat item with category ' + item.category);
62       })
63   });
64
65 </script>