[open-ils-commits] r17822 - in branches/rel_2_0/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:55:22 EDT 2010


Author: senator
Date: 2010-09-19 19:55:21 -0400 (Sun, 19 Sep 2010)
New Revision: 17822

Modified:
   branches/rel_2_0/Open-ILS/web/js/ui/default/acq/common/li_table.js
   branches/rel_2_0/Open-ILS/web/js/ui/default/acq/po/view_po.js
   branches/rel_2_0/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2
   branches/rel_2_0/Open-ILS/web/templates/default/acq/po/view.tt2
Log:
Backport r17821 from trunk: delay acq provider loading


Modified: branches/rel_2_0/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-09-19 23:53:36 UTC (rev 17821)
+++ branches/rel_2_0/Open-ILS/web/js/ui/default/acq/common/li_table.js	2010-09-19 23:55:21 UTC (rev 17822)
@@ -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: branches/rel_2_0/Open-ILS/web/js/ui/default/acq/po/view_po.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/ui/default/acq/po/view_po.js	2010-09-19 23:53:36 UTC (rev 17821)
+++ branches/rel_2_0/Open-ILS/web/js/ui/default/acq/po/view_po.js	2010-09-19 23:55:21 UTC (rev 17822)
@@ -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: branches/rel_2_0/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2
===================================================================
--- branches/rel_2_0/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2	2010-09-19 23:53:36 UTC (rev 17821)
+++ branches/rel_2_0/Open-ILS/web/templates/default/acq/common/inv_dialog.tt2	2010-09-19 23:55:21 UTC (rev 17822)
@@ -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: branches/rel_2_0/Open-ILS/web/templates/default/acq/po/view.tt2
===================================================================
--- branches/rel_2_0/Open-ILS/web/templates/default/acq/po/view.tt2	2010-09-19 23:53:36 UTC (rev 17821)
+++ branches/rel_2_0/Open-ILS/web/templates/default/acq/po/view.tt2	2010-09-19 23:55:21 UTC (rev 17822)
@@ -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