From: Moritz Bunkus Date: Wed, 11 Jan 2017 15:54:47 +0000 (+0100) Subject: ActionBar: Verkaufsrechnungen: Drucken über Dialog implementiert X-Git-Tag: release-3.5.4~1331 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=10852277fadcc965e883724a6e9b6fefc5026d8c;p=kivitendo-erp.git ActionBar: Verkaufsrechnungen: Drucken über Dialog implementiert --- diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 4f7e9e410..6eae18e39 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -339,7 +339,7 @@ sub setup_is_action_bar { action => [ t8('Export') ], action => [ ($form->{id} ? t8('Print') : t8('Preview')), - submit => [ '#form', { action => "print" } ], + call => [ 'kivi.SalesPurchase.show_print_dialog', $form->{id} ? 'print' : 'preview' ], checks => [ @req_trans_desc ], disabled => !$form->{id} && $form->{locked} ? t8('The billing period has already been locked.') : undef, ], diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js index 0b09bebf8..3eae14e94 100644 --- a/js/kivi.SalesPurchase.js +++ b/js/kivi.SalesPurchase.js @@ -303,10 +303,12 @@ namespace('kivi.SalesPurchase', function(ns) { this.print_record = function() { $('#print_dialog').dialog('close'); - kivi.submit_form_with_action('#form', 'print'); + kivi.submit_form_with_action('#form', $('#form').data('print-action')); }; - this.show_print_dialog = function() { + this.show_print_dialog = function(print_action) { + $('#form').data('print-action', print_action || 'print'); + kivi.popup_dialog({ id: 'print_dialog', dialog: { diff --git a/templates/webpages/is/form_footer.html b/templates/webpages/is/form_footer.html index 837cd46dc..23646f105 100644 --- a/templates/webpages/is/form_footer.html +++ b/templates/webpages/is/form_footer.html @@ -166,3 +166,6 @@ +