From 728ec3caad638d4bbd965bf0d681ab90cd61ad87 Mon Sep 17 00:00:00 2001 From: pines Date: Tue, 30 Jan 2007 21:00:43 +0000 Subject: [PATCH] relative URL's can cause errors with window.open git-svn-id: svn://svn.open-ils.org/ILS/trunk@6833 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/chrome/content/util/error.js | 6 +++++- Open-ILS/xul/staff_client/server/patron/display.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/util/error.js b/Open-ILS/xul/staff_client/chrome/content/util/error.js index ef45712a71..a01dfa38b9 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/error.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/error.js @@ -348,6 +348,7 @@ util.error.prototype = { var data = new OpenILS.data(); data.init({'via':'stash'}); data.temp_yns_xml = xml; data.stash('temp_yns_xml'); var url = urls.XUL_FANCY_PROMPT + '?xml_in_stash=temp_yns_xml' + '&title=' + window.escape(title); + if (xulG && xulG.url_prefix) url = xulG.url_prefix( url ); window.open( url, 'fancy_prompt', 'chrome,resizable,modal,width=700,height=500' ); @@ -365,7 +366,9 @@ util.error.prototype = { } catch(E) { - alert('yns_alert failed: ' + E + '\ns = ' + s + '\ntitle = ' + title + '\nb1 = ' + b1 + '\nb2 = ' + b2 + '\nb3 = ' + b3 + '\nc = ' + c + '\nimage = ' + image + '\n'); + dump('yns_alert failed: ' + E + '\ns = ' + s + '\ntitle = ' + title + '\nb1 = ' + b1 + '\nb2 = ' + b2 + '\nb3 = ' + b3 + '\nc = ' + c + '\nimage = ' + image + '\n'); + + this.yns_alert_original(s + '\n\nAlso, yns_alert failed: ' + E,title,b1,b2,b3,c); } }, @@ -414,6 +417,7 @@ util.error.prototype = { var data = new OpenILS.data(); data.init({'via':'stash'}); data.temp_yns_xml = xml; data.stash('temp_yns_xml'); var url = urls.XUL_FANCY_PROMPT + '?xml_in_stash=temp_yns_xml' + '&title=' + window.escape(title); + if (xulG && xulG.url_prefix) url = xulG.url_prefix( url ); window.open( url, 'fancy_prompt', 'chrome,resizable,modal,width=700,height=500' ); diff --git a/Open-ILS/xul/staff_client/server/patron/display.js b/Open-ILS/xul/staff_client/server/patron/display.js index 0c33b159fe..136ca39673 100644 --- a/Open-ILS/xul/staff_client/server/patron/display.js +++ b/Open-ILS/xul/staff_client/server/patron/display.js @@ -277,6 +277,7 @@ patron.display.prototype = { + '?patron_id=' + window.escape( obj.patron.id() ), {}, { + 'url_prefix' : xulG.url_prefix, 'on_money_change' : function(b) { //alert('test'); netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); -- 2.43.2