Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision efef8dbd

Von Sven Schöling vor fast 13 Jahren hinzugefügt

  • ID efef8dbd0df5877d736cf25dcb56a15e0f3037be
  • Vorgänger 438c47c0
  • Nachfolger 9a4e5185

template für reports als ajaxblock

Unterschiede anzeigen:

templates/webpages/ic/sales_price_information.html
<div id='sales_price_information_sales_order'></div>
<div id='sales_price_information_sales_quotation'></div>
<script type='text/javascript'>
function get_report(target, source, data){
$.ajax({
url: source,
// beforeSend: function () { $(target).html('<img src="image/spinner.gif">') },
success: function (rsp) {
$(target).html(rsp);
$(target).find('.paginate').find('a').click(function(event){ redirect_event(event, target) });
$(target).find('a.report-generator-header-link').click(function(event){ redirect_event(event, target) });
},
data: data,
});
};
function redirect_event(event, target){
event.preventDefault();
get_report(target, event.target + '', {});
}
$(document).ready(function(){
get_report('#sales_price_information_sales_order', 'controller.pl', { action: 'SellPriceInformation/list', 'filter.part.id': [% id %], 'filter.order.type': 'sales_order' });
get_report('#sales_price_information_sales_quotation', 'controller.pl', { action: 'SellPriceInformation/list', 'filter.part.id': [% id %], 'filter.order.type': 'sales_quotation' });
});
</script>

Auch abrufbar als: Unified diff