[open-ils-commits] r17821 - in trunk/Open-ILS/web: js/ui/default/acq/common js/ui/default/acq/po templates/default/acq/common templates/default/acq/po (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Sep 19 19:53:37 EDT 2010
Author: senator
Date: 2010-09-19 19:53:36 -0400 (Sun, 19 Sep 2010)
New Revision: 17821
Modified:
trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js
trunk/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2
trunk/Open-ILS/web/templates/default/acq/po/view.tt2
Log:
Acq: Delay loading of providers for invoice-linking dialogs until
they're really needed.
Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-09-19 22:45:01 UTC (rev 17820)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js 2010-09-19 23:53:36 UTC (rev 17821)
@@ -68,7 +68,6 @@
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 @@
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;
Modified: trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js 2010-09-19 22:45:01 UTC (rev 17820)
+++ trunk/Open-ILS/web/js/ui/default/acq/po/view_po.js 2010-09-19 23:53:36 UTC (rev 17821)
@@ -295,9 +295,6 @@
"/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");
}
Modified: trunk/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2 2010-09-19 22:45:01 UTC (rev 17820)
+++ trunk/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2 2010-09-19 23:53:36 UTC (rev 17821)
@@ -4,21 +4,21 @@
<table class="acq-link-invoice-dialog">
<tr>
<th>
- <label for="acq-[% which %]-link-invoice-provider">Provider</label>
+ <label for="acq-[% which %]-link-invoice-inv_ident">
+ Invoice #
+ </label>
</th>
<td>
- <span id="acq-[% which %]-link-invoice-provider"></span>
+ <input id="acq-[% which %]-link-invoice-inv_ident"
+ dojoType="dijit.form.TextBox" />
</td>
</tr>
<tr>
<th>
- <label for="acq-[% which %]-link-invoice-inv_ident">
- Invoice #
- </label>
+ <label for="acq-[% which %]-link-invoice-provider">Provider</label>
</th>
<td>
- <input id="acq-[% which %]-link-invoice-inv_ident"
- dojoType="dijit.form.TextBox" />
+ <span id="acq-[% which %]-link-invoice-provider"></span>
</td>
</tr>
<tr>
Modified: trunk/Open-ILS/web/templates/default/acq/po/view.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/po/view.tt2 2010-09-19 22:45:01 UTC (rev 17820)
+++ trunk/Open-ILS/web/templates/default/acq/po/view.tt2 2010-09-19 23:53:36 UTC (rev 17821)
@@ -70,6 +70,14 @@
<span>Link Invoice</span>
<div dojoType="dijit.TooltipDialog"
id="acq-po-link-invoice">
+ <script type="dojo/connect" event="onOpen">
+ if (!invoiceLinkDialogManager) {
+ invoiceLinkDialogManager =
+ new InvoiceLinkDialogManager(
+ "po", PO
+ );
+ }
+ </script>
[% INCLUDE "default/acq/common/inv_dialog.tt2"
which = "po" %]
</div>
More information about the open-ils-commits
mailing list