From: senator Date: Sun, 19 Sep 2010 23:53:36 +0000 (+0000) Subject: Acq: Delay loading of providers for invoice-linking dialogs until X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=36ff463c638d8af4bba7bc30ea1060d8f742690b;p=evergreen%2Fpines.git Acq: Delay loading of providers for invoice-linking dialogs until they're really needed. git-svn-id: svn://svn.open-ils.org/ILS/trunk@17821 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 9a09b53a34..5e7357bc3c 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 @@ -68,7 +68,6 @@ function AcqLiTable() { this.realCopiesRow = this.realCopiesTbody.removeChild(dojo.byId('acq-lit-real-copies-row')); this._copy_fields_for_acqdf = ['owning_lib', 'location']; this.skipInitialEligibilityCheck = false; - this.invoiceLinkDialogManager = new InvoiceLinkDialogManager("li"); this.claimDialog = new ClaimDialogManager( liClaimDialog, finalClaimDialog, this.claimEligibleLidByLi, function(li) { /* callback that fires when claims are made */ @@ -501,6 +500,10 @@ function AcqLiTable() { nodeByName("action_none", row).selected = true; }; actLinkInvoice.onclick = function() { + if (!self.invoiceLinkDialogManager) { + self.invoiceLinkDialogManager = + new InvoiceLinkDialogManager("li"); + } self.invoiceLinkDialogManager.target = li; acqLitLinkInvoiceDialog.show(); nodeByName("action_none", row).selected = true; diff --git a/Open-ILS/web/js/ui/default/acq/po/view_po.js b/Open-ILS/web/js/ui/default/acq/po/view_po.js index 05ee24a76f..cec6abc96a 100644 --- a/Open-ILS/web/js/ui/default/acq/po/view_po.js +++ b/Open-ILS/web/js/ui/default/acq/po/view_po.js @@ -295,9 +295,6 @@ function prepareInvoiceFeatures() { "/acq/invoice/view?create=1&attach_po=" + PO.id(); }; - if (!invoiceLinkDialogManager) - invoiceLinkDialogManager = new InvoiceLinkDialogManager("po", PO); - openils.Util.show("acq-po-invoice-stuff", "table-cell"); } diff --git a/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2 b/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2 index 28466b4417..3bec75cf9a 100644 --- a/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2 +++ b/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2 @@ -4,21 +4,21 @@ diff --git a/Open-ILS/web/templates/default/acq/po/view.tt2 b/Open-ILS/web/templates/default/acq/po/view.tt2 index 1f14d9ad24..cc4bf1e8c8 100644 --- a/Open-ILS/web/templates/default/acq/po/view.tt2 +++ b/Open-ILS/web/templates/default/acq/po/view.tt2 @@ -70,6 +70,14 @@ Link Invoice