on display refresh, cycle through each iframe in the right panel and look for .conten...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Dec 2005 00:51:44 +0000 (00:51 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Dec 2005 00:51:44 +0000 (00:51 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2484 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/bills.js
Open-ILS/xul/staff_client/server/patron/bills.xul
Open-ILS/xul/staff_client/server/patron/display.js
Open-ILS/xul/staff_client/server/patron/summary.xul

index dbe09cf..007f8b9 100644 (file)
@@ -3,14 +3,14 @@ dump('entering patron.bills.js\n');
 if (typeof patron == 'undefined') patron = {};
 patron.bills = function (params) {
 
-       try { JSAN.use('util.error'); this.error = new util.error(); } catch(E) { alert(E); }
-       try { JSAN.use('util.network'); this.network = new util.network(); } catch(E) { alert(E); }
+       var obj = this;
+       try { JSAN.use('util.error'); obj.error = new util.error(); } catch(E) { alert(E); }
+       try { JSAN.use('util.network'); obj.network = new util.network(); } catch(E) { alert(E); }
        try { 
-               this.OpenILS = {}; JSAN.use('OpenILS.data'); this.OpenILS.data = new OpenILS.data(); this.OpenILS.data.init({'via':'stash'}); 
+               obj.OpenILS = {}; JSAN.use('OpenILS.data'); obj.OpenILS.data = new OpenILS.data(); obj.OpenILS.data.init({'via':'stash'}); 
        } catch(E) { 
                alert(E); 
        }
-       window.refresh = function() { this.refresh(); }
 }
 
 patron.bills.prototype = {
index 75c8adf..c89e774 100644 (file)
@@ -47,6 +47,7 @@
                                                'session' : g.cgi.param('session') 
                                        } 
                                );
+                               window.refresh = function() { g.bills.refresh(); }
        
                        } catch(E) {
                                var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
index 7dad363..7fc2efe 100644 (file)
@@ -57,7 +57,8 @@ patron.display.prototype = {
                                                        obj.controller.view.patron_name.setAttribute(
                                                                'value','Retrieving...'
                                                        );
-                                                       obj.summary_window.g.summary.retrieve();
+                                                       try { obj.summary_window.refresh(); } catch(E) { dump(E + '\n'); }
+                                                       try { obj.refresh_deck(); } catch(E) { dump(E + '\n'); }
                                                }
                                        ],
                                        'cmd_patron_checkout' : [
@@ -201,6 +202,24 @@ patron.display.prototype = {
        },
 
        '_checkout_spawned' : false,
+
+       'refresh_deck' : function() {
+               var obj = this;
+               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+               for (var i = 0; i < obj.right_deck.node.childNodes.length; i++) {
+                       try {
+
+                               var f = obj.right_deck.node.childNodes[i];
+                               var w = f.contentWindow;
+                               if (typeof w.refresh == 'function') {
+                                       w.refresh();
+                               }
+
+                       } catch(E) {
+                               dump('refresh_deck: ' + E + '\n');
+                       }
+               }
+       },
 }
 
 dump('exiting patron/display.js\n');
index 6e324a3..5d02c5e 100644 (file)
@@ -42,6 +42,9 @@
 
                                JSAN.use('patron.summary'); g.summary = new patron.summary();
                                g.summary.init( { 'barcode' : g.cgi.param('barcode') , 'session' : g.cgi.param('session') } );
+
+                               window.refresh = function () { g.summary.retrieve(); }
+
                        } catch(E) {
                                var err_msg = "!! This software has encountered an error.  Please tell your friendly " +
                                        "system administrator or software developer the following:\n" + E + '\n';