[open-ils-commits] r8464 - in
trunk/Open-ILS/xul/staff_client/chrome/content: OpenILS util
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jan 22 14:40:36 EST 2008
Author: phasefx
Date: 2008-01-22 14:14:07 -0500 (Tue, 22 Jan 2008)
New Revision: 8464
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
trunk/Open-ILS/xul/staff_client/chrome/content/util/window.js
Log:
util.window was relying on xulG, but when called from the main.menu framework, there is no xulG. This fixes the Operator Change regression, and the chrome Perm Denied/Re-Auth regression
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js 2008-01-22 19:11:14 UTC (rev 8463)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js 2008-01-22 19:14:07 UTC (rev 8464)
@@ -213,4 +213,10 @@
window.open(uri, "_blank", winopts);
}
+ function url_prefix(url) {
+ if (url.match(/^\//)) url = urls.remote + url;
+ if (! url.match(/^(http|chrome):\/\//) && ! url.match(/^data:/) ) url = 'http://' + url;
+ dump('url_prefix = ' + url + '\n');
+ return url;
+ }
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/window.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/window.js 2008-01-22 19:11:14 UTC (rev 8463)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/window.js 2008-01-22 19:14:07 UTC (rev 8464)
@@ -83,9 +83,13 @@
if (typeof data.modal_xulG_stack == 'undefined') data.modal_xulG_stack = {};
/* FIXME - not a perfect key.. could imagine two top-level windows both opening modal windows */
key = url;
- if (typeof xulG == 'object') if (typeof xulG.url_prefix == 'function') {
- key = key.replace( xulG.url_prefix('/'), '/' );
- }
+ if (typeof xulG == 'object') {
+ if (typeof xulG.url_prefix == 'function') {
+ key = key.replace( xulG.url_prefix('/'), '/' );
+ }
+ } else if (typeof url_prefix == 'function') {
+ key = key.replace( url_prefix('/'), '/' );
+ }
if (typeof data.modal_xulG_stack[key] == 'undefined') data.modal_xulG_stack[key] = [];
data.modal_xulG_stack[key].push( my_xulG );
data.stash('modal_xulG_stack');
More information about the open-ils-commits
mailing list