From: Moritz Bunkus Date: Wed, 11 Jan 2017 09:47:16 +0000 (+0100) Subject: ActionBar: Angebote/Aufträge: Drucken über Dialog implementiert X-Git-Tag: release-3.5.4~1336 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=dfa741a109ca3d114efc4980bd1e9d240e036581;p=kivitendo-erp.git ActionBar: Angebote/Aufträge: Drucken über Dialog implementiert --- diff --git a/js/kivi.SalesPurchase.js b/js/kivi.SalesPurchase.js index 98111dadc..0b09bebf8 100644 --- a/js/kivi.SalesPurchase.js +++ b/js/kivi.SalesPurchase.js @@ -286,4 +286,35 @@ namespace('kivi.SalesPurchase', function(ns) { return true; }; + + // Printing records. + this.setup_print_dialog = function() { + kivi.SalesPurchase.show_all_print_options_elements(); + + $('#print_options').children().remove().appendTo('#print_dialog_print_options'); + + $('#print_dialog_print_button').focus(); + }; + + this.finish_print_dialog = function() { + $('#print_dialog_print_options').children().remove().appendTo('#print_options'); + }; + + this.print_record = function() { + $('#print_dialog').dialog('close'); + + kivi.submit_form_with_action('#form', 'print'); + }; + + this.show_print_dialog = function() { + kivi.popup_dialog({ + id: 'print_dialog', + dialog: { + height: 600, + title: kivi.t8('Print record'), + open: kivi.SalesPurchase.setup_print_dialog, + close: kivi.SalesPurchase.finish_print_dialog, + } + }); + }; }); diff --git a/js/locale/de.js b/js/locale/de.js index fec17ed1e..d90f074c6 100644 --- a/js/locale/de.js +++ b/js/locale/de.js @@ -77,6 +77,7 @@ namespace("kivi").setupLocale({ "Please select a vendor.":"Bitte wählen Sie einen Lieferanten aus.", "Price Types":"Preistypen", "Print options":"Druckoptionen", +"Print record":"Beleg drucken", "Project link actions":"Projektverknüpfungs-Aktionen", "Quotations/Orders actions":"Aktionen für Angebote/Aufträge", "Re-numbering all sections and function blocks in the order they are currently shown cannot be undone.":"Das Neu-Nummerieren aller Abschnitte und Funktionsblöcke kann nicht rückgängig gemacht werden.", diff --git a/locale/de/all b/locale/de/all index 5876d9b8c..b8d20864a 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1055,7 +1055,6 @@ $self->{texts} = { 'During the next update a taxkey 0 with tax rate of 0 will automatically created.' => 'Beim nächsten Ausführen des Updates wird ein Steuerschlüssel 0 mit einem Steuersatz von 0% automatisch erzeugt.', 'E Mail' => 'E-Mail', 'E-Mail' => 'E-Mail', - 'E-Mail is sent to #1' => 'Die E-Mail wurde an \'#1\' gesendet', 'E-Mail-Journal' => 'E-Mail-Journal', 'E-mail' => 'E-Mail', 'E-mail Statement to' => 'Fälligkeitsabrechnung als E-Mail an', @@ -2218,6 +2217,7 @@ $self->{texts} = { 'Print dunnings' => 'Mahnungen drucken', 'Print list' => 'Liste ausdrucken', 'Print options' => 'Druckoptionen', + 'Print record' => 'Beleg drucken', 'Print selected' => 'Drucken', 'Print selected delivery orders both sided' => 'Ausgewählte Lieferscheine (ggf beidseitig)', 'Print template base file name' => 'Druckvorlagen-Basisdateiname', diff --git a/templates/webpages/common/_print_dialog.html b/templates/webpages/common/_print_dialog.html new file mode 100644 index 000000000..ffad49023 --- /dev/null +++ b/templates/webpages/common/_print_dialog.html @@ -0,0 +1,7 @@ +[%- USE LxERP -%][%- USE L -%] + + +

+ [% L.button_tag("kivi.SalesPurchase.print_record()", LxERP.t8("Print"), id="print_dialog_print_button") %] + [% L.button_tag("\$('#print_dialog').dialog('close');", LxERP.t8("Abort"), id="print_dialog_abort_button") %] +

diff --git a/templates/webpages/oe/form_footer.html b/templates/webpages/oe/form_footer.html index 43b48f80c..6f510d5ea 100644 --- a/templates/webpages/oe/form_footer.html +++ b/templates/webpages/oe/form_footer.html @@ -150,3 +150,6 @@ +