pass the patron barcode into the opac when embedded in the patron display, and use...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 23 Feb 2009 22:56:49 +0000 (22:56 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 23 Feb 2009 22:56:49 +0000 (22:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12276 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/main/constants.js
Open-ILS/xul/staff_client/server/patron/display.js
Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/holds.xul

index 795f27c..20e1e92 100644 (file)
@@ -285,7 +285,7 @@ const urls = {
        'XUL_OFFLINE_MANAGE_XACTS' : '/xul/server/admin/offline_manage_xacts.xul',
        'XUL_OFFLINE_MANAGE_XACTS_CGI' : '/cgi-bin/offline/offline.pl',
        'XUL_OFFLINE_GENERATE_WIDGETS' : '/xul/server/main/gen_offline_widgets.xul',
-       /* 'XUL_OPAC_WRAPPER' : '/xul/server/cat/opac.xul', */
+       'XUL_REMOTE_OPAC_WRAPPER' : '/xul/server/cat/opac.xul',
        'XUL_OPAC_WRAPPER' : 'chrome://open_ils_staff_client/content/cat/opac.xul',
        'XUL_PATRON_BARCODE_ENTRY' : '/xul/server/patron/barcode_entry.xul',
        'XUL_PATRON_BILLS' : '/xul/server/patron/bills.xul',
index fb9b84b..249c807 100644 (file)
@@ -307,25 +307,30 @@ patron.display.prototype = {
                                        'cmd_patron_holds' : [
                                                ['command'],
                                                function(ev) {
-                            try { document.getElementById("PatronNavBarScrollbox").ensureElementIsVisible( document.getElementById("PatronNavBar_holds" ) ); } catch(E) {};
-                                                       obj.reset_nav_styling('cmd_patron_holds');
-                                                       obj.right_deck.set_iframe(
-                                                               urls.XUL_PATRON_HOLDS,  
-                                                               //+ '?patron_id=' + window.escape( obj.patron.id() ),
-                                                               {},
-                                                               {
-                                    'display_window' : window,
-                                                                       'patron_id' : obj.patron.id(),
-                                                                       'on_list_change' : function(h) {
-                                                                               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                                                                               //obj.summary_window.g.summary.controller.render('patron_holds');
-                                                                               //obj.summary_window.g.summary.controller.render('patron_standing_penalties');
-                                                                               obj.refresh_all();
-                                                                       },
-                                                                       'url_prefix' : xulG.url_prefix,
-                                                                       'new_tab' : xulG.new_tab
-                                                               }
-                                                       );
+                            try {
+                                try { document.getElementById("PatronNavBarScrollbox").ensureElementIsVisible( document.getElementById("PatronNavBar_holds" ) ); } catch(E) {};
+                                obj.reset_nav_styling('cmd_patron_holds');
+                                obj.right_deck.set_iframe(
+                                    urls.XUL_PATRON_HOLDS,     
+                                    //+ '?patron_id=' + window.escape( obj.patron.id() ),
+                                    {},
+                                    {
+                                        'display_window' : window,
+                                        'patron_id' : obj.patron.id(),
+                                        'patron_barcode' : obj.patron.card().barcode(),
+                                        'on_list_change' : function(h) {
+                                            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+                                            //obj.summary_window.g.summary.controller.render('patron_holds');
+                                            //obj.summary_window.g.summary.controller.render('patron_standing_penalties');
+                                            obj.refresh_all();
+                                        },
+                                        'url_prefix' : xulG.url_prefix,
+                                        'new_tab' : xulG.new_tab
+                                    }
+                                );
+                            } catch(E) {
+                                alert(E);
+                            }
                                                }
                                        ],
                                        'cmd_patron_bills' : [
index 7330132..55f3780 100644 (file)
@@ -35,6 +35,7 @@ patron.holds.prototype = {
                var obj = this;
 
                obj.patron_id = params['patron_id'];
+               obj.patron_barcode = params['patron_barcode'];
                obj.docid = params['docid'];
                obj.shelf = params['shelf'];
                obj.tree_id = params['tree_id'];
@@ -905,7 +906,7 @@ patron.holds.prototype = {
                     'cmd_search_opac' : [
                         ['command'],
                         function(ev) {
-                            var content_params = { 'session' : ses(), 'authtime' : ses('authtime'), 'patron_id' : obj.patron_id };
+                            var content_params = { 'session' : ses(), 'authtime' : ses('authtime'), 'patron_barcode' : obj.patron_barcode };
                             content_params.new_tab = xulG.new_tab;
                             content_params.set_tab = xulG.set_tab;
                             content_params.set_tab_name = xulG.set_tab_name;
@@ -913,7 +914,7 @@ patron.holds.prototype = {
                             content_params.url_prefix = xulG.url_prefix;
                             content_params.network_meter = xulG.network_meter;
                             content_params.chrome_xulG = xulG.chrome_xulG;
-                            xulG.display_window.g.patron.right_deck.set_iframe( urls.XUL_OPAC_WRAPPER, {}, content_params);
+                            xulG.display_window.g.patron.right_deck.set_iframe( urls.XUL_REMOTE_OPAC_WRAPPER, {}, content_params);
                         }
                     ]
                                }
index f449a65..65f3e24 100644 (file)
@@ -49,6 +49,7 @@
                                g.holds.init( 
                                        { 
                                                'patron_id' : xul_param('patron_id'), 
+                                               'patron_barcode' : xul_param('patron_barcode'), 
                                                'docid' : xul_param('docid'),
                                                'shelf' : xul_param('shelf'),
                                                'pull' : xul_param('pull'),