[open-ils-commits] r10227 -
branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jul 31 14:49:49 EDT 2008
Author: erickson
Date: 2008-07-31 14:49:41 -0400 (Thu, 31 Jul 2008)
New Revision: 10227
Modified:
branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js
Log:
if you set signed.applets.codebase_principal_support to true in about:config in Firefox, you now have the option to bypass the printer dialog if you accept the security dialogs
Modified: branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js 2008-07-31 17:27:33 UTC (rev 10226)
+++ branches/rel_1_2/Open-ILS/web/opac/extras/selfcheck/selfcheck.js 2008-07-31 18:49:41 UTC (rev 10227)
@@ -39,6 +39,8 @@
var cgi = new CGI();
var staff = grabUser(cookieManager.read(STAFF_SES_PARAM) || cgi.param(STAFF_SES_PARAM));
+ selfckSetupPrinter();
+
/*
XXX we need org information (from the proxy?)
var t = fetchOrgSettingDefault(1, 'circ.selfcheck.patron_login_timeout');
@@ -77,8 +79,23 @@
selfckTryPatronCookie();
// selfckMkDummyCirc(); // testing only
+
}
+function selfckSetupPrinter() {
+ try { // Mozilla only
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesRead');
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesWrite');
+ var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+ if (pref)
+ pref.setBoolPref('print.always_print_silent', true);
+ } catch(E) {
+
+ }
+}
+
function selfckTryPatronCookie() {
var pb = cookieManager.read(PATRON_BARCODE_COOKIE);
if(pb) {
More information about the open-ils-commits
mailing list