[open-ils-commits] r12212 - in branches/staff-client-experiment/Open-ILS/xul/staff_client: chrome/content/main server/main (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Feb 17 22:22:36 EST 2009
Author: phasefx
Date: 2009-02-17 22:22:34 -0500 (Tue, 17 Feb 2009)
New Revision: 12212
Modified:
branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.js
branches/staff-client-experiment/Open-ILS/xul/staff_client/server/main/data.xul
Log:
I broke the New Window button on the login screen when moving the menu system to remote xul. This should fix it
Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.js
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.js 2009-02-17 23:19:16 UTC (rev 12211)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/main/main.js 2009-02-18 03:22:34 UTC (rev 12212)
@@ -1,6 +1,7 @@
dump('entering main/main.js\n');
// vim:noet:sw=4:ts=4:
+var xulG;
var offlineStrings;
var authStrings;
@@ -148,7 +149,7 @@
grant_perms(url);
- var xulG = {
+ xulG = {
'auth' : G.auth,
'url' : url,
'window' : G.window,
@@ -162,6 +163,7 @@
var iframe = document.createElement('iframe'); deck.appendChild(iframe);
iframe.setAttribute( 'src', url + '/xul/server/main/data.xul' );
iframe.contentWindow.xulG = xulG;
+ G.data_xul = iframe.contentWindow;
} else {
xulG.file = G.file;
var deck = G.auth.controller.view.ws_deck;
@@ -316,9 +318,13 @@
function() {
if (G.data.session) {
try {
- G.window.open('chrome://open_ils_staff_client/content/main/menu_frame.xul?server=' +
- G.data.server,'main','chrome,resizable' );
-
+ //G.data_xul.g.open_menu();
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ var mframe = xulG.window.open(G.data.server + urls.XUL_MENU_FRAME
+ + '?server='+window.escape(G.data.server),
+ 'main'+xulG.window.window_name_increment(),'chrome,resizable'
+ );
+ mframe.xulG = xulG;
} catch(E) { alert(E); }
} else {
alert ( offlineStrings.getString('main.new_window_btn.login_first_warning') );
Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/server/main/data.xul
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/server/main/data.xul 2009-02-17 23:19:16 UTC (rev 12211)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/server/main/data.xul 2009-02-18 03:22:34 UTC (rev 12212)
@@ -220,17 +220,25 @@
document.getElementById('caption').setAttribute('label', document.getElementById('commonStrings').getString('staff.main.data.loaded'));
+ g.open_menu();
+
+ } catch(E) {
+ alert(E);
+ }
+ }
+
+ g.open_menu = function() {
+ try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var mframe = xulG.window.open(urls.XUL_MENU_FRAME
+ '?server='+window.escape(xulG.url),
'main'+xulG.window.window_name_increment(),'chrome,resizable'
);
mframe.xulG = xulG; // This is the xulG from main.js, with auth, url, and window
-
} catch(E) {
alert(E);
}
- }
+ }
g.data.init();
More information about the open-ils-commits
mailing list