Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fa93c93c

Von Sven Schöling vor mehr als 9 Jahren hinzugefügt

  • ID fa93c93c7e076d13c6eed7be9be98cd2097fe1a3
  • Vorgänger 206fab3a
  • Nachfolger fd938095

PriceRule: Kontextinformation in Waren

Unterschiede anzeigen:

templates/webpages/ic/form_footer.html
59 59

  
60 60
</div>
61 61

  
62
[%- IF id %]
63
<div id='price_rules'>
64
  <div id='price_rules_customer_report'></div>
65
  <div id='price_rules_vendor_report'></div>
66
</div>
67
[%- END %]
68

  
62 69
[%- IF show_edit_buttons %]
63 70

  
64 71
<input class="submit" type="submit" name="action" value="[% 'Update' | $T8 %]">
......
92 99
</form>
93 100

  
94 101
<script type="text/javascript" src="js/wz_tooltip.js"></script>
102
[%- IF id %]
103
<script type='text/javascript'>
104
  var inline_report = function(target, source, data){
105
    $.ajax({
106
      url:        source,
107
      success:    function (rsp) {
108
        $(target).html(rsp);
109
        $(target).find('.paginate').find('a').click(function(event){ ns.redirect_event(event, target) });
110
        $(target).find('a.report-generator-header-link').click(function(event){ ns.redirect_event(event, target) });
111
      },
112
      data:       data,
113
    });
114
  };
115
  var redirect_event = function(event, target){
116
    event.preventDefault();
117
    ns.inline_report(target, event.target + '', {});
118
  };
119
  $(function() {
120
    window.setTimeout(function(){
121
      inline_report('#price_rules_customer_report', 'controller.pl', { action: 'PriceRule/list', 'filter.item_type_matches[].part': [% id %], 'filter.type': 'customer', inline: 1 });
122
      inline_report('#price_rules_vendor_report', 'controller.pl', { action: 'PriceRule/list', 'filter.item_type_matches[].part': [% id %], 'filter.type': 'vendor', inline: 1 });
123
    }, 200);
124
  });
125
</script>
126
[%- END %]

Auch abrufbar als: Unified diff