From 7131eb2438766f915f4c83401c18cde1c5bbb8f9 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 6 Mar 2013 15:11:08 -0500 Subject: [PATCH] acq - create invoice from / link to invoice now work in new tab Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/web/js/dojo/openils/acq/nls/acq.js | 3 ++- Open-ILS/web/js/ui/default/acq/common/inv_dialog.js | 13 ++++++++++++- Open-ILS/web/js/ui/default/acq/common/li_table.js | 5 ++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/acq/nls/acq.js b/Open-ILS/web/js/dojo/openils/acq/nls/acq.js index fd7949ff84..51100b01d1 100644 --- a/Open-ILS/web/js/dojo/openils/acq/nls/acq.js +++ b/Open-ILS/web/js/dojo/openils/acq/nls/acq.js @@ -87,5 +87,6 @@ "COPIES_TO_RECEIVE": "Number of copies to receive: ", "CREATE_PO_INVALID": "A purchase order must have an ordering agency and a provider.", "INVOICE_COPY_COUNT_INFO": "Copies received on this invoice: ${0} out of ${1}.", - "INVOICE_IDENT_COLLIDE": "There is already an invoice in the system with the given combination of 'Vendor Invoice ID' and 'Provider,' which is not allowed." + "INVOICE_IDENT_COLLIDE": "There is already an invoice in the system with the given combination of 'Vendor Invoice ID' and 'Provider,' which is not allowed.", + "NEW_INVOICE": "New Invoice" } diff --git a/Open-ILS/web/js/ui/default/acq/common/inv_dialog.js b/Open-ILS/web/js/ui/default/acq/common/inv_dialog.js index 7a5789e1dc..6ef5126611 100644 --- a/Open-ILS/web/js/ui/default/acq/common/inv_dialog.js +++ b/Open-ILS/web/js/ui/default/acq/common/inv_dialog.js @@ -11,7 +11,18 @@ function InvoiceLinkDialogManager(which, target) { var join = (idx == 0) ? '?' : '&'; path += join + "attach_" + self.which + "=" + id; }); - location.href = path; + if (openils.XUL.isXUL()) { + openils.XUL.newTabEasy( + path, + /* tab title */ dojo.string.substitute( + localeStrings.INVOICE_NUMBER, [self.inv.inv_ident()] + ), + null, + true /* wrapper */ + ); + } else { + location.href = path; + } }; this.which = which; diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js index 28caf997fb..e727b64028 100644 --- a/Open-ILS/web/js/ui/default/acq/common/li_table.js +++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js @@ -2804,7 +2804,10 @@ function AcqLiTable() { if (!liIds.length) return; var path = oilsBasePath + '/acq/invoice/view?create=1'; dojo.forEach(liIds, function(li, idx) { path += '&attach_li=' + li }); - location.href = path; + if (openils.XUL.isXUL()) + openils.XUL.newTabEasy(path, localeStrings.NEW_INVOICE, null, true); + else + location.href = path; }; this.batchLinkInvoice = function(create) { -- 2.11.0