Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 403bcddc

Von Cem Aydin vor fast 2 Jahren hinzugefügt

  • ID 403bcddcd21d7fe1b25452a577e3acb356668a82
  • Vorgänger 766aa958
  • Nachfolger ab1a0839

design40: Chart picker fehlende Templates Testseite und results übernommen

- Testseite Wrapper/Breitenklassen ergänzt

Unterschiede anzeigen:

templates/design40_webpages/chart/_chart_picker_result.html
1
[% USE T8 %]
2
[% USE HTML %]
3
[% USE L %]
4
[% USE LxERP %]
5

  
6
[% FOREACH chart = SELF.charts %]
7
  <div class='chart_picker_chart [% FORM.hide_chart_details ? 'cpc_line' : 'cpc_block' %]'>
8
    <input type='hidden' class='chart_picker_id' value='[% chart.id %]'>
9
    <input type='hidden' class='chart_picker_description' value='[% chart.displayable_name %]'>
10
    <span class='cpc_block_number'>[% chart.accno | html %]</span>
11
    <span class='cpc_block_description'>[% chart.description | html %]</span>
12
    [% UNLESS FORM.hide_chart_details %]
13
      <span class='cpc_block_balance'>[% chart.formatted_balance_dc | html %]</span>
14
      <div style='clear:both;'></div>
15
      <span class='cpc_block_second_row'>[% LxERP.t8("Chart Type") %]: [% chart.displayable_category %] &nbsp;&nbsp;&nbsp; [% IF chart.has_transaction %][% LxERP.t8("Last transaction")%]: [% chart.date_of_last_transaction.to_kivitendo %][% END %]</span>
16
    [% END %]
17
  </div>
18
[% END %]
19

  
20
<div style='clear:both'></div>
21

  
22
[% L.paginate_controls(target='#chart_picker_result', selector='#chart_picker_result', models=SELF.models) %]
23
<script type='text/javascript'>
24
  kivi.ChartPicker($('#'+$('#chart_picker_real_id').val())).init_results()
25
</script>
templates/design40_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 class="wrapper">
8

  
9
  <div class="wrapper wi-verywide">
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
  </div>
14

  
15
  <div class="wrapper wi-verywide">
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
  </div>
25

  
26
  <div class="wrapper wi-verywide">
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
  </div>
32

  
33
  <div class="wrapper wi-verywide">
34
    Filter by special type:<br>
35
    GuV: [% P.chart.picker('chart_id_guv', undef, type='guv', style=style) %]<br>
36
  </div>
37

  
38
  <div class="wrapper wi-verywide">
39
    bank (fat): [% P.chart.picker('bank_id', '', type='bank', fat_set_item=1, choose=1, style=style) %]
40
  </div>
41
  <div id="banktext"></div>
42

  
43
  <div class="wrapper wi-verywide">
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
  </div>
48

  
49
  <div class="wrapper wi-verywide">
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
  </div>
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>

Auch abrufbar als: Unified diff