Populate variable needed for batch item receive
authorDan Wells <dbw2@calvin.edu>
Wed, 3 Apr 2013 16:44:23 +0000 (12:44 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 3 Apr 2013 19:23:06 +0000 (15:23 -0400)
In the integrated alt editor, we load the sub. grid differently, so
'sub' was not being populated.  Since we should only ever have one
subscription showing at a time (in this view), we can simply assign
the item to 'sub' as it is received.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/js/ui/default/serial/subscription.js

index 10c6345..6f1291f 100644 (file)
@@ -320,6 +320,9 @@ openils.Util.addOnLoad(
             ssub_grid.onPostUpdate = function(fmObject) {
                 parent.document.getElementById(window.name).refresh_command();
             }
+            ssub_grid.onItemReceived = function(item) {
+                sub = item;
+            }
             if (cgi.param("tab") in tab_dispatch) {
                 ssub_grid._fresh = false; // force View/Edit tab to reload (otherwise, it is blank) XXX why?
                 tab_container.selectChild(tab_dispatch[cgi.param("tab")]);