/* Get locale from preferences */
var LOCALE = '';
+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
LOCALE = pref.getCharPref('general.useragent.locale');
} catch (E) {
dump("Failed to fetch a locale from preferences: " + E + "\n");
LOCALE = 'en-US';
}
+var use_tpac = false;
+try {
+ use_tpac = pref.getBoolPref('oils.use_tpac');
+} catch (E) {
+ dump("Failed to get TPac preference: " + E + "\n");
+}
+
const MODE_RDONLY = 0x01;
const MODE_WRONLY = 0x02;
const MODE_CREATE = 0x08;
'EG_ACQ_USER_REQUESTS' : '/eg/acq/picklist/user_request',
'XUL_SERIAL_BATCH_RECEIVE': '/xul/server/serial/batch_receive.xul'
}
+
+if(use_tpac) {
+ urls['opac'] = '/eg/opac/advanced';
+ urls['opac_rdetail'] = '/eg/opac/record/';
+ urls['opac_rresult'] = '/eg/opac/results';
+ urls['opac_rresult_metarecord'] = '/eg/opac/results?metarecord=';
+ urls['browser'] = urls.opac;
+}
pref("open-ils.menu.toolbar.mode", "");
pref("open-ils.menu.toolbar.labelbelow", false);
pref("open-ils.toolbar.defaultnewtab", false);
+
+// Template Toolkit Opac Enabled in Staff Client
+pref("oils.use_tpac", false);