[open-ils-commits] r8169 - in
branches/rel_1_2/Open-ILS/xul/staff_client:
chrome/content/OpenILS server/patron
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Dec 7 20:00:26 EST 2007
Author: phasefx
Date: 2007-12-07 19:40:25 -0500 (Fri, 07 Dec 2007)
New Revision: 8169
Modified:
branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
branches/rel_1_2/Open-ILS/xul/staff_client/server/patron/bill_details.xul
branches/rel_1_2/Open-ILS/xul/staff_client/server/patron/bill_history.xul
Log:
Hrmm, going back to the old--url param--way of passing data around windows/iframes here. Fixes a regression where Item Details weren't showing for Bill History/Alternate View/Full Details in billing interface. Remind me to never use iframes in the next major staff client overhaul; I'll use Bill & Mike's clone template node strategy first. :) Let's also trap the error I'm working around here, TypeError: this.docShell has no properties when trying to access the contentWindow for these specific iframes
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js 2007-12-07 04:09:10 UTC (rev 8168)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js 2007-12-08 00:40:25 UTC (rev 8169)
@@ -38,13 +38,21 @@
}
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) {
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/patron/bill_details.xul
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/patron/bill_details.xul 2007-12-07 04:09:10 UTC (rev 8168)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/patron/bill_details.xul 2007-12-08 00:40:25 UTC (rev 8169)
@@ -115,8 +115,8 @@
$('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(
Modified: branches/rel_1_2/Open-ILS/xul/staff_client/server/patron/bill_history.xul
===================================================================
--- branches/rel_1_2/Open-ILS/xul/staff_client/server/patron/bill_history.xul 2007-12-07 04:09:10 UTC (rev 8168)
+++ branches/rel_1_2/Open-ILS/xul/staff_client/server/patron/bill_history.xul 2007-12-08 00:40:25 UTC (rev 8169)
@@ -159,8 +159,8 @@
$('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(
More information about the open-ils-commits
mailing list