[open-ils-commits] r12261 - in trunk/Open-ILS/xul/staff_client: chrome/content/main defaults/preferences (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Feb 22 01:34:13 EST 2009
Author: phasefx
Date: 2009-02-22 01:34:10 -0500 (Sun, 22 Feb 2009)
New Revision: 12261
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/main/main.js
trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
trunk/Open-ILS/xul/staff_client/defaults/preferences/prefs.js
Log:
pref for disabling accesskeys on tabs
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/main.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/main.js 2009-02-22 05:45:12 UTC (rev 12260)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/main.js 2009-02-22 06:34:10 UTC (rev 12261)
@@ -8,15 +8,13 @@
function grant_perms(url) {
var perms = "UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead";
dump('Granting ' + perms + ' to ' + url + '\n');
- var pref = Components.classes["@mozilla.org/preferences-service;1"]
- .getService(Components.interfaces.nsIPrefBranch);
- if (pref) {
- pref.setCharPref("capability.principal.codebase.p0.granted", perms);
- pref.setCharPref("capability.principal.codebase.p0.id", url);
- pref.setCharPref("capability.principal.codebase.p1.granted", perms);
- pref.setCharPref("capability.principal.codebase.p1.id", url.replace('http:','https:'));
- pref.setBoolPref("dom.disable_open_during_load",false);
- pref.setBoolPref("browser.popups.showPopupBlocker",false);
+ if (G.pref) {
+ G.pref.setCharPref("capability.principal.codebase.p0.granted", perms);
+ G.pref.setCharPref("capability.principal.codebase.p0.id", url);
+ G.pref.setCharPref("capability.principal.codebase.p1.granted", perms);
+ G.pref.setCharPref("capability.principal.codebase.p1.id", url.replace('http:','https:'));
+ G.pref.setBoolPref("dom.disable_open_during_load",false);
+ G.pref.setBoolPref("browser.popups.showPopupBlocker",false);
}
}
@@ -89,8 +87,6 @@
}
/////////////////////////////////////////////////////////////////////////////
- var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
-
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
@@ -98,6 +94,8 @@
var mw = self;
G = {};
+
+ G.pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
JSAN.use('util.error');
G.error = new util.error();
@@ -153,7 +151,8 @@
'auth' : G.auth,
'url' : url,
'window' : G.window,
- 'data' : G.data
+ 'data' : G.data,
+ 'pref' : G.pref
};
if (G.data.ws_info && G.data.ws_info[G.auth.controller.view.server_prompt.value]) {
@@ -296,7 +295,7 @@
document.getElementById('debug_gb').hidden = false;
}
- if (pref && pref.getBoolPref('open-ils.debug_options')) {
+ if (G.pref && G.pref.getBoolPref('open-ils.debug_options')) {
document.getElementById('debug_gb').hidden = false;
}
@@ -377,7 +376,7 @@
false
);
- if ( found_ws_info_in_Achrome() && pref && pref.getBoolPref("open-ils.write_in_user_chrome_directory") ) {
+ if ( found_ws_info_in_Achrome() && G.pref && G.pref.getBoolPref("open-ils.write_in_user_chrome_directory") ) {
//var hbox = x.parentNode; var b = document.createElement('button');
//b.setAttribute('label','Migrate legacy settings'); hbox.appendChild(b);
//b.addEventListener(
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2009-02-22 05:45:12 UTC (rev 12260)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js 2009-02-22 06:34:10 UTC (rev 12261)
@@ -26,6 +26,13 @@
},
false
);
+
+ if (xulG.pref.getBoolPref('open-ils.disable_accesskeys_on_tabs')) {
+ var tabs = document.getElementById('main_tabs');
+ for (var i = 0; i < tabs.childNodes.length; i++) {
+ tabs.childNodes[i].setAttribute('accesskey','');
+ }
+ }
}
main.menu.prototype = {
Modified: trunk/Open-ILS/xul/staff_client/defaults/preferences/prefs.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/defaults/preferences/prefs.js 2009-02-22 05:45:12 UTC (rev 12260)
+++ trunk/Open-ILS/xul/staff_client/defaults/preferences/prefs.js 2009-02-22 06:34:10 UTC (rev 12261)
@@ -5,6 +5,10 @@
// This one is required for XUL Runner
pref("toolkit.defaultChromeURI", "chrome://open_ils_staff_client/content/main/main.xul");
+// These are specific to Evergreen
+pref("open-ils.write_in_user_chrome_directory", true);
+pref("open-ils.disable_accesskeys_on_tabs", false);
+
// Let's try to enable tracemonkey
pref("javascript.options.jit.chrome", true);
pref("javascript.options.jit.content", true);
@@ -23,9 +27,6 @@
// navigator.xul not being registered. But is about:blank the best value to use here?
pref("browser.chromeURL","about:blank");
-// This one is specific for Open-ILS
-pref("open-ils.write_in_user_chrome_directory", true);
-
// This one just makes things speedier. We use a lot of XMLHttpRequest
pref("network.http.max-persistent-connections-per-server",8);
More information about the open-ils-commits
mailing list