Invice show/hide summary button; part 2
authorBill Erickson <berick@esilibrary.com>
Mon, 16 Jul 2012 17:21:45 +0000 (13:21 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 16 Jul 2012 17:21:45 +0000 (13:21 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/acq/invoice/common.js
Open-ILS/web/js/ui/default/acq/invoice/view.js

index 03fade4..7f84afc 100644 (file)
@@ -23,6 +23,18 @@ function drawInvoicePane(parentNode, inv, args) {
         override[field] = {widgetValue : args[field]};
     }
 
+    // push the name of the invoice into the name display field after update
+    override.inv_ident = dojo.mixin(
+        override.inv_ident,
+        {dijitArgs : {onChange :
+            function(newVal) {
+                if (dojo.byId('acq-invoice-summary-name'))
+                    dojo.byId('acq-invoice-summary-name').innerHTML = newVal;
+            }
+        }}
+    );
+
+
     var pane = new openils.widget.EditPane({
         fmObject : inv,
         paneStackCount : 2,
index dd4934f..b707316 100644 (file)
@@ -128,10 +128,6 @@ function renderInvoice() {
     }
 
     if(invoice) {
-
-        // TODO : update for new invoices
-        dojo.byId('acq-invoice-summary-name').innerHTML = invoice.inv_ident();
-
         dojo.forEach(
             invoice.items(),
             function(item) {