Hrmm, going back to the old--url param--way of passing data around windows/iframes...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 8 Dec 2007 00:46:21 +0000 (00:46 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 8 Dec 2007 00:46:21 +0000 (00:46 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_1@8171 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
Open-ILS/xul/staff_client/server/patron/bill_details.xul
Open-ILS/xul/staff_client/server/patron/bill_history.xul

index 43ef5d4..987c2b7 100644 (file)
        }
 
        function get_contentWindow(frame) {
-               netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
-               if (frame && frame.contentWindow) {
-                       if (typeof frame.contentWindow.wrappedJSObject != 'undefined') return frame.contentWindow.wrappedJSObject;
-                       return frame.contentWindow;
-               } else {
-                       return null;
-               }
+        try {
+            netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+            if (frame && frame.contentWindow) {
+                try {
+                    if (typeof frame.contentWindow.wrappedJSObject != 'undefined') return frame.contentWindow.wrappedJSObject;
+                } catch(E) {
+                    alert("Error with get_contentWindow("+frame+") and wrappedJSObject:" + E);
+                }
+                return frame.contentWindow;
+            } else {
+                return null;
+            }
+        } catch(E) {
+            alert("Error with get_contentWindow("+frame+"): " + E);
+        }
        }
 
        function update_modal_xulG(v) {
index 994922d..c960693 100644 (file)
                                                $('renewal').value = r || 'No';
 
                                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                                               $('copy_summary').setAttribute('src',urls.XUL_COPY_SUMMARY); // + '?copy_id=' + r_circ.target_copy());
-                                               get_contentWindow($('copy_summary')).xulG = { 'copy_id' : r_circ.target_copy() };
+                                               $('copy_summary').setAttribute('src',urls.XUL_COPY_SUMMARY + '?copy_id=' + r_circ.target_copy());
+                                               //get_contentWindow($('copy_summary')).xulG = { 'copy_id' : r_circ.target_copy() };
                                                $('copy_summary').hidden=false;
 
                                                g.network.simple_request(
index ac1df9f..5070047 100644 (file)
                                                $('due').value = r_circ.due_date() ? r_circ.due_date().toString().substr(0,10) : '';
 
                                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-                                               $('copy_summary').setAttribute('src',urls.XUL_COPY_SUMMARY); // + '?copy_id=' + r_circ.target_copy());
-                                               get_contentWindow($('copy_summary')).xulG = { 'copy_id' : r_circ.target_copy() };
+                                               $('copy_summary').setAttribute('src',urls.XUL_COPY_SUMMARY + '?copy_id=' + r_circ.target_copy());
+                                               //get_contentWindow($('copy_summary')).xulG = { 'copy_id' : r_circ.target_copy() };
                                                $('copy_summary').hidden=false;
 
                                                g.network.simple_request(