patron.display sets it up so that circ.checkout can talk to patron.summary
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 11 Dec 2005 19:56:23 +0000 (19:56 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 11 Dec 2005 19:56:23 +0000 (19:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2340 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/evergreen/util/deck.js
Open-ILS/xul/staff_client/server/patron/display.js
Open-ILS/xul/staff_client/server/patron/summary.xul

index aa99bc3..afa5b6f 100644 (file)
@@ -36,8 +36,9 @@ util.deck.prototype = {
                var idx = this.find_index(url);
                if (idx>-1) {
                        this.node.selectedIndex = idx;
+                       return this.node.childNodes[idx];
                } else {
-                       this.new_iframe(url,params,content_params);
+                       return this.new_iframe(url,params,content_params);
                }
                
                
@@ -45,7 +46,7 @@ util.deck.prototype = {
 
        'reset_iframe' : function (url,params,content_params) {
                this.remove_iframe(url);
-               this.new_iframe(url,params,content_params);
+               return this.new_iframe(url,params,content_params);
        },
 
        'new_iframe' : function (url,params,content_params) {
@@ -67,6 +68,7 @@ util.deck.prototype = {
                                dump('E: ' + E + '\n');
                        }
                }
+               return iframe;
        },
 
        'remove_iframe' : function (url) {
index 86ce6ed..ebf47cf 100644 (file)
@@ -52,10 +52,10 @@ patron.display.prototype = {
                                                                {},
                                                                { 
                                                                        'on_checkout' : function(checkout) {
-                                                                               var c = obj.patron.checkouts();
+                                                                               var c = obj.summary_window.g.summary.patron.checkouts();
                                                                                c.push( checkout );
-                                                                               obj.patron.checkouts( c );
-                                                                               obj.controller.render('patron_checkouts');
+                                                                               obj.summary_window.g.summary.patron.checkouts( c );
+                                                                               obj.summary_window.g.summary.controller.render('patron_checkouts');
                                                                        }
                                                                }
                                                        );
@@ -119,7 +119,7 @@ patron.display.prototype = {
                );
 
                if (obj.barcode) {
-                       obj.left_deck.set_iframe(
+                       var frame = obj.left_deck.set_iframe(
                                urls.remote_patron_summary
                                +'?session=' + window.escape(obj.session)
                                +'&barcode=' + window.escape(obj.barcode), 
@@ -130,6 +130,7 @@ patron.display.prototype = {
                                        }
                                }
                        );
+                       obj.summary_window = frame.contentWindow;
                }
        },
 }
index 5e4b402..6e324a3 100644 (file)
@@ -42,7 +42,6 @@
 
                                JSAN.use('patron.summary'); g.summary = new patron.summary();
                                g.summary.init( { 'barcode' : g.cgi.param('barcode') , 'session' : g.cgi.param('session') } );
-       
                        } 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';