$ctx->{full_path} = $ctx->{base_path} . $self->cgi->path_info;
$ctx->{unparsed_uri} = $self->apache->unparsed_uri;
$ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
- $ctx->{is_staff} = 0; # Assume false, check for workstation id later. Was: ($self->apache->headers_in->get('User-Agent') =~ /oils_xulrunner/);
+ $ctx->{is_staff} = ($self->apache->headers_in->get('OILS-Wrapper') =~ /true/);
+ $ctx->{proto} = 'oils' if $ctx->{is_staff};
$ctx->{physical_loc} = $self->get_physical_loc;
# capture some commonly accessed pages
'open-ils.actor',
'open-ils.actor.user.opac.vital_stats',
$e->authtoken, $e->requestor->id);
- $ctx->{is_staff} = 1 if $e->requestor->wsid;
} else {
-cookie=>$cgi->cookie(
-name=>'ses',
-value=>$auth_ses,
- -path=>'/'
+ -path=>'/',
+ -secure=>1
)
);
return Apache2::Const::REDIRECT;
$cookie = $cgi->cookie(
-name=>'ses',
-value=>$auth_ses,
- -path=>'/'
+ -path=>'/',
+ -secure=>1
);
}
}
-[%-
- USE CGI = CGI_utf8;
- hostname = CGI.url({'-base' => 1});
--%]
<div id="footer-wrap">
<div id="footer">
- <a href="[% hostname %]">[% l('Dynamic catalog') %]</a> |
+ <a href="/">[% l('Dynamic catalog') %]</a> |
<a href="http://example.com">[% l('Bottom Link 2') %]</a> |
<a href="http://example.com">[% l('Bottom Link 3') %]</a> |
<a href="http://example.com">[% l('Bottom Link 4') %]</a> |
END;
ELSE;
# staying on the current page
- cgi.url("-path" => 1, "-query" => 1) _ final;
+ cgi.url("-absolute" => 1, "-path" => 1, "-query" => 1) _ final;
END;
END;
dojo.require('dijit.layout.SplitContainer');
dojo.require('dojox.widget.Toaster');
dojo.require('dojox.fx');
+dojo.require('openils.XUL');
dojo.requireLocalization("openils.conify", "conify");
// some handy globals
var cgi = new CGI();
var ses = dojo.cookie('ses') || cgi.param('ses');
+if(!ses && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ ses = stash.session.key;
+}
var pcrud = new openils.PermaCrud({ authtoken : ses });
var current_ou, current_ou_hoo, ou_list_store;
dojo.require('dijit.layout.SplitContainer');
dojo.require('dojox.widget.Toaster');
dojo.require('dojox.fx');
+dojo.require('openils.XUL');
dojo.requireLocalization("openils.conify", "conify");
// some handy globals
var cgi = new CGI();
var ses = dojo.cookie('ses') || cgi.param('ses');
+if(!ses && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ ses = stash.session.key;
+}
var pCRUD = new openils.PermaCrud({authtoken:ses});
var current_type;
dojo.require('dojox.widget.Toaster');
dojo.require('dojox.fx');
dojo.require('dojox.grid.Grid');
+dojo.require('openils.XUL');
dojo.requireLocalization("openils.conify", "conify");
// some handy globals
var cgi = new CGI();
var ses = dojo.cookie('ses') || cgi.param('ses');
+if(!ses && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ ses = stash.session.key;
+}
var pCRUD = new openils.PermaCrud({authtoken:ses});
var current_status;
dojo.require('dojox.widget.Toaster');
dojo.require('dojox.fx');
dojo.require('dojox.grid.Grid');
+dojo.require('openils.XUL');
dojo.requireLocalization("openils.conify", "conify");
console.log('loading marc_code_maps.js');
// some handy globals
var cgi = new CGI();
var ses = dojo.cookie('ses') || cgi.param('ses');
+if(!ses && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ ses = stash.session.key;
+}
var pCRUD = new openils.PermaCrud({authtoken:ses});
console.log('initialized pcrud session');
dojo.require('dojox.widget.Toaster');
dojo.require('dojox.fx');
dojo.require('dojox.grid.Grid');
+dojo.require('openils.XUL');
dojo.requireLocalization("openils.conify", "conify");
// some handy globals
var cgi = new CGI();
var ses = dojo.cookie('ses') || cgi.param('ses');
+if(!ses && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ ses = stash.session.key;
+}
var server = {};
server.pcrud = new openils.PermaCrud({ authtoken : ses });
server.actor = new OpenSRF.ClientSession('open-ils.actor');
dojo.require('dojox.widget.Toaster');
dojo.require('dojox.fx');
dojo.require('dojox.grid.Grid');
+dojo.require('openils.XUL');
dojo.requireLocalization("openils.conify", "conify");
// some handy globals
var cgi = new CGI();
var ses = dojo.cookie('ses') || cgi.param('ses');
+if(!ses && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ ses = stash.session.key;
+}
var pCRUD = new openils.PermaCrud({authtoken : ses});
var ppl_strings = dojo.i18n.getLocalization('openils.conify', 'conify');
dojo.declare('openils.XUL', null, {});
openils.XUL.isXUL = function() {
- return Boolean(dojo.cookie('xul')) || Boolean(window.IAMXUL);
+ if(location.protocol == 'chrome:' || location.protocol == 'oils:') return true;
+ return Boolean(window.IAMXUL);
}
try {
openils.XUL.getStash = function() {
if(openils.XUL.isXUL()) {
try {
- if(openils.XUL.enableXPConnect()) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
- var CacheClass = new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
- return new CacheClass().wrappedJSObject.OpenILS.prototype.data;
- }
+ var CacheClass = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
+ return CacheClass.wrappedJSObject.data;
} catch(e) {
console.log("Error loading XUL stash: " + e);
return { 'error' : e };
return xulG.get_new_session({callback : callback});
}
- /**
- * This can be used by privileged Firefox in addition to XUL.
- * To use use in Firefox directly, set signed.applets.codebase_principal_support to true in about:config
- */
- openils.XUL.enableXPConnect = function() {
- try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
- } catch (E) {
- if(dojo.isFF) {
- console.error("Unable to enable UniversalXPConnect privileges. " +
- "Try setting 'signed.applets.codebase_principal_support' to true in about:config");
- }
- return false;
- }
- return true;
- }
-
/* This class cuts down on the obscenely long incantations needed to
* use XPCOM components. */
openils.XUL.SimpleXPCOM = function() {};
"create": function(key) {
return Components.classes[this[key].cls].
createInstance(this[key].iface);
- },
- "getPrivilegeManager": function() {
- return netscape.security.PrivilegeManager;
}
};
openils.XUL.contentFromFileOpenDialog = function(windowTitle, sizeLimit) {
var api = new openils.XUL.SimpleXPCOM();
- /* The following enablePrivilege() call must happen at this exact
- * level of scope -- not wrapped in another function -- otherwise
- * it doesn't work. */
- api.getPrivilegeManager().enablePrivilege("UniversalXPConnect");
-
var picker = api.create("FP");
picker.init(
window, windowTitle || "Upload File", api.FP.iface.modeOpen
openils.XUL.contentToFileSaveDialog = function(content, windowTitle, dispositionArgs) {
var api = new openils.XUL.SimpleXPCOM();
- api.getPrivilegeManager().enablePrivilege("UniversalXPConnect");
var picker = api.create("FP");
picker.init(
dojo.require("dijit.form.TextBox");
dojo.require("dijit.form.FilteringSelect");
dojo.require("dojox.jsonPath");
+ dojo.require('openils.XUL');
dojo.requireLocalization("openils.widget", "TranslatorPopup");
var _trans_dijit = this;
- if (typeof(ses) == "undefined")
+ if (typeof(ses) == "undefined") {
var ses = cgi.param("ses") || dojo.cookie("ses");
+ if(!ses && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ ses = stash.session.key;
+ }
+ }
OpenSRF.CachedClientSession('open-ils.permacrud').request({
method : 'open-ils.permacrud.' + method + '.i18n',
}
}
- dojo.cookie('ses', authtoken, {path:'/'});
+ dojo.cookie('ses', authtoken, {path:'/', 'secure' : true});
openils.User.authtoken = authtoken;
openils.User.workstation = workstation;
return authtoken;
no_xulG : false,
show_nav_buttons : true,
show_print_button : true,
- opac_url : xulG.url_prefix(xulG.urls.opac_rdetail + bib_id),
+ opac_url : xulG.url_prefix('opac_rdetail|' + bib_id),
default_view : default_view
}
);
/* To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config */
- if(!openils.XUL.enableXPConnect()) return;
-
if(openils.XUL.isXUL()) {
win = window.open('/xul/' + openils.XUL.buildId() + '/server/cat/marcedit.xul');
} else {
widget.widget,
'onKeyPress',
function(ev){
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
if (!(ev.altKey || ev.ctrlKey || ev.metaKey)) {
if (lock_ready && xulG && typeof xulG.lock_tab == 'function') {
if (! already_locked) {
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
*/
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
win.xulG = {
return;
}
- var url = "/xul/server/serial/batch_receive.xul?docid=" +
+ var url = "XUL_SERIAL_BATCH_RECEIVE?docid=" +
sub.record_entry() + "&subid=" + sub.id();
try {
return;
}
try {
- netscape.security.PrivilegeManager.enablePrivilege(
- "UniversalXPConnect"
- );
window.openDialog(
- xulG.url_prefix("/xul/server/serial/pattern_wizard.xul"),
+ xulG.url_prefix("XUL_SERIAL_PATTERN_WIZARD"),
"pattern_wizard",
"width=800",
function(value) {
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
*/
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
var type;
url = 'http://'+XML_HTTP_SERVER+'/'+XML_HTTP_GATEWAY;
if( url.match(/^http:/) &&
- (this.secure || location.href.match(/^https:/) || location.href.match(/^chrome:/) ) ) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+ (this.secure || location.href.match(/^https:/) || location.href.match(/^chrome:/) || location.href.match(/^oils:/) ) ) {
url = url.replace(/^http:/, 'https:');
}
}
function fetchXULStash() {
if( isXUL() ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- var __OILS = new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
- var data_cache = new __OILS( );
- return data_cache.wrappedJSObject.OpenILS.prototype.data;
+ var __OILS = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
+ return __OILS.wrappedJSObject.data;
} catch(E) {
_debug('Error in OpenILS.data._debug_stash(): ' + js2JSON(E) );
/* define it again here for pages that don't load RemoteRequest */
-function isXUL() { try { if(IAMXUL) return true;}catch(e){return false;}; }
+function isXUL() {
+ if(location.protocol == 'chrome:' || location.protocol == 'oils:') return true;
+ try { if(IAMXUL) return true;}catch(e){return false;};
+}
var __ilsEvent; /* the last event the occurred */
var p = [];
if(isXUL()) {
- if(!location.href.match(/^https:/))
+ if(!location.href.match(/^https:/) && !location.href.match(/^oils:/))
this.request.setSecure(false);
} else {
function findBaseURL(ssl) {
var path = findBasePath();
var proto = (ssl) ? "https:" : "http:";
+ if(ssl && location.protocol == 'oils:') proto = 'oils:';
/* strip port numbers. This is necessary for browsers that
send an explicit <host>:80, 443 - explicit ports
if(!IE) {
if(!consoleService) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
this.consoleService = Components.classes['@mozilla.org/consoleservice;1']
.getService(Components.interfaces.nsIConsoleService);
} catch(e) {}
try {
if(consoleService) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
consoleService.logStringMessage(str + '\n');
}
} catch(e){}
var string = "";
if( ssl == undefined && (
- location.protocol == 'https:' ||
+ location.protocol == 'https:' || location.protocol == 'oils:' ||
(forceLoginSSL && G.user && G.user.session))) {
ssl = true;
}
}
function setSessionCookie(ses) {
- dojo.cookie(COOKIE_SES, ses);
+ dojo.cookie(COOKIE_SES, ses, {'secure':'true'});
}
<script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
<script type="text/javascript" src="/js/dojo/openils/User.js"></script>
<script type="text/javascript" src="/js/dojo/openils/Util.js"></script>
+ <script type="text/javascript" src="/js/dojo/openils/XUL.js"></script>
<script type="text/javascript" src="/opac/extras/circ/alt_holds_print.js"></script>
<script type="text/javascript">
function my_init() {
cgi = new CGI();
authtoken = (typeof ses == "function" ? ses() : 0) ||
cgi.param("ses") || dojo.cookie("ses");
+ if(!authtoken && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ authtoken = stash.session.key;
+ }
if (cgi.param("do") == "shelf_expired_holds") {
dojo.query("th[name=barcode_part]")[0].innerHTML = "Barcode"; /* XXX i18n. also, no support for part labels in this interface, at least for now */
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
*/
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
dojo.require('openils.PermaCrud');
dojo.require('dojo.cookie');
oilsRptCurrentOrg = USER.ws_ou();
- dojo.cookie(COOKIE_SES, SESSION, { 'path' : '/'});
- dojo.cookie('ws_ou', USER.ws_ou(), { 'path' : '/'});
+ dojo.cookie(COOKIE_SES, SESSION, { 'path' : '/', 'secure' : true});
+ dojo.cookie('ws_ou', USER.ws_ou(), { 'path' : '/', 'secure' : true});
oilsRptFetchOrgTree(
function() {
dojo.requireLocalization("openils.reports", "reports");
+dojo.require('openils.XUL');
var rpt_strings = dojo.i18n.getLocalization("openils.reports", "reports");
var idlNS = "http://opensrf.org/spec/IDL/base/v1";
function loadTemplate(id) {
var cgi = new CGI();
var session = cgi.param('ses');
-
+ if(!session && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ session = stash.session.key;
+ }
var r = new Request('open-ils.reporter:open-ils.reporter.template.retrieve', session, id);
r.callback(
return true;
}
-function getSourceDefinition(class) {
- var class_obj = getIDLClass(class);
+function getSourceDefinition(aClass) {
+ var class_obj = getIDLClass(aClass);
return class_obj.getAttributeNS(persistNS,'tablename') ||
'(' + class_obj.getElementsByTagNameNS(persistNS,'source_definition')[0].textContent + ')';
}
</commandset>
<popupset>
- <popup id="source-menu" position="after_start"/>
+ <menupopup id="source-menu" position="after_start"/>
<popup
id="calendar-widget"
position="before_start"
# from http://closure-compiler.googlecode.com/files/compiler-latest.zip FIXME: Autotools this?
export CLOSURE_COMPILER_JAR = ~/closure-compiler/compiler.jar
-XULRUNNER_VERSION=3.6.25
+
+# XULRunner is our base.
+XULRUNNER_VERSION=14.0.1
XULRUNNER_WINFILE=xulrunner-$(XULRUNNER_VERSION).en-US.win32.zip
XULRUNNER_LINUXFILE=xulrunner-$(XULRUNNER_VERSION).en-US.linux-i686.tar.bz2
XULRUNNER_URL=ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$(XULRUNNER_VERSION)/runtimes/
+XULRUNNER_MAJOR_VERSION=$$(echo ${XULRUNNER_VERSION} | cut -d. -f1)
+
+# Extensions we include when not an extension ourselves
+# Grab the latest. If that becomes a problem we can swap them out for specific versions.
+DOMINSPECTOR_URL=https://addons.mozilla.org/firefox/downloads/latest/6622/addon-6622-latest.xpi
+DOMINSPECTOR_ID=inspector@mozilla.org
+VENKMAN_URL=https://addons.mozilla.org/firefox/downloads/latest/216/addon-216-latest.xpi
+VENKMAN_ID={f13b157f-b174-47e7-a34d-4815ddfdfeb8}
OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript"
CHROME_LOCALES = $$(ls -1 chrome/locale)
@cp -fR defaults build/
@cp -fR components build/
@cp application.ini build/
+ @cp chrome.manifest build/
@if [ -f "install.mccoy.rdf" ]; then cp install.mccoy.rdf build/install.rdf; else cp install.rdf build/; fi
@cp -fR build/chrome/content/util/ build/server/
@cp -fR build/chrome/content/auth/ build/server/
@if [ -n "${STAFF_CLIENT_STAMP_ID}" ]; then find build/ -name '*.js' -exec sed -i -e s/xul\\\/server/xul\\\/${STAFF_CLIENT_STAMP_ID}\\\/server/g {} \; ; fi
@if [ -n "${STAFF_CLIENT_STAMP_ID}" ]; then find build/ -name '*.xml' -exec sed -i -e s/xul\\\/server/xul\\\/${STAFF_CLIENT_STAMP_ID}\\\/server/g {} \; ; fi
@if [ -n "${STAFF_CLIENT_STAMP_ID}" ]; then find build/ -name 'constants.js' -exec sed -i -e "s/\(CLIENT_STAMP *= '\)'/\1${STAFF_CLIENT_STAMP_ID}'/" {} \; ; fi
+ @if [ -n "${STAFF_CLIENT_NAME}" ]; then sed -i -e s/^Name=.\*/Name=${STAFF_CLIENT_NAME}/ build/application.ini ; fi
@if [ -z "${AUTOUPDATE_HOST}" ]; then rm -f build/defaults/preferences/autoupdate.js; fi
@if [ -z "${AUTOUPDATE_HOST}" ]; then sed -i -e /updateURL/d build/install.rdf; fi
@if [ -n "${AUTOUPDATE_HOST}" ]; then echo "Applying automatic update host ${AUTOUPDATE_HOST}"; fi
client_app: client_dir
@echo 'Cleaning Extension Information'
@rm -f client/install.rdf
+ @echo 'Installing Extensions'
+ @mkdir -p client/extensions
+# Note: XULRunner before 4 requires extracted extensions
+# XULRunner after 4 keeps them in XPI form...unless their manifest says to unpack
+# This block is thus structured to make it easy to add the latter kind later.
+ @if [ ${XULRUNNER_MAJOR_VERSION} -lt 4 ]; then \
+ if [ -f extensions/${DOMINSPECTOR_ID}.xpi ]; then \
+ mkdir -p client/extensions/${DOMINSPECTOR_ID}/; \
+ unzip extensions/${DOMINSPECTOR_ID}.xpi -d client/extensions/${DOMINSPECTOR_ID}/; \
+ fi; \
+ if [ -f extensions/${VENKMAN_ID}.xpi ]; then \
+ mkdir -p client/extensions/${VENKMAN_ID}/; \
+ unzip extensions/${VENKMAN_ID}.xpi -d client/extensions/${VENKMAN_ID}/; \
+ fi; \
+ else \
+ if [ -f extensions/${DOMINSPECTOR_ID}.xpi ]; then \
+ cp extensions/${DOMINSPECTOR_ID}.xpi client/extensions/; \
+ fi; \
+ if [ -f extensions/${VENKMAN_ID}.xpi ]; then \
+ cp extensions/${VENKMAN_ID}.xpi client/extensions/; \
+ fi; \
+ fi
# If automatic updates are enabled, or the standalone_xul_app.js is present,
# the extension can break Firefox.
-# Remove those, and we need a chrome.manifest
+# Also, per machine registration + extension mode is probably a bad idea.
+# Remove those, and we need an updated chrome.manifest
client_ext: client_dir
@echo 'Cleaning App Information'
@rm -f client/defaults/preferences/autoupdate.js
@rm -f client/defaults/preferences/autochannel.js
@rm -f client/defaults/preferences/standalone_xul_app.js
+ @rm -f client/defaults/preferences/aa_per_machine.js
@echo 'Prepping chrome.manifest'
@perl -ne 'if(/open_ils_staff_client/) { s/ (?!chrome:\/\/open_ils_staff_client)([^ ]*)$$/ chrome\/\1/; print; }' client/chrome/chrome.manifest > client/chrome.manifest
+ @grep -v manifest build/chrome.manifest >> client/chrome.manifest
# Would merge client_ext into this one, but this way an installer that doesn't
# use an xpi can be made for extension later, if desired
@(cd client/ && zip -q -r ../evergreen.xpi * -x defaults/preferences/standalone_xul_app.js)
@md5sum evergreen.xpi > evergreen.xpi.md5
+# Fetch extensions to load into the client
+# This could be done in a "if they aren't there" fashion, but these are manually triggered anyway
+# That, and this way you can update the extensions by running this target again
+fetch-extensions: fetch-dom-inspector fetch-venkman
+
+fetch-dom-inspector:
+ @echo 'Fetching DOM Inspector'
+ @mkdir -p extensions/
+ @wget -Oextensions/${DOMINSPECTOR_ID}.xpi ${DOMINSPECTOR_URL}
+
+fetch-venkman:
+ @echo 'Fetching Venkman'
+ @mkdir -p extensions/
+ @wget -Oextensions/${VENKMAN_ID}.xpi ${VENKMAN_URL}
+
# Generic client, as an xpi, theoretically suitable for --install-app usage
generic-client: client_app
@if [ ! -f ${XULRUNNER_WINFILE} ]; then wget ${XULRUNNER_URL}${XULRUNNER_WINFILE}; fi
@unzip -q ${XULRUNNER_WINFILE} -dclient
@if [ -f client/defaults/preferences/autoupdate.js ]; then echo 'pref("app.update.channel","win");' >> client/defaults/preferences/autochannel.js; fi;
+ @if [ -d branding_win ]; then cp -fR branding_win/* client/; fi
@echo 'Preparing stub'
@if [ -f xulrunner-stub.exe ]; then cp xulrunner-stub.exe client/evergreen.exe; rm client/xulrunner/xulrunner-stub.exe; else mv client/xulrunner/xulrunner-stub.exe client/evergreen.exe; fi
+ @if [ ${XULRUNNER_MAJOR_VERSION} -ge 4 -a -f client/xulrunner/mozcrt19.dll ]; then cp client/xulrunner/mozcrt19.dll client/; fi # XULRunner 4+ need this, if the file exists
+ @if [ ${XULRUNNER_MAJOR_VERSION} -ge 9 -a -f client/xulrunner/mozutils.dll ]; then cp client/xulrunner/mozutils.dll client/; fi # XULRunner 9+ need this, if the file exists
linux-xulrunner: client_app
@echo 'Preparing Linux xulrunner'
@if [ ! -f ${XULRUNNER_LINUXFILE} ]; then wget ${XULRUNNER_URL}${XULRUNNER_LINUXFILE}; fi
@cd client; tar xjf ../${XULRUNNER_LINUXFILE}; cd ..
@if [ -f client/defaults/preferences/autoupdate.js ]; then echo 'pref("app.update.channel","lin");' >> client/defaults/preferences/autochannel.js; fi;
+ @if [ -d branding_lin ]; then cp -fR branding_lin/* client/; fi
@echo 'Preparing stub'
@mv client/xulrunner/xulrunner-stub client/evergreen
; application requires. It should be specified if your application uses
; unfrozen interfaces. Specifying 1.8 matches all releases with a version
; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2).
-MaxVersion=2.0
+MaxVersion=14.*
[XRE]
EnableExtensionManager=1
--- /dev/null
+# Grab manifest from chrome directory
+manifest chrome/chrome.manifest
+# Grab xulrunner binary manifest
+manifest components/binary.manifest
+
+# Register our components
+#component {classID} components/file.js
+#contract @foobar/mycomponent;1 {classID}
+#category category-name MyComponent @foobar/mycomponent;1
+
+# Data Store Component
+component {dc3e4b5f-c0f4-4b34-bc57-7b4099c3a5d6} components/nsOpenILS.js
+contract @open-ils.org/openils_data_cache;1 {dc3e4b5f-c0f4-4b34-bc57-7b4099c3a5d6}
+
+# Command Line Handler
+component {7e608198-7355-483a-a85a-20322e4ef91a} components/clh.js
+contract @mozilla.org/commandlinehandler/general-startup;1?type=egcli {7e608198-7355-483a-a85a-20322e4ef91a}
+category command-line-handler m-egcli @mozilla.org/commandlinehandler/general-startup;1?type=egcli
+
+# Remote XUL Protocol (oils://)
+component {51d35450-5e59-11e1-b86c-0800200c9a66} components/oils_protocol.js
+contract @mozilla.org/network/protocol;1?name=oils {51d35450-5e59-11e1-b86c-0800200c9a66}
+
+# Force External
+component {D969ED61-DF4C-FA12-A2A6-70AA94C222FB} components/forceexternal.js
+contract @mozilla.org/content-policy;1?type=egfe {D969ED61-DF4C-FA12-A2A6-70AA94C222FB}
+category content-policy m-egfe @mozilla.org/content-policy;1?type=egfe
locale branding en-US branding/locale/en-US/
overlay chrome://browser/content/browser.xul chrome://open_ils_staff_client/content/firefox/overlay.xul
-
-style chrome://global/content/customizeToolbar.xul chrome://venkman/skin/venkman-overlay.css
-overlay chrome://messenger/content/messenger.xul chrome://venkman/content/venkman-overlay.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6}
-overlay chrome://venkman/content/venkman-menus.xul chrome://communicator/content/tasksOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-overlay chrome://communicator/content/tasksOverlay.xul chrome://venkman/content/venkman-overlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-overlay chrome://calendar/content/calendar.xul chrome://venkman/content/venkman-overlay.xul application={718e30fb-e89b-41dd-9da7-e25a45638b28}
-overlay chrome://venkman/content/venkman.xul chrome://communicator/content/utilityOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-content venkman-ff jar:venkman.jar!/content/venkman/ff/
-content venkman jar:venkman.jar!/content/venkman/
-content venkman jar:venkman.jar!/content/venkman/ contentaccessible=yes
-skin venkman modern/1.0 jar:venkman.jar!/skin/modern/venkman/
-content venkman-sm jar:venkman.jar!/content/venkman/sm/
-overlay chrome://browser/content/browser.xul chrome://venkman/content/venkman-overlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={a463f10c-3994-11da-9945-000d60ca027b}
-locale venkman en-US jar:venkman.jar!/locale/en-US/venkman/
-
-locale inspector de jar:inspector.jar!/locale/de/inspector/
-overlay chrome://inspector/content/inspector.xul chrome://communicator/content/utilityOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-locale inspector en-US jar:inspector.jar!/locale/en-US/inspector/
-overlay chrome://inspector/content/popupOverlay.xul chrome://inspector/content/viewers/dom/popupOverlay.xul
-overlay chrome://messenger/content/mailWindowOverlay.xul chrome://inspector/content/tasksOverlay-tb.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6}
-overlay chrome://browser/content/macBrowserOverlay.xul chrome://inspector/content/tasksOverlay-ff.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
-overlay chrome://communicator/content/tasksOverlay.xul chrome://inspector/content/tasksOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-overlay chrome://inspector/content/commandOverlay.xul chrome://inspector/content/viewers/styleRules/commandOverlay.xul
-overlay chrome://calendar/content/calendar.xul chrome://inspector/content/tasksOverlay-sb.xul application={718e30fb-e89b-41dd-9da7-e25a45638b28}
-overlay chrome://inspector/content/keysetOverlay.xul chrome://inspector/content/viewers/dom/keysetOverlay.xul
-skin inspector classic/1.0 jar:inspector.jar!/skin/classic/inspector/
-overlay chrome://browser/content/browser.xul chrome://inspector/content/tasksOverlay-ff.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
-skin inspector modern/1.0 jar:inspector.jar!/skin/modern/inspector/
-locale inspector sk jar:inspector.jar!/locale/sk/inspector/
-overlay chrome://inspector/content/popupOverlay.xul chrome://inspector/content/viewers/styleRules/popupOverlay.xul
-overlay chrome://communicator/content/pref/preferences.xul chrome://inspector/content/prefs/prefsOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-content inspector jar:inspector.jar!/content/inspector/ xpcnativewrappers=no
-overlay chrome://inspector/content/commandOverlay.xul chrome://inspector/content/viewers/dom/commandOverlay.xul
-overlay chrome://inspector/content/inspector.xul chrome://browser/content/baseMenuOverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
-overlay chrome://inspector/content/inspector.xul chrome://communicator/content/tasksOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-
-content chromelist jar:chrome_list.jar!/content/
-skin chromelist modern/1.0 jar:chrome_list.jar!/skin/
-locale chromelist en-US jar:chrome_list.jar!/locale/
-overlay chrome://browser/content/browser.xul chrome://chromelist/content/overlay/ChromeListOverlay.xul
-overlay chrome://messenger/content/messenger.xul chrome://chromelist/content/overlay/ChromeListOverlay.xul
-
obj.observers.add = function(full_path, func) {
try {
obj.error.sdump('D_OBSERVERS', 'entering observers.add\nfull_path = ' + full_path + '\nfunc = ' + func + '\n');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- const OpenILS=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
- var data_cache=new OpenILS( );
- var stash = data_cache.wrappedJSObject.OpenILS.prototype.data;
+ var data_cache = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
+ var stash = data_cache.wrappedJSObject.data;
var id = obj.observers.id++;
if (typeof obj.observers.cache[ full_path ] == 'undefined') obj.observers.cache[ full_path ] = {};
'stash' : function () {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- const OpenILS=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
- var data_cache=new OpenILS( );
+ var data_cache = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
for (var i = 0; i < arguments.length; i++) {
try {
if (arguments[i] != 'hash' && arguments[i] != 'list') this.error.sdump('D_DATA_STASH','stashing ' + arguments[i] + ' : ' + this[arguments[i]] + (typeof this[arguments[i]] == 'object' ? ' = ' + (this[arguments[i]]) : '') + '\n');
} catch(F) { alert(F); }
- data_cache.wrappedJSObject.OpenILS.prototype.data[arguments[i]] = this[arguments[i]];
+ data_cache.wrappedJSObject.data[arguments[i]] = this[arguments[i]];
}
} catch(E) {
this.error.sdump('D_ERROR','Error in OpenILS.data.stash(): ' + js2JSON(E) );
'_debug_stash' : function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- const OpenILS=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
- var data_cache=new OpenILS( );
- for (var i in data_cache.wrappedJSObject.OpenILS.prototype.data) {
+ var data_cache = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
+ for (var i in data_cache.wrappedJSObject.data) {
dump('_debug_stash ' + i + '\n');
}
} catch(E) {
'stash_retrieve' : function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- const OpenILS=new Components.Constructor("@mozilla.org/openils_data_cache;1", "nsIOpenILS");
- var data_cache=new OpenILS( );
- var dc = data_cache.wrappedJSObject.OpenILS.prototype.data;
+ var data_cache = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
+ var dc = data_cache.wrappedJSObject.data;
for (var i in dc) {
this.error.sdump('D_DATA_RETRIEVE','Retrieving ' + i + ' : ' + dc[i] + '\n');
this[i] = dc[i];
},
'network_retrieve' : function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
JSAN.use('util.file'); var file = new util.file('global_font_adjust');
function gen_fm_retrieval_func(classname,data) {
var app = data[0]; var method = data[1]; var params = data[2]; var cacheable = data[3];
return function () {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
function convert() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
try {
if (obj.list[classname].constructor.name == 'Array') {
obj.hash[classname] =
this.chain.push(
function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var f = gen_fm_retrieval_func(
'my_asv',
[
]
);
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
f();
} catch(E) {
var error = 'Error: ' + js2JSON(E);
this.chain.push(
function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var f = gen_fm_retrieval_func(
'asv',
[
]
);
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
f();
} catch(E) {
var error = 'Error: ' + js2JSON(E);
}
}
+ function oils_persist_hostname() {
+ if(location.protocol == 'oils:') {
+ JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
+ return data.server_unadorned;
+ } else {
+ return location.hostname;
+ }
+ }
+
function persist_helper(base_key_suffix) {
try {
if (base_key_suffix) {
function gen_oils_persist_handler(bk,node) {
return function(ev) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var target;
if (ev.target.nodeName == 'command') {
target = node;
}
}
var filename = location.pathname.split('/')[ location.pathname.split('/').length - 1 ];
- var base_key = 'oils_persist_' + String(location.hostname + '_' + filename + '_' + target.getAttribute('id')).replace('/','_','g') + '_' + base_key_suffix;
+ var base_key = 'oils_persist_' + String(oils_persist_hostname() + '_' + filename + '_' + target.getAttribute('id')).replace('/','_','g') + '_' + base_key_suffix;
var attribute_list = target.getAttribute('oils_persist').split(' ');
dump('on_oils_persist: <<< ' + target.nodeName + '.id = ' + target.id + '\t' + bk + '\n');
for (var j = 0; j < attribute_list.length; j++) {
};
}
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
var nodes = document.getElementsByAttribute('oils_persist','*');
for (var i = 0; i < nodes.length; i++) {
var filename = location.pathname.split('/')[ location.pathname.split('/').length - 1 ];
- var base_key = 'oils_persist_' + String(location.hostname + '_' + filename + '_' + nodes[i].getAttribute('id')).replace('/','_','g') + '_' + base_key_suffix;
+ var base_key = 'oils_persist_' + String(oils_persist_hostname() + '_' + filename + '_' + nodes[i].getAttribute('id')).replace('/','_','g') + '_' + base_key_suffix;
var attribute_list = nodes[i].getAttribute('oils_persist').split(' ');
dump('persist_helper: >>> ' + nodes[i].nodeName + '.id = ' + nodes[i].id + '\t' + base_key + '\n');
for (var j = 0; j < attribute_list.length; j++) {
function get_contentWindow(frame) {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
if (frame && frame.contentWindow) {
try {
if (typeof frame.contentWindow.wrappedJSObject != 'undefined') {
function copy_to_clipboard(ev) {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var text;
if (typeof ev == 'object') {
if (typeof ev.target != 'undefined') {
function clear_the_cache() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var cacheClass = Components.classes["@mozilla.org/network/cache-service;1"];
var cacheService = cacheClass.getService(Components.interfaces.nsICacheService);
cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK);
}
function url_prefix(url) {
+ var base_url = url.match(/^[^?/|]+/);
+ if(base_url) {
+ base_url = base_url[0];
+ if(urls[base_url])
+ url = url.replace(/^[^?/|]+\|/, urls[base_url]);
+ }
if (url.match(/^\//)) url = urls.remote + url;
- if (! url.match(/^(http|chrome):\/\//) && ! url.match(/^data:/) ) url = 'http://' + url;
+ if (! url.match(/^(http|https|chrome|oils):\/\//) && ! url.match(/^data:/) ) url = 'http://' + url;
dump('url_prefix = ' + url + '\n');
return url;
}
dump('pulling in custom.js in util_overlay_chrome.xul\n');
// Pull in local customizations
var r = new XMLHttpRequest();
- r.open("GET", xulG.url_prefix('/xul/server/skin/custom.js'), false);
+ var custom_js = xulG.url_prefix('CUSTOM_JS');
+ r.open("GET", custom_js, false);
r.send(null);
if (r.status == 200) {
- dump('Evaluating /xul/server/skin/custom.js\n');
+ dump('Evaluating ' + custom_js + '\n');
eval( r.responseText );
}
} else {
dump('pulling in custom.js in util_overlay_offline.xul\n');
// Pull in local customizations
var r = new XMLHttpRequest();
- r.open("GET", xulG.url_prefix('/xul/server/skin/custom.js'), false);
+ var custom_js = xulG.url_prefix('CUSTOM_JS');
+ r.open("GET", custom_js, false);
r.send(null);
if (r.status == 200) {
- dump('Evaluating /xul/server/skin/custom.js\n');
+ dump('Evaluating ' + custom_js + '\n');
eval( r.responseText );
}
} else {
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("offlineStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
ws.name /*+ ' @ ' + ws.lib_shortname*/
)
);
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('last_ws_server');
file.set_object(obj.controller.view.server_prompt.value);
file.close();
'test_server' : function(url) {
var obj = this;
if (!url) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('last_ws_server');
if (file._file.exists()) {
url = file.get_object(); file.close();
this.data.menu_perms = false;
this.data.current_hotkeyset = undefined;
this.data.enable_debug = this.data.debug_client;
+ this.data.session = undefined;
this.data.stash('menu_perms');
this.data.stash('current_hotkeyset');
this.data.stash('enable_debug');
+ this.data.stash('session');
/* FIXME - need some locking or object destruction for the async tests */
/* this.test_server( this.controller.view.server_prompt.value ); */
var obj = this;
obj.error.sdump('D_AUTH','auth.session.close()\n');
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- Components.classes["@mozilla.org/cookiemanager;1"]
- .getService(Components.interfaces.nsICookieManager).removeAll();
+ // Remove *our* cookie(s), but leave any from elsewhere alone.
+ JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve();
+ var host = data.server_unadorned;
+ host = host.toLowerCase();
+ var cookieManager = Components.classes["@mozilla.org/cookiemanager;1"]
+ .getService(Components.interfaces.nsICookieManager);
+ var iter = cookieManager.enumerator;
+ while (iter.hasMoreElements()) {
+ var cookie = iter.getNext();
+ if (cookie instanceof Components.interfaces.nsICookie) {
+ var temphost = cookie.host.toLowerCase();
+ if(temphost == host || temphost == '.' + host) {
+ cookieManager.remove(cookie.host, cookie.name, cookie.path, cookie.blocked);
+ }
+ }
+ }
} catch(E) {
dump('Error in auth/session.js, close(): ' + E + '\n');
}
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(document.getElementById('offlineStrings').getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
// Pull in local customizations
var r = new XMLHttpRequest();
- r.open("GET", xulG.url_prefix('/xul/server/skin/custom.js'), false);
+ var custom_js = xulG.url_prefix('CUSTOM_JS');
+ r.open("GET", custom_js, false);
r.send(null);
if (r.status == 200) {
- dump('Evaluating /xul/server/skin/custom.js\n');
+ dump('Evaluating ' + custom_js + '\n');
eval( r.responseText );
}
}
function set_brief_view() {
- var url = xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid);
+ var url = xulG.url_prefix( 'XUL_BIB_BRIEF?docid=' ) + window.escape(docid);
dump('spawning ' + url + '\n');
var content_params = {
function set_marc_view() {
g.view = 'marc_view';
if (marc_view_reset) {
- bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG);
+ bottom_pane.reset_iframe( xulG.url_prefix( 'XUL_MARC_VIEW?docid=' ) + window.escape(docid),{},xulG);
marc_view_reset = false;
} else {
- bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_MARC_VIEW ) + '?docid=' + window.escape(docid),{},xulG);
+ bottom_pane.set_iframe( xulG.url_prefix( 'XUL_MARC_VIEW?docid=' ) + window.escape(docid),{},xulG);
}
opac_wrapper_set_help_context();
bottom_pane.get_contentWindow().addEventListener('load',opac_wrapper_set_help_context,false);
function set_marc_edit() {
g.view = 'marc_edit';
- var a = xulG.url_prefix( urls.XUL_MARC_EDIT );
+ var a = xulG.url_prefix( 'XUL_MARC_EDIT' );
var b = {};
var c = {
'marc_control_number_identifier' : g.data.hash.aous['cat.marc_control_number_identifier'] || 'Set cat.marc_control_number_identifier in Library Settings',
var unified_interface = String( data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ var url = window.xulG.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
var w = xulG.set_tab(
url,
{
function set_copy_browser() {
g.view = 'copy_browser';
if (copy_browser_reset) {
- bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?docid=' + window.escape(docid),{},xulG);
+ bottom_pane.reset_iframe( xulG.url_prefix( 'XUL_COPY_VOLUME_BROWSE?docid=' ) + window.escape(docid),{},xulG);
copy_browser_reset =false;
} else {
- bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_COPY_VOLUME_BROWSE ) + '?docid=' + window.escape(docid),{},xulG);
+ bottom_pane.set_iframe( xulG.url_prefix( 'XUL_COPY_VOLUME_BROWSE?docid=' ) + window.escape(docid),{},xulG);
}
opac_wrapper_set_help_context();
bottom_pane.get_contentWindow().addEventListener('load',opac_wrapper_set_help_context,false);
function set_hold_browser() {
g.view = 'hold_browser';
if (hold_browser_reset) {
- bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_HOLDS_BROWSER ) + '?docid=' + window.escape(docid),{},xulG);
+ bottom_pane.reset_iframe( xulG.url_prefix( 'XUL_HOLDS_BROWSER?docid=' ) + window.escape(docid),{},xulG);
hold_browser_reset = false;
} else {
- bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_HOLDS_BROWSER ) + '?docid=' + window.escape(docid),{},xulG);
+ bottom_pane.set_iframe( xulG.url_prefix( 'XUL_HOLDS_BROWSER?docid=' ) + window.escape(docid),{},xulG);
}
opac_wrapper_set_help_context();
bottom_pane.get_contentWindow().addEventListener('load',opac_wrapper_set_help_context,false);
].forEach(function(k) { content_params[k] = xulG[k]; });
var loc = urls.XUL_BROWSER + "?url=" + window.escape(
- xulG.url_prefix("/eg/acq/lineitem/related/") +
+ xulG.url_prefix("ACQ_LINEITEM") +
docid + "?target=bib"
);
xulG.new_tab(
].forEach(function(k) { content_params[k] = xulG[k]; });
var loc = urls.XUL_BROWSER + "?url=" + window.escape(
- xulG.url_prefix("/eg/serial/list_subscription?record_entry=") +
+ xulG.url_prefix("SERIAL_LIST_SUBSCRIPTION?record_entry=") +
docid
);
xulG.new_tab(
'authtime' : ses('authtime'),
'window_open' : function(a,b,c) {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
return window.open(a,b,c);
} catch(E) {
g.error.standard_unexpected_error_alert('window_open',E);
}
},
'on_url_load' : function(f) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var win;
try {
if (typeof f.contentWindow.wrappedJSObject.attachEvt != 'undefined') {
content_params.get_barcode_and_settings = xulG.get_barcode_and_settings;
var secure_opac = true; // default to secure
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
if (prefs.prefHasUserValue('oils.secure_opac')) {
secure_opac = prefs.getBoolPref('oils.secure_opac');
if (opac_url) {
content_params.url = xulG.url_prefix( opac_url, secure_opac );
} else {
- content_params.url = xulG.url_prefix( urls.browser, secure_opac );
+ content_params.url = xulG.url_prefix( 'browser', secure_opac );
}
- browser_frame = bottom_pane.set_iframe( xulG.url_prefix(urls.XUL_BROWSER) + '?name=Catalog', {}, content_params);
+ browser_frame = bottom_pane.set_iframe( xulG.url_prefix('XUL_BROWSER?name=Catalog'), {}, content_params);
/* // Remember to use the REMOTE_BROWSER if we ever try to move this to remote xul again
- browser_frame = bottom_pane.set_iframe( xulG.url_prefix(urls.XUL_REMOTE_BROWSER) + '?name=Catalog', {}, content_params);
+ browser_frame = bottom_pane.set_iframe( xulG.url_prefix('XUL_REMOTE_BROWSER?name=Catalog'), {}, content_params);
*/
} catch(E) {
g.error.sdump('D_ERROR','set_opac: ' + E);
function set_serctrl_view() {
g.view = 'serctrl_view';
if (serctrl_view_reset) {
- bottom_pane.reset_iframe( xulG.url_prefix( urls.XUL_SERIAL_SERCTRL_MAIN ) + '?docid=' + window.escape(docid), {}, xulG);
+ bottom_pane.reset_iframe( xulG.url_prefix( 'XUL_SERIAL_SERCTRL_MAIN?docid=' ) + window.escape(docid), {}, xulG);
serctrl_view_reset =false;
} else {
- bottom_pane.set_iframe( xulG.url_prefix( urls.XUL_SERIAL_SERCTRL_MAIN ) + '?docid=' + window.escape(docid), {}, xulG);
+ bottom_pane.set_iframe( xulG.url_prefix( 'XUL_SERIAL_SERCTRL_MAIN?docid=' ) + window.escape(docid), {}, xulG);
}
}
try {
JSAN.use('util.window'); var win = new util.window();
var select_aou_window = win.open(
- xulG.url_prefix(urls.XUL_SERIAL_SELECT_AOU),
+ xulG.url_prefix('XUL_SERIAL_SELECT_AOU'),
'_blank',
'chrome,resizable,modal,centerscreen',
{'server_unadorned' : g.data.server_unadorned}
}
function open_marc_editor(rec, label) {
- win = window.open( xulG.url_prefix('/xul/server/cat/marcedit.xul') );
+ win = window.open( xulG.url_prefix('XUL_MARC_EDIT') );
win.xulG = {
record : {marc : rec.marc()},
content_params.get_barcode = xulG.get_barcode;
content_params.get_barcode_and_settings = xulG.get_barcode_and_settings;
- xulG.new_tab(xulG.url_prefix(urls.XUL_OPAC_WRAPPER), {}, content_params);
+ xulG.new_tab(xulG.url_prefix('XUL_OPAC_WRAPPER'), {}, content_params);
} catch(E) {
g.error.sdump('D_ERROR',E);
}
].forEach(function(k) { content_params[k] = xulG[k]; });
xulG.new_tab(
- xulG.url_prefix(urls.XUL_SERIAL_BATCH_RECEIVE) +
- "?docid=" + window.escape(docid), {
+ xulG.url_prefix('XUL_SERIAL_BATCH_RECEIVE?docid=') +
+ window.escape(docid), {
"tab_name": $("offlineStrings").getString(
"menu.cmd_serial_batch_receive.tab"
)
}
function remove_me() {
- var url = xulG.url_prefix( urls.XUL_BIB_BRIEF ) + '?docid=' + window.escape(docid);
+ var url = xulG.url_prefix( 'XUL_BIB_BRIEF?docid=' ) + window.escape(docid);
dump('removing ' + url + '\n');
try { top_pane.remove_iframe( url ); } catch(E) { dump(E + '\n'); }
$('nav').setAttribute('hidden','true');
function add_to_bucket() {
JSAN.use('util.window'); var win = new util.window();
win.open(
- xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK),
+ xulG.url_prefix('XUL_RECORD_BUCKETS_QUICK'),
'_blank',
'chrome,resizable,modal,centerscreen',
{
var unified_interface = String( g.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( g.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ url = window.xulG.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
} else {
- url = window.xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+ url = window.xulG.url_prefix( 'XUL_VOLUME_COPY_CREATOR_ORIGINAL' );
}
var w = xulG.new_tab(
try {
g.view = 'manage_parts';
var loc = urls.XUL_BROWSER + "?url=" + window.escape(
- window.xulG.url_prefix(urls.CONIFY_MANAGE_PARTS) + '?r=' + docid
+ window.xulG.url_prefix('CONIFY_MANAGE_PARTS?r=') + docid
);
if (manage_parts_reset) {
bottom_pane.reset_iframe( loc,{},xulG);
function manage_multi_home_items() {
try {
g.view = 'manage_multi_home';
- var loc = window.xulG.url_prefix(urls.MANAGE_MULTI_HOME_ITEMS);
+ var loc = window.xulG.url_prefix('MANAGE_MULTI_HOME_ITEMS');
if (manage_multi_home_reset) {
bottom_pane.reset_iframe( loc,{},{'docid':docid,'no_bib_summary':true,'url_prefix':xulG.url_prefix,'new_tab':xulG.new_tab});
manage_multi_home_reset =false;
}
if (ev.button == 0 /* left click, spawn opac */) {
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + g.data[data_key];
+ var opac_url = xulG.url_prefix( 'opac_rdetail' ) + g.data[data_key];
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'opac_url' : opac_url,
};
xulG.new_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name':'Retrieving title...'},
content_params
);
<!-- BEHAVIOR -->
<script type="text/javascript">
var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
</script>
<scripts id="openils_util_scripts"/>
<script type="text/javascript" src="chrome://openils_staff_client/content/OpenILS/util/fmall.js"/>
if (typeof circ == 'undefined') circ = {};
circ.offline = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
} catch(E) {
dump('circ.offline: ' + E + '\n');
'init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
var obj = this;
JSAN.use('util.deck'); obj.deck = new util.deck('main');
try {
offlineStrings = document.getElementById('offlineStrings');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(offlineStrings.getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
try {
offlineStrings = $('offlineStrings');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(offlineStrings.getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
JSAN.use('util.date');
function handle_lock(ev) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (!(ev.altKey || ev.ctrlKey || ev.metakey)) {
if (!local_lock) {
local_lock = true;
try {
offlineStrings = $('offlineStrings');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(offlineStrings.getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
todayPlus = util.date.formatted_date(todayPlus,"%F");
function handle_lock(ev) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (!(ev.altKey || ev.ctrlKey || ev.metakey)) {
if (!local_lock) {
local_lock = true;
try {
offlineStrings = document.getElementById('offlineStrings');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(offlineStrings.getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
} );
function handle_lock(ev) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (!(ev.altKey || ev.ctrlKey || ev.metakey)) {
if (!local_lock) {
local_lock = true;
try {
offlineStrings = $('offlineStrings');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(offlineStrings.getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
$('submit').addEventListener('command',next_patron,false);
function handle_lock(ev) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (!(ev.altKey || ev.ctrlKey || ev.metakey)) {
if (!local_lock) {
local_lock = true;
function my_init() {
try {
offlineStrings = $('offlineStrings');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
todayPlus = util.date.formatted_date(todayPlus,"%F");
function handle_lock(ev) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (!(ev.altKey || ev.ctrlKey || ev.metakey)) {
if (!local_lock) {
local_lock = true;
<?xml version="1.0"?>
-<overlay id="sample"
+<overlay id="eg_firefox_browser"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-<!--
- <statusbar id="status-bar">
- <statusbarpanel id="my-panel" label="Hello, World" />
- </statusbar>
--->
<menupopup id="menu_ToolsPopup">
- <menuitem id="evergreen_entry" insertbefore="devToolsSeparator" label="Evergreen Client"
- oncommand="try {
- Components.classes['@mozilla.org/embedcomp/window-watcher;1']
- .getService(Components.interfaces.nsIWindowWatcher)
- .openWindow(null, 'chrome://open_ils_staff_client/content/main/main.xul', '_blank',
- 'chrome,dialog=no,all', null);
- } catch(E) { alert(E); }
- "/>
+ <menuitem id="evergreen_entry_tools" insertbefore="devToolsSeparator" label="Evergreen Client"
+ oncommand="try {
+ Components.classes['@open-ils.org/openils_data_cache;1'].getService().wrappedJSObject.openMainEGWindow();
+ } catch(E) { alert(E); }
+ "/>
</menupopup>
+ <vbox id="appmenuPrimaryPane">
+ <menuitem id="evergreen_entry_primary" insertafter="appmenu_webDeveloper" label="Evergreen Client"
+ oncommand="try {
+ Components.classes['@open-ils.org/openils_data_cache;1'].getService().wrappedJSObject.openMainEGWindow();
+ } catch(E) { alert(E); }
+ "/>
+ </vbox>
</overlay>
urls['AUDIO_good'] = '/xul/server/skin/media/custom/good.wav';
- urls['opac'] = '/opac/' + LOCALE + '/skin/mylib/xml/advanced.xml?nps=1';
- urls['opac_rdetail'] = '/opac/' + LOCALE + '/skin/mylib/xml/rdetail.xml';
- urls['opac_rresult'] = '/opac/' + LOCALE + '/skin/mylib/xml/rresult.xml';
- urls['browser'] = '/opac/' + LOCALE + '/skin/mylib/xml/advanced.xml?nps=1';
+ urls['opac'] = 'oils://remote/opac/' + LOCALE + '/skin/mylib/xml/advanced.xml?nps=1';
+ urls['opac_rdetail'] = 'oils://remote/opac/' + LOCALE + '/skin/mylib/xml/rdetail.xml';
+ urls['opac_rresult'] = 'oils://remote/opac/' + LOCALE + '/skin/mylib/xml/rresult.xml';
+ urls['browser'] = 'oils://remote/opac/' + LOCALE + '/skin/mylib/xml/advanced.xml?nps=1';
*/
/* 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 {
LOCALE = pref.getCharPref('general.useragent.locale');
var urls = {
- 'opac' : '/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1',
- 'opac_rdetail' : '/opac/' + LOCALE + '/skin/default/xml/rdetail.xml?r=',
- 'opac_rresult' : '/opac/' + LOCALE + '/skin/default/xml/rresult.xml',
- 'opac_rresult_metarecord' : '/opac/' + LOCALE + '/skin/default/xml/rresult.xml?m=',
+ 'opac' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1',
+ 'opac_rdetail' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rdetail.xml?r=',
+ 'opac_rresult' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rresult.xml',
+ 'opac_rresult_metarecord' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rresult.xml?m=',
'org_tree' : '/opac/common/js/' + LOCALE + '/OrgTree.js',
- 'browser' : '/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1',
+ 'browser' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1',
'fieldmapper' : '/opac/common/js/fmall.js',
'xsl_marc2html' : '/opac/extras/xsl/oilsMARC21slim2HTML.xsl',
'ac_jacket_small' : '/opac/extras/ac/jacket/small/',
'ac_jacket_large' : '/opac/extras/ac/jacket/large/',
- 'MARC_BATCH_EDIT' : '/opac/extras/merge_template/',
+ 'MARC_BATCH_EDIT' : 'oils://remote/opac/extras/merge_template/',
'AUDIO_good' : '/xul/server/skin/media/audio/bonus.wav',
'AUDIO_bad' : '/xul/server/skin/media/audio/question.wav',
'AUDIO_event_ASSET_COPY_NOT_FOUND' : '/xul/server/skin/media/audio/redalert.wav',
'AUTHORITY_MANAGE' : '/eg/cat/authority/list',
- 'MANAGE_MULTI_HOME_ITEMS' : '/xul/server/cat/manage_multi_home_items.xul',
- 'XUL_AUTH_SIMPLE' : '/xul/server/main/simple_auth.xul',
- 'XUL_BIB_BRIEF' : '/xul/server/cat/bib_brief.xul',
- 'XUL_BIB_BRIEF_VERTICAL' : '/xul/server/cat/bib_brief_vertical.xul',
+ 'MANAGE_MULTI_HOME_ITEMS' : 'oils://remote/xul/server/cat/manage_multi_home_items.xul',
+ 'XUL_AUTH_SIMPLE' : 'oils://remote/xul/server/main/simple_auth.xul',
+ 'XUL_BIB_BRIEF' : 'oils://remote/xul/server/cat/bib_brief.xul',
+ 'XUL_BIB_BRIEF_VERTICAL' : 'oils://remote/xul/server/cat/bib_brief_vertical.xul',
'XUL_BROWSER' : 'chrome://open_ils_staff_client/content/util/browser.xul',
- 'XUL_CHECKIN' : '/xul/server/circ/checkin.xul',
- 'XUL_BACKDATE' : '/xul/server/circ/backdate_post_checkin.xul',
- 'XUL_RENEW' : '/xul/server/circ/renew.xul',
- 'XUL_CHECKOUT' : '/xul/server/circ/checkout.xul',
- 'XUL_CIRC_BRIEF' : '/xul/server/circ/circ_brief.xul',
- 'XUL_CIRC_SUMMARY' : '/xul/server/circ/circ_summary.xul',
- 'XUL_COPY_BUCKETS_QUICK' : '/xul/server/cat/copy_buckets_quick.xul',
- 'XUL_COPY_BUCKETS' : '/xul/server/cat/copy_buckets.xul',
- 'XUL_COPY_DETAILS' : '/xul/server/circ/copy_details.xul',
- 'XUL_COPY_EDITOR' : '/xul/server/cat/copy_editor.xul',
- 'XUL_COPY_LOCATION_EDIT' : '/xul/server/admin/copy_locations.xhtml',
- 'XUL_COPY_NOTES' : '/xul/server/cat/copy_notes.xul',
- 'XUL_COPY_STATUS' : '/xul/server/circ/copy_status.xul',
- 'XUL_COPY_SUMMARY' : '/xul/server/cat/copy_summary.xul',
- 'XUL_COPY_VOLUME_BROWSE' : '/xul/server/cat/copy_browser.xul',
+ 'XUL_CHECKIN' : 'oils://remote/xul/server/circ/checkin.xul',
+ 'XUL_BACKDATE' : 'oils://remote/xul/server/circ/backdate_post_checkin.xul',
+ 'XUL_RENEW' : 'oils://remote/xul/server/circ/renew.xul',
+ 'XUL_CHECKOUT' : 'oils://remote/xul/server/circ/checkout.xul',
+ 'XUL_CIRC_BRIEF' : 'oils://remote/xul/server/circ/circ_brief.xul',
+ 'XUL_CIRC_SUMMARY' : 'oils://remote/xul/server/circ/circ_summary.xul',
+ 'XUL_COPY_BUCKETS_QUICK' : 'oils://remote/xul/server/cat/copy_buckets_quick.xul',
+ 'XUL_COPY_BUCKETS' : 'oils://remote/xul/server/cat/copy_buckets.xul',
+ 'XUL_COPY_DETAILS' : 'oils://remote/xul/server/circ/copy_details.xul',
+ 'XUL_COPY_EDITOR' : 'oils://remote/xul/server/cat/copy_editor.xul',
+ 'XUL_COPY_LOCATION_EDIT' : 'oils://remote/xul/server/admin/copy_locations.xhtml',
+ 'XUL_COPY_NOTES' : 'oils://remote/xul/server/cat/copy_notes.xul',
+ 'XUL_COPY_STATUS' : 'oils://remote/xul/server/circ/copy_status.xul',
+ 'XUL_COPY_SUMMARY' : 'oils://remote/xul/server/cat/copy_summary.xul',
+ 'XUL_COPY_VOLUME_BROWSE' : 'oils://remote/xul/server/cat/copy_browser.xul',
'XUL_DEBUG_CONSOLE' : 'chrome://global/content/console.xul',
- 'XUL_DEBUG_FIELDMAPPER' : '/xul/server/util/fm_view.xul',
- 'XUL_DEBUG_FILTER_CONSOLE' : '/xul/server/util/filter_console.xul',
- 'XUL_DEBUG_SHELL' : '/xul/server/util/shell.html',
- 'XUL_DEBUG_XULEDITOR' : '/xul/server/util/xuledit.xul',
- 'XUL_DO_NOT_AUTO_ATTEMPT_PRINT_SETTING' : '/xul/server/admin/do_not_auto_attempt_print_setting.xul',
- 'XUL_FANCY_PROMPT' : '/xul/server/util/fancy_prompt.xul',
- 'XUL_HOLD_CAPTURE' : '/xul/server/circ/hold_capture.xul',
- /*'XUL_HOLD_PULL_LIST' : '/xul/server/admin/hold_pull_list.xhtml',*/
- 'XUL_HOLD_PULL_LIST' : '/xul/server/patron/holds.xul',
- 'XUL_HOLDS_BROWSER' : '/xul/server/patron/holds.xul',
- 'XUL_HOLD_DETAILS' : '/xul/server/patron/hold_details.xul',
- 'XUL_HOLD_CANCEL' : '/xul/server/patron/hold_cancel.xul',
- 'XUL_HOLD_PLACEMENT' : '/xul/server/patron/place_hold.xul',
- 'XUL_IN_HOUSE_USE' : '/xul/server/circ/in_house_use.xul',
- 'XUL_LIST_CLIPBOARD' : '/xul/server/util/list_clipboard.xul',
- 'XUL_LOCAL_ADMIN' : '/xul/server/admin/index.xhtml',
- 'XUL_LOGIN_DATA' : '/xul/server/main/data.xul',
- 'XUL_MARC_NEW' : '/xul/server/cat/marc_new.xul',
- 'XUL_MARC_EDIT' : '/xul/server/cat/marcedit.xul',
- 'XUL_MARC_VIEW' : '/xul/server/cat/marc_view.xul',
+ 'XUL_DEBUG_FIELDMAPPER' : 'oils://remote/xul/server/util/fm_view.xul',
+ 'XUL_DEBUG_FILTER_CONSOLE' : 'oils://remote/xul/server/util/filter_console.xul',
+ 'XUL_DEBUG_SHELL' : 'oils://remote/xul/server/util/shell.html',
+ 'XUL_DEBUG_XULEDITOR' : 'oils://remote/xul/server/util/xuledit.xul',
+ 'XUL_DO_NOT_AUTO_ATTEMPT_PRINT_SETTING' : 'oils://remote/xul/server/admin/do_not_auto_attempt_print_setting.xul',
+ 'XUL_FANCY_PROMPT' : 'oils://remote/xul/server/util/fancy_prompt.xul',
+ 'XUL_HOLD_CAPTURE' : 'oils://remote/xul/server/circ/hold_capture.xul',
+ /*'XUL_HOLD_PULL_LIST' : 'oils://remote/xul/server/admin/hold_pull_list.xhtml',*/
+ 'XUL_HOLD_PULL_LIST' : 'oils://remote/xul/server/patron/holds.xul',
+ 'XUL_HOLDS_BROWSER' : 'oils://remote/xul/server/patron/holds.xul',
+ 'XUL_HOLD_DETAILS' : 'oils://remote/xul/server/patron/hold_details.xul',
+ 'XUL_HOLD_CANCEL' : 'oils://remote/xul/server/patron/hold_cancel.xul',
+ 'XUL_HOLD_PLACEMENT' : 'oils://remote/xul/server/patron/place_hold.xul',
+ 'XUL_IN_HOUSE_USE' : 'oils://remote/xul/server/circ/in_house_use.xul',
+ 'XUL_LIST_CLIPBOARD' : 'oils://remote/xul/server/util/list_clipboard.xul',
+ 'XUL_LOCAL_ADMIN' : 'oils://remote/xul/server/admin/index.xhtml',
+ 'XUL_LOGIN_DATA' : 'oils://remote/xul/server/main/data.xul',
+ 'XUL_MARC_NEW' : 'oils://remote/xul/server/cat/marc_new.xul',
+ 'XUL_MARC_EDIT' : 'oils://remote/xul/server/cat/marcedit.xul',
+ 'XUL_MARC_VIEW' : 'oils://remote/xul/server/cat/marc_view.xul',
'XUL_MENU_FRAME' : 'chrome://open_ils_staff_client/content/main/menu_frame.xul',
- 'XUL_NON_CAT_LABEL_EDIT' : '/xul/server/admin/non_cat_types.xhtml',
- 'XUL_OFFLINE_UPLOAD_XACTS' : '/xul/server/admin/upload_xacts.xhtml',
- 'XUL_OFFLINE_MANAGE_XACTS' : '/xul/server/admin/offline_manage_xacts.xul',
- 'XUL_OFFLINE_MANAGE_XACTS_CGI' : '/cgi-bin/offline/offline.pl',
- 'XUL_OFFLINE_GENERATE_WIDGETS' : '/xul/server/main/gen_offline_widgets.xul',
- 'XUL_REMOTE_OPAC_WRAPPER' : '/xul/server/cat/opac.xul',
+ 'XUL_NON_CAT_LABEL_EDIT' : 'oils://remote/xul/server/admin/non_cat_types.xhtml',
+ 'XUL_OFFLINE_UPLOAD_XACTS' : 'oils://remote/xul/server/admin/upload_xacts.xhtml',
+ 'XUL_OFFLINE_MANAGE_XACTS' : 'oils://remote/xul/server/admin/offline_manage_xacts.xul',
+ 'XUL_OFFLINE_MANAGE_XACTS_CGI' : '/cgi-bin/offline/offline.pl', // Dunno if this needs oils://remote
+ 'XUL_OFFLINE_GENERATE_WIDGETS' : 'oils://remote/xul/server/main/gen_offline_widgets.xul',
+ 'XUL_REMOTE_OPAC_WRAPPER' : 'oils://remote/xul/server/cat/opac.xul',
'XUL_OPAC_WRAPPER' : 'chrome://open_ils_staff_client/content/cat/opac.xul',
- 'XUL_PATRON_BARCODE_ENTRY' : '/xul/server/patron/barcode_entry.xul',
- 'XUL_PATRON_BILLS' : '/xul/server/patron/bill2.xul',
- 'XUL_PATRON_BILL_CC_INFO' : '/xul/server/patron/bill_cc_info.xul',
- 'XUL_PATRON_BILL_CHECK_INFO' : '/xul/server/patron/bill_check_info.xul',
- 'XUL_PATRON_BILL_DETAILS' : '/xul/server/patron/bill_details.xul',
- 'XUL_PATRON_BILL_HISTORY' : '/xul/server/patron/bill_history.xul',
- 'XUL_PATRON_BILL_WIZARD' : '/xul/server/patron/bill_wizard.xul',
- 'XUL_PATRON_DISPLAY' : '/xul/server/patron/display.xul',
- 'XUL_PATRON_HORIZ_DISPLAY' : '/xul/server/patron/display_horiz.xul',
- 'XUL_PATRON_EDIT' : '/eg/actor/user/register',
- 'XUL_PATRONS_DUE_REFUNDS' : '/xul/server/admin/patrons_due_refunds.xul',
- 'XUL_USER_PERM_EDITOR' : '/xul/server/patron/user_edit.xhtml',
- 'XUL_PATRON_HOLDS' : '/xul/server/patron/holds.xul',
- 'XUL_PATRON_INFO_NOTES' : '/xul/server/patron/info_notes.xul',
- 'XUL_PATRON_INFO_STAT_CATS' : '/xul/server/patron/info_stat_cats.xul',
- 'XUL_PATRON_INFO_SURVEYS' : '/xul/server/patron/info_surveys.xul',
- 'XUL_PATRON_INFO_GROUP' : '/xul/server/patron/info_group.xul',
- 'XUL_PATRON_ITEMS' : '/xul/server/patron/items.xul',
- 'XUL_PATRON_SEARCH_FORM' : '/xul/server/patron/search_form.xul',
- 'XUL_PATRON_HORIZONTAL_SEARCH_FORM' : '/xul/server/patron/search_form_horiz.xul',
- 'XUL_PATRON_SEARCH_RESULT' : '/xul/server/patron/search_result.xul',
- 'XUL_PATRON_SUMMARY' : '/xul/server/patron/summary.xul',
- 'XUL_PRE_CAT' : '/xul/server/circ/pre_cat_fields.xul',
- 'XUL_PRINT_LIST_TEMPLATE_EDITOR' : '/xul/server/circ/print_list_template_editor.xul',
- 'XUL_RECORD_BUCKETS' : '/xul/server/cat/record_buckets.xul',
- 'XUL_RECORD_BUCKETS_QUICK' : '/xul/server/cat/record_buckets_quick.xul',
- 'XUL_REMOTE_BROWSER' : '/xul/server/util/rbrowser.xul',
- 'XUL_SERIAL_ITEM_EDITOR' : '/xul/server/serial/sitem_editor.xul',
- 'XUL_SERIAL_NOTES' : '/xul/server/serial/notes.xul',
- 'XUL_SERIAL_SELECT_AOU' : '/xul/server/serial/select_aou.xul',
- 'XUL_SERIAL_SELECT_UNIT' : '/xul/server/serial/select_unit.xul',
- 'XUL_SERIAL_SERCTRL_MAIN' : '/xul/server/serial/serctrl_main.xul',
- 'XUL_SPINE_LABEL' : '/xul/server/cat/spine_labels.xul',
- 'XUL_STAGED_PATRONS' : '/xul/server/patron/staged.xul',
+ 'XUL_PATRON_BARCODE_ENTRY' : 'oils://remote/xul/server/patron/barcode_entry.xul',
+ 'XUL_PATRON_BILLS' : 'oils://remote/xul/server/patron/bill2.xul',
+ 'XUL_PATRON_BILL_CC_INFO' : 'oils://remote/xul/server/patron/bill_cc_info.xul',
+ 'XUL_PATRON_BILL_CHECK_INFO' : 'oils://remote/xul/server/patron/bill_check_info.xul',
+ 'XUL_PATRON_BILL_DETAILS' : 'oils://remote/xul/server/patron/bill_details.xul',
+ 'XUL_PATRON_BILL_HISTORY' : 'oils://remote/xul/server/patron/bill_history.xul',
+ 'XUL_PATRON_BILL_WIZARD' : 'oils://remote/xul/server/patron/bill_wizard.xul',
+ 'XUL_PATRON_DISPLAY' : 'oils://remote/xul/server/patron/display.xul',
+ 'XUL_PATRON_HORIZ_DISPLAY' : 'oils://remote/xul/server/patron/display_horiz.xul',
+ 'XUL_PATRON_EDIT' : 'oils://remote/eg/actor/user/register',
+ 'XUL_PATRONS_DUE_REFUNDS' : 'oils://remote/xul/server/admin/patrons_due_refunds.xul',
+ 'XUL_USER_PERM_EDITOR' : 'oils://remote/xul/server/patron/user_edit.xhtml',
+ 'XUL_PATRON_HOLDS' : 'oils://remote/xul/server/patron/holds.xul',
+ 'XUL_PATRON_INFO_NOTES' : 'oils://remote/xul/server/patron/info_notes.xul',
+ 'XUL_PATRON_INFO_STAT_CATS' : 'oils://remote/xul/server/patron/info_stat_cats.xul',
+ 'XUL_PATRON_INFO_SURVEYS' : 'oils://remote/xul/server/patron/info_surveys.xul',
+ 'XUL_PATRON_INFO_GROUP' : 'oils://remote/xul/server/patron/info_group.xul',
+ 'XUL_PATRON_ITEMS' : 'oils://remote/xul/server/patron/items.xul',
+ 'XUL_PATRON_SEARCH_FORM' : 'oils://remote/xul/server/patron/search_form.xul',
+ 'XUL_PATRON_HORIZONTAL_SEARCH_FORM' : 'oils://remote/xul/server/patron/search_form_horiz.xul',
+ 'XUL_PATRON_SEARCH_RESULT' : 'oils://remote/xul/server/patron/search_result.xul',
+ 'XUL_PATRON_SUMMARY' : 'oils://remote/xul/server/patron/summary.xul',
+ 'XUL_PRE_CAT' : 'oils://remote/xul/server/circ/pre_cat_fields.xul',
+ 'XUL_PRINT_LIST_TEMPLATE_EDITOR' : 'oils://remote/xul/server/circ/print_list_template_editor.xul',
+ 'XUL_RECORD_BUCKETS' : 'oils://remote/xul/server/cat/record_buckets.xul',
+ 'XUL_RECORD_BUCKETS_QUICK' : 'oils://remote/xul/server/cat/record_buckets_quick.xul',
+ 'XUL_REMOTE_BROWSER' : 'oils://remote/xul/server/util/rbrowser.xul',
+ 'XUL_SERIAL_ITEM_EDITOR' : 'oils://remote/xul/server/serial/sitem_editor.xul',
+ 'XUL_SERIAL_NOTES' : 'oils://remote/xul/server/serial/notes.xul',
+ 'XUL_SERIAL_SELECT_AOU' : 'oils://remote/xul/server/serial/select_aou.xul',
+ 'XUL_SERIAL_SELECT_UNIT' : 'oils://remote/xul/server/serial/select_unit.xul',
+ 'XUL_SERIAL_SERCTRL_MAIN' : 'oils://remote/xul/server/serial/serctrl_main.xul',
+ 'XUL_SPINE_LABEL' : 'oils://remote/xul/server/cat/spine_labels.xul',
+ 'XUL_STAGED_PATRONS' : 'oils://remote/xul/server/patron/staged.xul',
'XUL_STANDALONE' : 'chrome://open_ils_staff_client/content/circ/offline.xul',
- 'XUL_STANDING_PENALTIES' : '/xul/server/patron/standing_penalties.xul',
- 'XUL_NEW_STANDING_PENALTY' : '/xul/server/patron/new_standing_penalty.xul',
- 'XUL_EDIT_STANDING_PENALTY' : '/xul/server/patron/edit_standing_penalty.xul',
- 'XUL_SCAN_ITEM_AS_MISSING_PIECES' : '/xul/server/circ/missing_pieces.xul',
- 'XUL_STAT_CAT_EDIT' : '/xul/server/admin/stat_cat_editor.xhtml',
+ 'XUL_STANDING_PENALTIES' : 'oils://remote/xul/server/patron/standing_penalties.xul',
+ 'XUL_NEW_STANDING_PENALTY' : 'oils://remote/xul/server/patron/new_standing_penalty.xul',
+ 'XUL_EDIT_STANDING_PENALTY' : 'oils://remote/xul/server/patron/edit_standing_penalty.xul',
+ 'XUL_SCAN_ITEM_AS_MISSING_PIECES' : 'oils://remote/xul/server/circ/missing_pieces.xul',
+ 'XUL_STAT_CAT_EDIT' : 'oils://remote/xul/server/admin/stat_cat_editor.xhtml',
'XUL_SURVEY_WIZARD' : 'chrome://open_ils_staff_client/content/admin/survey_wizard.xul',
- 'XUL_TIMESTAMP_DIALOG' : '/xul/server/util/timestamp.xul',
- 'XUL_TOOLBAR_CONFIG' : '/xul/server/admin/toolbar.xul',
- 'XUL_USER_BUCKETS' : '/xul/server/patron/user_buckets.xul',
- 'XUL_VERIFY_CREDENTIALS' : '/xul/server/main/verify_credentials.xul',
- 'XUL_VOLUME_BUCKETS' : '/xul/server/cat/volume_buckets.xul',
- 'XUL_VOLUME_COPY_CREATOR' : '/xul/server/cat/volume_copy_editor.xul',
- 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : '/xul/server/cat/volume_copy_editor_horiz.xul',
- 'XUL_VOLUME_COPY_CREATOR_ORIGINAL' : '/xul/server/cat/volume_copy_creator.xul',
- 'XUL_VOLUME_EDITOR' : '/xul/server/cat/volume_editor.xul',
- 'XUL_WORK_LOG' : '/xul/server/admin/work_log.xul',
- 'XUL_WORKSTATION_INFO' : '/xul/server/main/ws_info.xul',
- 'XUL_Z3950_IMPORT' : '/xul/server/cat/z3950.xul',
- 'TEST_HTML' : '/xul/server/main/test.html',
- 'TEST_XUL' : '/xul/server/main/test.xul',
- 'CONIFY' : '/conify/' + LOCALE + '/global',
- 'CONIFY_MANAGE_PARTS' : '/eg/conify/global/biblio/monograph_part',
- 'EG_WEB_BASE' : '/eg',
- 'XUL_LOCAL_ADMIN_BASE' : '/xul/server/admin',
- 'XUL_REPORTS' : '/reports/oils_rpt.xhtml',
+ 'XUL_TIMESTAMP_DIALOG' : 'oils://remote/xul/server/util/timestamp.xul',
+ 'XUL_TOOLBAR_CONFIG' : 'oils://remote/xul/server/admin/toolbar.xul',
+ 'XUL_USER_BUCKETS' : 'oils://remote/xul/server/patron/user_buckets.xul',
+ 'XUL_VERIFY_CREDENTIALS' : 'oils://remote/xul/server/main/verify_credentials.xul',
+ 'XUL_VOLUME_BUCKETS' : 'oils://remote/xul/server/cat/volume_buckets.xul',
+ 'XUL_VOLUME_COPY_CREATOR' : 'oils://remote/xul/server/cat/volume_copy_editor.xul',
+ 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'oils://remote/xul/server/cat/volume_copy_editor_horiz.xul',
+ 'XUL_VOLUME_COPY_CREATOR_ORIGINAL' : 'oils://remote/xul/server/cat/volume_copy_creator.xul',
+ 'XUL_VOLUME_EDITOR' : 'oils://remote/xul/server/cat/volume_editor.xul',
+ 'XUL_WORK_LOG' : 'oils://remote/xul/server/admin/work_log.xul',
+ 'XUL_WORKSTATION_INFO' : 'oils://remote/xul/server/main/ws_info.xul',
+ 'XUL_Z3950_IMPORT' : 'oils://remote/xul/server/cat/z3950.xul',
+ 'TEST_HTML' : '/xul/server/main/test.html', // This is html, not xul....does it need oils://remote?
+ 'TEST_XUL' : 'oils://remote/xul/server/main/test.xul',
+ 'CONIFY' : 'oils://remote/conify/' + LOCALE + '/global',
+ 'CONIFY_MANAGE_PARTS' : 'oils://remote/eg/conify/global/biblio/monograph_part',
+ 'EG_WEB_BASE' : 'oils://remote/eg',
+ 'XUL_LOCAL_ADMIN_BASE' : 'oils://remote/xul/server/admin',
+ 'XUL_REPORTS' : 'oils://remote/reports/oils_rpt.xhtml',
'EG_ACQ_PO_VIEW' : '/eg/acq/po/view',
'EG_ACQ_USER_REQUESTS' : '/eg/acq/picklist/user_request',
- 'XUL_SERIAL_BATCH_RECEIVE': '/xul/server/serial/batch_receive.xul',
- 'EG_TRIGGER_EVENTS' : '/eg/actor/user/event_log'
+ 'XUL_SERIAL_BATCH_RECEIVE': 'oils://remote/xul/server/serial/batch_receive.xul',
+ 'XUL_SERIAL_PATTERN_WIZARD' : '/xul/server/serial/pattern_wizard.xul',
+ 'CUSTOM_JS' : '/xul/server/skin/custom.js',
+ 'ACQ_LINEITEM' : 'oils://remote/eg/acq/lineitem/related/',
+ 'SERIAL_LIST_SUBSCRIPTION' : 'oils://remote/eg/serial/list_subscription',
+ 'BOOKING_RESOURCE' : 'oils://remote/eg/conify/global/booking/resource',
+ 'BOOKING_RESERVATION' : 'oils://remote/eg/booking/reservation',
+ 'BOOKING_PICKUP' : 'oils://remote/eg/booking/pickup',
+ 'BOOKING_RETURN' : 'oils://remote/eg/booking/return',
+ 'ALT_HOLDS_PRINT' : 'oils://remote/opac/extras/circ/alt_holds_print.html',
+ 'SERIAL_PRINT_ROUTING_LIST_USERS' : 'oils://remote/eg/serial/print_routing_list_users',
+ 'XUL_SERIAL_BATCH_RECEIVE': 'oils://remote/xul/server/serial/batch_receive.xul',
+ 'EG_TRIGGER_EVENTS' : 'oils://remote/eg/actor/user/event_log'
}
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['opac'] = 'oils://remote/eg/opac/advanced';
+ urls['opac_rdetail'] = 'oils://remote/eg/opac/record/';
+ urls['opac_rresult'] = 'oils://remote/eg/opac/results';
+ urls['opac_rresult_metarecord'] = 'oils://remote/eg/opac/results?metarecord=';
urls['browser'] = urls.opac;
pref.setBoolPref('oils.secure_opac',true);
}
var tempWindow = null;
var tempFocusWindow = null;
-function grant_perms(url) {
- var perms = "UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead";
- dump('Granting ' + perms + ' to ' + url + '\n');
- 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);
- }
-
-}
-
function clear_the_cache() {
try {
var cacheClass = Components.classes["@mozilla.org/network/cache-service;1"];
openTabs = openTabs.concat(aTabList);
}
if(G.data.session) { // Just add to the list of stuff to open unless we are logged in
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var targetwindow = null;
var focuswindow = null;
var focustab = {'focus' : true};
function load_hotkey_sets() {
if(typeof(load_hotkey_sets.set_list) == 'undefined') {
load_hotkey_sets.set_list = [];
- JSAN.use('util.file');
- var file = new util.file();
- var dirEntries = file.get('hotkeys','skin').directoryEntries;
- while(dirEntries.hasMoreElements()) {
- var entry = dirEntries.getNext();
- entry.QueryInterface(Components.interfaces.nsIFile);
- if(!entry.isFile()) continue;
- if(!entry.leafName.match(/.+\.keyset$/)) continue;
- var keysetname = entry.leafName.replace(/\.keyset$/,'');
- load_hotkey_sets.set_list.push(keysetname);
+ // We can't safely use util.file here because extensions aren't unpacked in Firefox 4+
+ // So instead we will use and parse information from a chrome:// URL
+ var hotkeysBase = 'chrome://open_ils_staff_client/skin/hotkeys/';
+ var ioService=Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService);
+ var scriptableStream=Components
+ .classes["@mozilla.org/scriptableinputstream;1"]
+ .getService(Components.interfaces.nsIScriptableInputStream);
+
+ var channel=ioService.newChannel(hotkeysBase,null,null);
+ var input=channel.open();
+ var str = '';
+ scriptableStream.init(input);
+ try {
+ while(input.available()) {
+ str+=scriptableStream.read(input.available());
+ }
+ } catch (E) {}
+ scriptableStream.close();
+ input.close();
+ // str now, in theory, has a list of files (and metadata) for our base chrome URL.
+ str = str.replace(/^(?!201: ).*$/gm,''); // Remove non-filename result lines
+ str = str.replace(/^(?!.*\.keyset).*$/gm,''); // Remove non-keyset file result lines
+ str = str.replace(/^201: (.*)\.keyset.*$/gm, "$1"); // Reduce keyset matches to just base names
+ // Split into an array
+ var files = str.trim().split(/[\r\n]+/g);
+ for (var i = 0; i < files.length; i++) {
+ if(files[i].length = 0) continue;
+ load_hotkey_sets.set_list.push(files[i]);
}
- file.close();
}
return load_hotkey_sets.set_list;
}
}
if(get_hotkey_array.keyset_cache[keyset_name])
return get_hotkey_array.keyset_cache[keyset_name];
- JSAN.use('util.file');
- var file = new util.file();
- var keyset_raw;
+ // We can't safely use util.file here because extensions aren't unpacked in Firefox 4+
+ // So instead we will use and parse information from a chrome:// URL
+ var hotkeysBase = 'chrome://open_ils_staff_client/skin/hotkeys/' + keyset_name + '.keyset';
+ var ioService=Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService);
+ var scriptableStream=Components
+ .classes["@mozilla.org/scriptableinputstream;1"]
+ .getService(Components.interfaces.nsIScriptableInputStream);
+
+ var channel=ioService.newChannel(hotkeysBase,null,null);
+ var input=channel.open();
+ var keyset_raw = '';
+ scriptableStream.init(input);
try {
- var keyset_file = file.get('hotkeys','skin');
- keyset_file.append(keyset_name + ".keyset");
- keyset_raw = file.get_content();
- file.close();
- var tempArray = [];
-
- var keyset_lines = keyset_raw.trim().split("\n");
- for(var line = 0; line < keyset_lines.length; line++) {
- // Grab line, strip comments, strip leading/trailing whitespace
- var curline = keyset_lines[line].replace(/\s*#.*$/,'').trim();
- if(curline == "") continue; // Skip empty lines
- // Split into pieces
- var split_line = curline.split(',');
- // We need at least 3 elements. Command, modifiers, keycode.
- if(split_line.length < 3) continue;
- // Trim each segment
- split_line[0] = split_line[0].trim();
- split_line[1] = split_line[1].trim();
- split_line[2] = split_line[2].trim();
- if(split_line.length > 3)
- split_line[3] = split_line[3].trim();
- // Skip empty commands
- if(split_line[0] == "") continue;
- // Push to array
- tempArray.push(split_line);
+ while(input.available()) {
+ keyset_raw+=scriptableStream.read(input.available());
}
- get_hotkey_array.keyset_cache[keyset_name] = tempArray;
- return tempArray;
- } catch(E) { // Something went wrong.
- return false;
+ } catch (E) {}
+ scriptableStream.close();
+ input.close();
+
+ var tempArray = [];
+
+ var keyset_lines = keyset_raw.trim().split("\n");
+ for(var line = 0; line < keyset_lines.length; line++) {
+ // Grab line, strip comments, strip leading/trailing whitespace
+ var curline = keyset_lines[line].replace(/\s*#.*$/,'').trim();
+ if(curline == "") continue; // Skip empty lines
+ // Split into pieces
+ var split_line = curline.split(',');
+ // We need at least 3 elements. Command, modifiers, keycode.
+ if(split_line.length < 3) continue;
+ // Trim each segment
+ split_line[0] = split_line[0].trim();
+ split_line[1] = split_line[1].trim();
+ split_line[2] = split_line[2].trim();
+ if(split_line.length > 3)
+ split_line[3] = split_line[3].trim();
+ // Skip empty commands
+ if(split_line[0] == "") continue;
+ // Push to array
+ tempArray.push(split_line);
}
+ get_hotkey_array.keyset_cache[keyset_name] = tempArray;
+ return tempArray;
}
function main_init() {
openTabs = openTabs.concat(window.arguments[0].wrappedJSObject.openTabs);
}
+ // Disable commands that we can't do anything with right now
+ if(typeof start_venkman != 'function') {
+ document.getElementById('cmd_debugger').setAttribute('disabled','true');
+ }
+ if(typeof inspectDOMDocument != 'function') {
+ document.getElementById('cmd_inspector').setAttribute('disabled','true');
+ }
+ if(typeof startChromeList != 'function') {
+ document.getElementById('cmd_chrome_list').setAttribute('disabled','true');
+ }
+
// Now we can safely load the strings without the cache getting wiped
offlineStrings = document.getElementById('offlineStrings');
authStrings = document.getElementById('authStrings');
G.pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
G.pref.QueryInterface(Components.interfaces.nsIPrefBranch2);
- if (! G.pref.prefHasUserValue('general.useragent.override')) {
- G.pref.setCharPref('general.useragent.override',navigator.userAgent + ' oils_xulrunner /xul/server/');
- }
JSAN.use('util.error');
G.error = new util.error();
G.data.server_unadorned = url; G.data.stash('server_unadorned'); G.data.stash_retrieve();
- if (! url.match( '^http://' ) ) { url = 'http://' + url; }
+ if (! url.match( '^(http|https)://' ) ) { url = 'http://' + url; }
G.data.server = url; G.data.stash('server');
G.data.session = { 'key' : G.auth.session.key, 'auth' : G.auth.session.authtime }; G.data.stash('session');
G.data.stash_retrieve();
try {
var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
- var cookieUri = ios.newURI("http://" + G.data.server_unadorned, null, null);
var cookieUriSSL = ios.newURI("https://" + G.data.server_unadorned, null, null);
var cookieSvc = Components.classes["@mozilla.org/cookieService;1"].getService(Components.interfaces.nsICookieService);
- cookieSvc.setCookieString(cookieUri, null, "ses="+G.data.session.key, null);
- cookieSvc.setCookieString(cookieUriSSL, null, "ses="+G.data.session.key, null);
- cookieSvc.setCookieString(cookieUri, null, "xul=1", null);
- cookieSvc.setCookieString(cookieUriSSL, null, "xul=1", null);
+ cookieSvc.setCookieString(cookieUriSSL, null, "ses="+G.data.session.key + "; secure;", null);
} catch(E) {
alert(offlineStrings.getFormattedString(main.session_cookie.error, [E]));
}
- grant_perms(url);
-
xulG = {
'auth' : G.auth,
'url' : url,
var deck = document.getElementById('progress_space');
util.widgets.remove_children( deck );
var iframe = document.createElement('iframe'); deck.appendChild(iframe);
- iframe.setAttribute( 'src', url + urls.XUL_LOGIN_DATA );
+ iframe.setAttribute( 'src', urls.XUL_LOGIN_DATA );
iframe.contentWindow.xulG = xulG;
G.data_xul = iframe.contentWindow;
} else {
var deck = G.auth.controller.view.ws_deck;
JSAN.use('util.widgets'); util.widgets.remove_children('ws_deck');
var iframe = document.createElement('iframe'); deck.appendChild(iframe);
- iframe.setAttribute( 'src', url + urls.XUL_WORKSTATION_INFO );
+ iframe.setAttribute( 'src', urls.XUL_WORKSTATION_INFO );
iframe.contentWindow.xulG = xulG;
deck.selectedIndex = deck.childNodes.length - 1;
}
}
function auto_login(loginInfo) {
+ G.data.stash_retrieve();
if(G.data.session) return; // We are logged in. No auto-logoff supported.
if(loginInfo.host) G.auth.controller.view.server_prompt.value = loginInfo.host;
if(loginInfo.user) G.auth.controller.view.name_prompt.value = loginInfo.user;
if (typeof main == 'undefined') main = {};
main.menu = function () {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
offlineStrings = document.getElementById('offlineStrings');
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('util.window'); this.window = new util.window();
'toolbar_labelpos' : 'side',
'url_prefix' : function(url,secure) {
+ // This allows urls to start with a urls key (or be only a urls key)
+ // We stop at the first / or ? to allow extra paths and query strings.
+ var base_url = url.match(/^[^?/|]+/);
+ if(base_url) {
+ base_url = base_url[0];
+ if(urls[base_url])
+ url = url.replace(/^[^?/|]+\|?/, urls[base_url]);
+ }
// if host unspecified URL with leading /, prefix the remote hostname
if (url.match(/^\//)) url = urls.remote + url;
// if it starts with http:// and we want secure, convert to https://
url = url.replace(/^http:\/\//, 'https://');
}
// if it doesn't start with a known protocol, add http(s)://
- if (! url.match(/^(http|https|chrome):\/\//) && ! url.match(/^data:/) ) {
+ if (! url.match(/^(http|https|chrome|oils):\/\//) && ! url.match(/^data:/) ) {
url = secure
? 'https://' + url
: 'http://' + url;
xulG.get_barcode = this.get_barcode;
xulG.get_barcode_and_settings = this.get_barcode_and_settings;
+ // Disable commands that we can't do anything with right now
+ if(typeof xulG.window.win.start_venkman != 'function') {
+ var element = document.getElementById('cmd_debug_venkman');
+ element.setAttribute('disabled','true');
+ element.removeAttribute('perm');
+ }
+ if(typeof xulG.window.win.inspectDOMDocument != 'function') {
+ var element = document.getElementById('cmd_debug_inspector');
+ element.setAttribute('disabled','true');
+ element.removeAttribute('perm');
+ }
+ if(typeof xulG.window.win.startChromeList != 'function') {
+ var element = document.getElementById('cmd_debug_chrome_list');
+ element.setAttribute('disabled','true');
+ element.removeAttribute('perm');
+ }
+
+
// Pull in local customizations
var r = new XMLHttpRequest();
- r.open("GET", obj.url_prefix('/xul/server/skin/custom.js'), false);
+ var custom_js = obj.url_prefix('CUSTOM_JS');
+ r.open("GET", custom_js, false);
r.send(null);
if (r.status == 200) {
- dump('Evaluating /xul/server/skin/custom.js\n');
+ dump('Evaluating ' + custom_js + '\n');
eval( r.responseText );
}
label = offlineStrings.getString(labelKey);
// URL
- var loc = urls.XUL_BROWSER + '?url=' + window.escape( obj.url_prefix(urls.CONIFY) + '/' + path + '.html');
+ var loc = urls.XUL_BROWSER + '?url=' + window.escape( obj.url_prefix('CONIFY/') + path + '.html');
obj.command_tab(
event,
label = offlineStrings.getString(labelKey);
// URL
- var loc = urls.XUL_BROWSER + '?url=' + window.escape( obj.url_prefix(urls.XUL_LOCAL_ADMIN_BASE) + '/' + path);
+ var loc = urls.XUL_BROWSER + '?url=' + window.escape( obj.url_prefix('XUL_LOCAL_ADMIN_BASE/') + path);
if(addSes) loc += window.escape('?ses=' + ses());
obj.command_tab(
var label = offlineStrings.getString(labelKey);
// URL
- var loc = urls.XUL_BROWSER + '?url=' + window.escape(obj.url_prefix(urls.EG_WEB_BASE) + '/' + path);
+ var loc = urls.XUL_BROWSER + '?url=' + window.escape(obj.url_prefix('EG_WEB_BASE/') + path);
obj.command_tab(
event,
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_COPY_BUCKETS),{'tab_name':offlineStrings.getString('menu.cmd_edit_copy_buckets.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_COPY_BUCKETS'),{'tab_name':offlineStrings.getString('menu.cmd_edit_copy_buckets.tab')},{});
}
],
'cmd_edit_volume_buckets' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_VOLUME_BUCKETS),{'tab_name':offlineStrings.getString('menu.cmd_edit_volume_buckets.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_VOLUME_BUCKETS'),{'tab_name':offlineStrings.getString('menu.cmd_edit_volume_buckets.tab')},{});
}
],
'cmd_edit_record_buckets' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_RECORD_BUCKETS),{'tab_name':offlineStrings.getString('menu.cmd_edit_record_buckets.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_RECORD_BUCKETS'),{'tab_name':offlineStrings.getString('menu.cmd_edit_record_buckets.tab')},{});
}
],
'cmd_edit_user_buckets' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_USER_BUCKETS),{'tab_name':offlineStrings.getString('menu.cmd_edit_user_buckets.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_USER_BUCKETS'),{'tab_name':offlineStrings.getString('menu.cmd_edit_user_buckets.tab')},{});
}
],
function(event) {
obj.data.stash_retrieve();
var content_params = { 'session' : ses(), 'authtime' : ses('authtime') };
- obj.command_tab(event,obj.url_prefix(urls.XUL_OPAC_WRAPPER), {'tab_name':offlineStrings.getString('menu.cmd_search_opac.tab')}, content_params);
+ obj.command_tab(event,obj.url_prefix('XUL_OPAC_WRAPPER'), {'tab_name':offlineStrings.getString('menu.cmd_search_opac.tab')}, content_params);
}
],
'cmd_search_tcn' : [
function spawn_tcn(r,event) {
for (var i = 0; i < r.count; i++) {
var id = r.ids[i];
- var opac_url = obj.url_prefix( urls.opac_rdetail ) + id;
+ var opac_url = obj.url_prefix('opac_rdetail') + id;
obj.data.stash_retrieve();
var content_params = {
'session' : ses(),
if (i == 0) {
obj.command_tab(
event,
- obj.url_prefix(urls.XUL_OPAC_WRAPPER),
+ obj.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name':tcn},
content_params
);
} else {
obj.new_tab(
- obj.url_prefix(urls.XUL_OPAC_WRAPPER),
+ obj.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name':tcn},
content_params
);
var bib_id = prompt(offlineStrings.getString('menu.cmd_search_bib_id.tab'),'',offlineStrings.getString('menu.cmd_search_bib_id.prompt'));
if (!bib_id) return;
- var opac_url = obj.url_prefix( urls.opac_rdetail ) + bib_id;
+ var opac_url = obj.url_prefix('opac_rdetail') + bib_id;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
};
obj.command_tab(
event,
- obj.url_prefix(urls.XUL_OPAC_WRAPPER),
+ obj.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name':'#' + bib_id},
content_params
);
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_COPY_STATUS),{},{});
+ obj.command_tab(event,obj.url_prefix('XUL_COPY_STATUS'),{},{});
}
],
}
function spawn_editor(p) {
- var url = urls.XUL_PATRON_EDIT;
+ var url = 'XUL_PATRON_EDIT';
var param_count = 0;
for (var i in p) {
if (param_count++ == 0) url += '?'; else url += '&';
url += i + '=' + window.escape(p[i]);
}
- var loc = obj.url_prefix( urls.XUL_BROWSER ) + '?url=' + window.escape( obj.url_prefix(url) );
+ var loc = obj.url_prefix('XUL_BROWSER?url=') + window.escape( obj.url_prefix(url) );
obj.new_tab(
loc,
{},
}
obj.data.stash_retrieve();
- var loc = obj.url_prefix( urls.XUL_BROWSER )
- + '?url=' + window.escape( obj.url_prefix(urls.XUL_PATRON_EDIT) );
+ var loc = obj.url_prefix('XUL_BROWSER?url=')
+ + window.escape( obj.url_prefix('XUL_PATRON_EDIT') );
obj.command_tab(
event,
loc,
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_STAGED_PATRONS),{'tab_name':offlineStrings.getString('menu.circulation.staged_patrons.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_STAGED_PATRONS'),{'tab_name':offlineStrings.getString('menu.circulation.staged_patrons.tab')},{});
}
],
'cmd_circ_checkin' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_CHECKIN),{},{});
+ obj.command_tab(event,obj.url_prefix('XUL_CHECKIN'),{},{});
}
],
'cmd_circ_renew' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_RENEW),{},{});
+ obj.command_tab(event,obj.url_prefix('XUL_RENEW'),{},{});
}
],
'cmd_circ_checkout' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_PATRON_BARCODE_ENTRY),{},{});
+ obj.command_tab(event,obj.url_prefix('XUL_PATRON_BARCODE_ENTRY'),{},{});
}
],
'cmd_circ_hold_capture' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_CHECKIN)+'?hold_capture=1',{},{});
+ obj.command_tab(event,obj.url_prefix('XUL_CHECKIN?hold_capture=1'),{},{});
}
],
'cmd_browse_holds_shelf' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_HOLDS_BROWSER)+'?shelf=1',{ 'tab_name' : offlineStrings.getString('menu.cmd_browse_holds_shelf.tab') },{});
+ obj.command_tab(event,obj.url_prefix('XUL_HOLDS_BROWSER?shelf=1'),{ 'tab_name' : offlineStrings.getString('menu.cmd_browse_holds_shelf.tab') },{});
}
],
'cmd_clear_holds_shelf' : [
function(event) {
obj.data.stash_retrieve();
var loc = urls.XUL_BROWSER + '?url=' + window.escape(
- obj.url_prefix(urls.XUL_HOLD_PULL_LIST)
+ obj.url_prefix('XUL_HOLD_PULL_LIST')
);
obj.command_tab(event, loc, {'tab_name' : offlineStrings.getString('menu.cmd_browse_hold_pull_list.tab')} );
}
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_IN_HOUSE_USE),{},{});
+ obj.command_tab(event,obj.url_prefix('XUL_IN_HOUSE_USE'),{},{});
}
],
'cmd_scan_item_as_missing_pieces' : [
['oncommand'],
function() {
- xulG.window.open(obj.url_prefix(urls.XUL_SCAN_ITEM_AS_MISSING_PIECES),'scan_missing_pieces','chrome');
+ xulG.window.open(obj.url_prefix('XUL_SCAN_ITEM_AS_MISSING_PIECES'),'scan_missing_pieces','chrome');
}
],
'cmd_standalone' : [
['oncommand'],
function() {
- //obj.set_tab(obj.url_prefix(urls.XUL_STANDALONE),{},{});
+ //obj.set_tab(obj.url_prefix('XUL_STANDALONE'),{},{});
window.open(urls.XUL_STANDALONE,'Offline','chrome,resizable');
}
],
'cmd_local_admin' : [
['oncommand'],
function(event) {
- //obj.set_tab(obj.url_prefix(urls.XUL_LOCAL_ADMIN)+'?ses='+window.escape(ses())+'&session='+window.escape(ses()),{},{});
+ //obj.set_tab(obj.url_prefix('XUL_LOCAL_ADMIN')+'?ses='+window.escape(ses())+'&session='+window.escape(ses()),{},{});
var loc = urls.XUL_BROWSER + '?url=' + window.escape(
- obj.url_prefix( urls.XUL_LOCAL_ADMIN+'?ses='+window.escape(ses())+'&session='+window.escape(ses()) )
+ obj.url_prefix( 'XUL_LOCAL_ADMIN?ses='+window.escape(ses())+'&session='+window.escape(ses()) )
);
obj.command_tab(
event,
'cmd_local_admin_reports' : [
['oncommand'],
function(event) {
- var loc = urls.XUL_BROWSER + '?url=' + window.escape( obj.url_prefix(urls.XUL_REPORTS) + '?ses=' + ses());
+ var loc = urls.XUL_BROWSER + '?url=' + window.escape( obj.url_prefix('XUL_REPORTS?ses=') + ses());
obj.command_tab(
event,
loc,
'cmd_local_admin_do_not_auto_attempt_print_setting' : [
['oncommand'],
function(event) {
- obj.command_tab(event,obj.url_prefix(urls.XUL_DO_NOT_AUTO_ATTEMPT_PRINT_SETTING),{'tab_name':offlineStrings.getString('menu.cmd_local_admin_do_not_auto_attempt_print_setting.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_DO_NOT_AUTO_ATTEMPT_PRINT_SETTING'),{'tab_name':offlineStrings.getString('menu.cmd_local_admin_do_not_auto_attempt_print_setting.tab')},{});
}
],
'cmd_local_admin_closed_dates' : [
function(event) {
obj.command_tab(
event,
- obj.url_prefix(urls.XUL_PATRONS_DUE_REFUNDS),
+ obj.url_prefix('XUL_PATRONS_DUE_REFUNDS'),
{ 'tab_name' : offlineStrings.getString('menu.local_admin.patrons_due_refunds.tab') },
{}
);
return;
}
var horizontal_interface = String( obj.data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true';
- var url = obj.url_prefix( horizontal_interface ? urls.XUL_PATRON_HORIZ_DISPLAY : urls.XUL_PATRON_DISPLAY );
+ var url = obj.url_prefix( horizontal_interface ? 'XUL_PATRON_HORIZ_DISPLAY' : 'XUL_PATRON_DISPLAY' );
obj.command_tab( event, url, {}, { 'id' : obj.data.last_patron } );
}
],
alert(offlineStrings.getString('menu.cmd_retrieve_last_record.session.error'));
return;
}
- var opac_url = obj.url_prefix( urls.opac_rdetail ) + obj.data.last_record;
+ var opac_url = obj.url_prefix('opac_rdetail') + obj.data.last_record;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
};
obj.command_tab(
event,
- obj.url_prefix(urls.XUL_OPAC_WRAPPER),
+ obj.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name' : offlineStrings.getString('menu.cmd_retrieve_last_record.status')},
content_params
);
function(event) {
obj.command_tab(
event,
- obj.url_prefix(urls.XUL_VERIFY_CREDENTIALS),
+ obj.url_prefix('XUL_VERIFY_CREDENTIALS'),
{ 'tab_name' : offlineStrings.getString('menu.cmd_verify_credentials.tabname') },
{}
);
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_Z3950_IMPORT),{},{});
+ obj.command_tab(event,obj.url_prefix('XUL_Z3950_IMPORT'),{},{});
}
],
'cmd_create_marc' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_MARC_NEW),{},{});
+ obj.command_tab(event,obj.url_prefix('XUL_MARC_NEW'),{},{});
}
],
function(event) {
obj.command_tab(
event,
- obj.url_prefix(urls.MARC_BATCH_EDIT),{
+ obj.url_prefix('MARC_BATCH_EDIT'),{
'tab_name' : offlineStrings.getString('menu.cmd_marc_batch_edit.tab')
},
{}
obj.data.stash('session');
obj.data.stash('menu_perms');
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
- var cookieUri = ios.newURI("http://" + obj.data.server_unadorned, null, null);
var cookieUriSSL = ios.newURI("https://" + obj.data.server_unadorned, null, null);
var cookieSvc = Components.classes["@mozilla.org/cookieService;1"].getService(Components.interfaces.nsICookieService);
- cookieSvc.setCookieString(cookieUri, null, "ses="+obj.data.session.key, null);
- cookieSvc.setCookieString(cookieUriSSL, null, "ses="+obj.data.session.key, null);
+ cookieSvc.setCookieString(cookieUriSSL, null, "ses="+obj.data.session.key + "; secure;", null);
} catch(E) {
alert(offlineStrings.getFormattedString(main.session_cookie.error, [E]));
'cmd_manage_offline_xacts' : [
['oncommand'],
function(event) {
- obj.command_tab(event,obj.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS), {'tab_name' : offlineStrings.getString('menu.cmd_manage_offline_xacts.tab')}, {});
+ obj.command_tab(event,obj.url_prefix('XUL_OFFLINE_MANAGE_XACTS'), {'tab_name' : offlineStrings.getString('menu.cmd_manage_offline_xacts.tab')}, {});
}
],
'cmd_download_patrons' : [
['oncommand'],
function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var x = new XMLHttpRequest();
var url = 'http://' + XML_HTTP_SERVER + '/standalone/list.txt';
x.open("GET",url,false);
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_PATRON_BARCODE_ENTRY), {}, { 'perm_editor' : true });
+ obj.command_tab(event,obj.url_prefix('XUL_PATRON_BARCODE_ENTRY'), {}, { 'perm_editor' : true });
}
],
'cmd_print_list_template_edit' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_PRINT_LIST_TEMPLATE_EDITOR), {}, {});
+ obj.command_tab(event,obj.url_prefix('XUL_PRINT_LIST_TEMPLATE_EDITOR'), {}, {});
}
],
'cmd_stat_cat_edit' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_STAT_CAT_EDIT) + '?ses='+window.escape(ses()), {'tab_name' : offlineStrings.getString('menu.cmd_stat_cat_edit.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_STAT_CAT_EDIT?ses=') + window.escape(ses()), {'tab_name' : offlineStrings.getString('menu.cmd_stat_cat_edit.tab')},{});
}
],
'cmd_non_cat_type_edit' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_NON_CAT_LABEL_EDIT) + '?ses='+window.escape(ses()), {'tab_name' : offlineStrings.getString('menu.cmd_non_cat_type_edit.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_NON_CAT_LABEL_EDIT?ses=') + window.escape(ses()), {'tab_name' : offlineStrings.getString('menu.cmd_non_cat_type_edit.tab')},{});
}
],
'cmd_copy_location_edit' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.XUL_COPY_LOCATION_EDIT) + '?ses='+window.escape(ses()),{'tab_name' : offlineStrings.getString('menu.cmd_copy_location_edit.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_COPY_LOCATION_EDIT?ses=') + window.escape(ses()),{'tab_name' : offlineStrings.getString('menu.cmd_copy_location_edit.tab')},{});
}
],
'cmd_test' : [
function(event) {
obj.data.stash_retrieve();
var content_params = { 'session' : ses(), 'authtime' : ses('authtime') };
- obj.command_tab(event,obj.url_prefix(urls.XUL_OPAC_WRAPPER), {}, content_params);
+ obj.command_tab(event,obj.url_prefix('XUL_OPAC_WRAPPER'), {}, content_params);
}
],
'cmd_test_html' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.TEST_HTML) + '?ses='+window.escape(ses()),{ 'browser' : true },{});
+ obj.command_tab(event,obj.url_prefix('TEST_HTML?ses=') + window.escape(ses()),{ 'browser' : true },{});
}
],
'cmd_test_xul' : [
['oncommand'],
function(event) {
obj.data.stash_retrieve();
- obj.command_tab(event,obj.url_prefix(urls.TEST_XUL) + '?ses='+window.escape(ses()),{ 'browser' : false },{});
+ obj.command_tab(event,obj.url_prefix('TEST_XUL?ses=') + window.escape(ses()),{ 'browser' : false },{});
}
],
'cmd_console' : [
['oncommand'],
function(event) {
- obj.command_tab(event,obj.url_prefix(urls.XUL_DEBUG_CONSOLE),{'tab_name' : offlineStrings.getString('menu.cmd_console.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_DEBUG_CONSOLE'),{'tab_name' : offlineStrings.getString('menu.cmd_console.tab')},{});
}
],
'cmd_shell' : [
['oncommand'],
function(event) {
- obj.command_tab(event,obj.url_prefix(urls.XUL_DEBUG_SHELL),{'tab_name' : offlineStrings.getString('menu.cmd_shell.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_DEBUG_SHELL'),{'tab_name' : offlineStrings.getString('menu.cmd_shell.tab')},{});
}
],
'cmd_xuleditor' : [
['oncommand'],
function(event) {
- obj.command_tab(event,obj.url_prefix(urls.XUL_DEBUG_XULEDITOR),{'tab_name' : offlineStrings.getString('menu.cmd_xuleditor.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_DEBUG_XULEDITOR'),{'tab_name' : offlineStrings.getString('menu.cmd_xuleditor.tab')},{});
}
],
'cmd_fieldmapper' : [
['oncommand'],
function(event) {
- obj.command_tab(event,obj.url_prefix(urls.XUL_DEBUG_FIELDMAPPER),{'tab_name' : offlineStrings.getString('menu.cmd_fieldmapper.tab')},{});
+ obj.command_tab(event,obj.url_prefix('XUL_DEBUG_FIELDMAPPER'),{'tab_name' : offlineStrings.getString('menu.cmd_fieldmapper.tab')},{});
}
],
'cmd_survey_wizard' : [
['oncommand'],
function() {
obj.data.stash_retrieve();
- xulG.window.open(obj.url_prefix(urls.XUL_SURVEY_WIZARD),'survey_wizard','chrome');
+ xulG.window.open(obj.url_prefix('XUL_SURVEY_WIZARD'),'survey_wizard','chrome');
}
],
'cmd_public_opac' : [
['oncommand'],
function(event) {
var loc = urls.XUL_BROWSER + '?url=' + window.escape(
- obj.url_prefix(urls.remote)
+ obj.url_prefix('remote')
);
obj.command_tab(
event,
['oncommand'],
function clear_the_cache() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var cacheClass = Components.classes["@mozilla.org/network/cache-service;1"];
var cacheService = cacheClass.getService(Components.interfaces.nsICacheService);
cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK);
obj.data.unsaved_data = 0; // just in case the program doesn't close somehow
obj.data.stash('unsaved_data');
dump('forcing data.unsaved_data == ' + obj.data.unsaved_data + '\n');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService();
var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
var enumerator = windowManagerInterface.getEnumerator(null);
'cmd_toolbar_configure' : [
['oncommand'],
function(event) {
- var url = obj.url_prefix( urls.XUL_TOOLBAR_CONFIG );
+ var url = obj.url_prefix( 'XUL_TOOLBAR_CONFIG' );
obj.command_tab(event,url,{},{});
}
],
function() {
try {
tabscroller.ensureElementIsVisible(tab);
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (panel
&& panel.firstChild
&& ( panel.firstChild.nodeName == 'iframe' || panel.firstChild.nodeName == 'browser' )
'set_patron_tab' : function(params,content_params,event) {
var obj = this;
var horizontal_interface = String( obj.data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true';
- var url = obj.url_prefix( horizontal_interface ? urls.XUL_PATRON_HORIZ_DISPLAY : urls.XUL_PATRON_DISPLAY );
+ var url = obj.url_prefix( horizontal_interface ? 'XUL_PATRON_HORIZ_DISPLAY' : 'XUL_PATRON_DISPLAY' );
obj.command_tab(event,url,params ? params : {},content_params ? content_params : {});
},
'new_patron_tab' : function(params,content_params) {
var obj = this;
var horizontal_interface = String( obj.data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true';
- var url = obj.url_prefix( horizontal_interface ? urls.XUL_PATRON_HORIZ_DISPLAY : urls.XUL_PATRON_DISPLAY );
+ var url = obj.url_prefix( horizontal_interface ? 'XUL_PATRON_HORIZ_DISPLAY' : 'XUL_PATRON_DISPLAY' );
obj.new_tab(url,params ? params : {},content_params ? content_params : {});
},
'volume_item_creator' : function(params) {
var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- url = obj.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ url = obj.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
} else {
- url = obj.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+ url = obj.url_prefix('XUL_VOLUME_COPY_CREATOR_ORIGINAL');
}
var w = obj.new_tab(
url,
if (docid) {
content_params['docid'] = docid;
}
- var url = obj.url_prefix( urls.XUL_COPY_VOLUME_BROWSE );
+ var url = obj.url_prefix('XUL_COPY_VOLUME_BROWSE');
obj.new_tab(url,params || {}, content_params);
},
'get_new_session' : function(params) {
'set_tab' : function(url,params,content_params) {
var obj = this;
- if (!url) url = '/xul/server/';
+ if (!url) url = 'oils://remote/xul/server/';
if (!url.match(/:\/\//) && !url.match(/^data:/)) url = urls.remote + url;
if (!params) params = {};
if (!content_params) content_params = {};
dump('creating iframe with src = ' + url + '\n');
frame.setAttribute('src',url);
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var cw = frame.contentWindow;
if (typeof cw.wrappedJSObject != 'undefined') cw = cw.wrappedJSObject;
cw.IAMXUL = true;
},
'open_external' : function(url) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
// first construct an nsIURI object using the ioservice
var ioservice = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
if(!xulG.url_prefix) xulG.url_prefix = url_prefix; // Make util.window happy
JSAN.use('util.window');
var win = new util.window();
- var url = url_prefix(urls.XUL_FANCY_PROMPT);
+ var url = url_prefix('XUL_FANCY_PROMPT');
var title = offlineStrings.getString('barcode_choice.title');
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" flex="1">';
xml += '<groupbox flex="1" style="overflow: auto; border: solid thin;"><caption label="' + title + '"/>';
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw(document.getElementById('offlineStrings').getString('common.jsan.missing')); }
JSAN.errorLevel = "die"; // none, warn, or die
/*
<menuitem label="&staff.main.menu.admin.venkman.label;" command="cmd_debug_venkman"/>
<menuitem label="&staff.main.auth.debug.inspector;" command="cmd_debug_inspector"/>
<menuitem label="&staff.main.auth.debug.chrome_list;" command="cmd_debug_chrome_list"/>
- <menuitem label="&staff.main.menu.admin.ping;" oncommand="try{netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');JSAN.use('util.network'); var n = new util.network(); alert(n.ping());}catch(E){alert(E);}"/>
+ <menuitem label="&staff.main.menu.admin.ping;" oncommand="try{JSAN.use('util.network'); var n = new util.network(); alert(n.ping());}catch(E){alert(E);}"/>
</menupopup>
</menu>
</menupopup>
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( offlineStrings.getString('common.jsan.missing'));
}
if (typeof util == 'undefined') util = {};
util.browser = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
} catch(E) {
dump('util.browser: ' + E + '\n');
'init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
var obj = this;
obj.url = params['url'];
['command'],
function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var content = obj.get_content();
JSAN.use('util.print'); var p = new util.print(obj.printer_context);
var print_params = {};
['command'],
function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var n = obj.getWebNavigation();
if (n.canGoForward) n.goForward();
} catch(E) {
['command'],
function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var n = obj.getWebNavigation();
if (n.canGoBack) {
obj.back_button_clicked = true;
return;
}
}
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var n = obj.getWebNavigation();
n.reload( Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE );
},
'find' : function(text) {
var obj = this;
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
function getBrowser() {
return obj.controller.view.browser_browser;
}
'get_content' : function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (this.controller.view.browser_browser.contentWindow.wrappedJSObject) {
return this.controller.view.browser_browser.contentWindow.wrappedJSObject;
} else {
var s = '';
try { s += obj.url + '\n' + obj.get_content().location.href + '\n'; } catch(E) { s+=E + '\n'; }
if (!obj.push_xulG) return;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var cw = this.get_content();
cw.IAMXUL = true;
cw.XUL_BUILD_ID = '/xul/server/'.split(/\//)[2];
'getWebNavigation' : function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var wn = this.controller.view.browser_browser.webNavigation;
var s = this.url + '\n' + this.get_content().location.href + '\n';
s += ('getWebNavigation() = ' + wn + '\n');
},
'updateNavButtons' : function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
var s = obj.url + '\n' + obj.get_content().location.href + '\n';
try {
'buildProgressListener' : function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
var obj = this;
obj.progressListener = {
onProgressChange : function(webProgress,request,curSelfProgress,maxSelfProgress,curTotalProgress,maxTotalProgress){
},
onStateChange : function ( webProgress, request, stateFlags, status) {
try {
- netscape.security.PrivilegeManager.enablePrivilege( "UniversalXPConnect" );
/*dump('browser.js onStateChange('
+webProgress
+','+request
obj.error.sdump('D_TRACE','calling on_url_load');
var helpers = {
'doc_write' : function(html) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.get_content().document.write(html);
},
'doc_close' : function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.get_content().document.close();
}
}
<!-- BEHAVIOR -->
<script type="text/javascript">
var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
</script>
<scripts id="openils_util_scripts"/>
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
</commandset>
<popupset>
- <popup id="debug_popup">
+ <menupopup id="debug_popup">
<menuitem label="&common.browser.view_source.label;" accesskey="&common.browser.view_source.accesskey;" command="cmd_view_source" />
<menuitem label="&common.browser.set_url.label;" accesskey="&common.browser.set_url.accesskey;" command="cmd_debug" />
<menuitem label="&common.browser.find.label;" accesskey="&common.browser.find.accesskey;" command="cmd_find" />
- </popup>
+ </menupopup>
</popupset>
<vbox flex="1">
<label id="debug" value="Debug" disabled="true" popup="debug_popup" />
<button id="browser_print" command="cmd_print" hidden="true"/>
</hbox>
- <browser id="browser_browser" flex="1" autoscroll="false" type="content"/>
+ <browser id="browser_browser" flex="1" autoscroll="false" type="content" oils_force_external="true" />
</vbox>
</window>
util.clipboard.cut = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var n = document.popupNode;
if (n.getAttribute('readonly')=='true') return;
var v = n.value;
util.clipboard.copy = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var n = document.popupNode;
var v = n.value;
var start = n.selectionStart;
util.clipboard.paste = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var n = document.popupNode;
if (n.getAttribute('readonly')=='true') return;
var v = n.value;
if (content_params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
this.error.sdump('D_DECK', 'set_iframe\nurl = ' + url + '\nframe.contentWindow = ' + iframe.contentWindow + '\n' + 'content_params = ' + (content_params) );
var cw = iframe.contentWindow;
if (typeof iframe.contentWindow.wrappedJSObject != 'undefined') cw = iframe.contentWindow.wrappedJSObject;
this.node.selectedIndex = this.node.childNodes.length - 1;
if (content_params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
this.error.sdump('D_DECK', 'new_iframe\nurl = ' + url + '\nframe.contentWindow = ' + iframe.contentWindow + '\n' + 'content_params = ' + (content_params) );
var cw = iframe.contentWindow;
if (typeof iframe.contentWindow.wrappedJSObject != 'undefined') cw = iframe.contentWindow.wrappedJSObject;
try {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
this.consoleService = Components.classes['@mozilla.org/consoleservice;1']
.getService(Components.interfaces.nsIConsoleService);
} catch(E) {
if (this.forceDebugDump || ( this.allowDebugDump && this.sdump_levels[level] && this.sdump_levels[level].debug ) ) this.debug(message);
if (this.forceAlertDump || ( this.allowAlertDump && this.sdump_levels[level] && this.sdump_levels[level].alert ) ) alert(message);
if (this.forceConsoleDump || ( this.allowConsoleDump && this.sdump_levels[level] && this.sdump_levels[level].console ) ) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (level=='D_ERROR') {
Components.utils.reportError(message);
} else {
}
if (this.forceFileDump || ( this.allowFileDump && this.sdump_levels[level] && this.sdump_levels[level].file ) ) {
if (level!='D_FILE') {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.file'); var master_log = new util.file('log');
master_log.write_content('append',message); master_log.close();
var specific_log = new util.file('log_'+level);
*/
dump('yns_alert:\n\ts = ' + s + '\n\ttitle = ' + title + '\n\tb1 = ' + b1 + '\n\tb2 = ' + b2 + '\n\tb3 = ' + b3 + '\n\tc = ' + c + '\n');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
//FIXME - is that good enough of an escape job?
s = s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
*/
dump('yns_alert_formatted:\n\ts = ' + s + '\n\ttitle = ' + title + '\n\tb1 = ' + b1 + '\n\tb2 = ' + b2 + '\n\tb3 = ' + b3 + '\n\tc = ' + c + '\n');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
//FIXME - is that good enough of an escape job?
s = s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
*/
dump('yns_alert_original:\n\ts = ' + s + '\n\ttitle = ' + title + '\n\tb1 = ' + b1 + '\n\tb2 = ' + b2 + '\n\tb3 = ' + b3 + '\n\tc = ' + c + '\n');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (this.sound) { this.sound.bad(); }
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
if (typeof util == 'undefined') util = {};
util.file = function (fname) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead");
-
JSAN.use('util.error'); this.error = new util.error();
this.dirService = Components.classes["@mozilla.org/file/directory_service;1"].
if (!fname) throw('Must specify a filename.');
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead");
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
if (!path && pref.getBoolPref("open-ils.write_in_user_chrome_directory")) path = 'uchrome';
this._file = this.dirService.get( "UChrm", Components.interfaces.nsIFile );
//this._file = this.dirService.get( "ProfD", Components.interfaces.nsIFile );
break;
- case 'skin' :
- this._file = this.dirService.get( "AChrom", Components.interfaces.nsIFile );
- this._file.append("skin");
- break;
default:
case 'chrome' :
this._file = this.dirService.get( "AChrom", Components.interfaces.nsIFile );
'write_content' : function(write_type,content) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead");
if (!this._output_stream) this._create_output_stream(write_type);
this._output_stream.write( content, String( content ).length );
} catch(E) {
'get_content' : function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead");
-
if (!this._file) throw('Must .get() a file first.');
if (!this._file.exists()) throw('File does not exist.');
try {
//dump('_create_input_stream()\n');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead");
-
if (!this._file) throw('Must .get() a file first.');
if (!this._file.exists()) throw('File does not exist.');
try {
//dump('_create_output_stream('+param+') for '+this._file.path+'\n');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead UniversalFileRead");
-
if (!this._file) throw('Must .get() a file first.');
if (! this._file.exists()) {
'pick_file' : function(params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof params == 'undefined') params = {};
if (typeof params.mode == 'undefined') params.mode = 'open';
var nsIFilePicker = Components.interfaces.nsIFilePicker;
if (typeof params == 'undefined') params = {};
params.mode = 'save';
if (typeof params.data == 'undefined') throw('Need a .data field to export');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var f = obj.pick_file( params );
if (f) {
obj._file = f;
var obj = this;
if (typeof params == 'undefined') params = {};
params.mode = 'open';
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var f = obj.pick_file(params);
if (f && f.exists()) {
obj._file = f;
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
var col_ordinal = col.getAttribute('ordinal');
my_cols[ col_id ] = { 'hidden' : col_hidden, 'width' : col_width, 'ordinal' : col_ordinal };
}
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('tree_columns_for_'+window.escape(id));
file.set_object(my_cols);
file.close();
var my_cols;
if (! obj.data.hash.aous) { obj.data.hash.aous = {}; }
if (! obj.data.hash.aous['gui.disable_local_save_columns']) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('tree_columns_for_'+window.escape(id));
if (file._file.exists()) {
my_cols = file.get_object(); file.close();
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
dump('entering util/mozilla.js\n');
-netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
const Cc = Components.classes;
const Ci = Components.interfaces;
util.mozilla.chromeRegistry = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
return Cc['@mozilla.org/chrome/chrome-registry;1'].getService(Ci['nsIToolkitChromeRegistry']);
} catch(E) {
util.mozilla.languages = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var stringBundles = Cc['@mozilla.org/intl/stringbundle;1'].getService(Ci['nsIStringBundleService']);
return stringBundles.createBundle('chrome://global/locale/languageNames.properties');
util.mozilla.regions = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var stringBundles = Cc['@mozilla.org/intl/stringbundle;1'].getService(Ci['nsIStringBundleService']);
return stringBundles.createBundle('chrome://global/locale/regionNames.properties');
util.mozilla.prefs = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
return Cc['@mozilla.org/preferences-service;1'].getService(Ci['nsIPrefBranch']);
} catch(E) {
while ( w = enumerator.getNext() ) {
x = w.document.getElementById('oc_menuitem');
- if(!offlinestrings) w.document.getElementById('offlineStrings');
+ if(!offlinestrings) offlinestrings = w.document.getElementById('offlineStrings');
if(permlist) w.g.menu.set_menu_access(permlist);
if(data.list.au.length > 1) {
addCSSClass(w.document.getElementById('main_tabbox'),'operator_change');
var obj = this;
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var url = urls.XUL_AUTH_SIMPLE;
if (typeof xulG != 'undefined' && typeof xulG.url_prefix == 'function') url = xulG.url_prefix( url );
JSAN.use('util.window'); var win = new util.window();
data.stash('session');
try {
var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
- var cookieUri = ios.newURI("http://" + data.server_unadorned, null, null);
var cookieUriSSL = ios.newURI("https://" + data.server_unadorned, null, null);
var cookieSvc = Components.classes["@mozilla.org/cookieService;1"].getService(Components.interfaces.nsICookieService);
- cookieSvc.setCookieString(cookieUri, null, "ses="+data.session.key, null);
- cookieSvc.setCookieString(cookieUriSSL, null, "ses="+data.session.key, null);
+ cookieSvc.setCookieString(cookieUriSSL, null, "ses="+data.session.key + "; secure;", null);
} catch(E) {
alert(offineStrings.getFormattedString('main.session_cookie.error', [E]));
var obj = this;
var robj = obj.get_result(req);
if (robj != null && robj.ilsevent && robj.ilsevent == 5000) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
if (location.href.match(/^chrome/)) {
//alert('Permission denied.');
} else {
return req;
}
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">' +
'<groupbox><caption label="' + offlineStrings.getString('network.override.exceptions') + '"/>' +
'<grid><columns><column/><column flex="1"/></columns><rows>';
if (typeof util == 'undefined') util = {};
util.print = function (context) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init( { 'via':'stash' } );
JSAN.use('util.window'); this.win = new util.window();
util.print.prototype = {
'set_context' : function(context, set_default) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
this.context = context || 'default';
if(set_default) this.default_context = this.context;
var w;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.data.init({'via':'stash'});
if (typeof obj.data.print_strategy == 'undefined') {
try {
if (!params) params = {};
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.data.init({'via':'stash'});
if (params.print_strategy || obj.data.print_strategy[obj.context] || obj.data.print_strategy['default']) {
w = obj.html2txt(temp_w);
} catch(E) {
dump('util.print: Could not use w.document.firstChild.innerHTML with ' + w + ': ' + E + '\n');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
w.getSelection().selectAllChildren(w.document.firstChild);
w = w.getSelection().toString();
}
obj._NSPrint_custom_print(w,silent,params);
break;
case 'window.print':
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
var originalPrinter = false;
if (prefs.prefHasUserValue('print.print_printer')) {
'_NSPrint_webBrowserPrint' : function(w,silent,params) {
var obj = this;
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var webBrowserPrint = w
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebBrowserPrint);
'GetPrintSettings' : function() {
try {
//alert('entering GetPrintSettings');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
//alert('pref = ' + pref);
'setPrinterDefaultsForSelectedPrinter' : function (aPrintService) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (this.gPrintSettings.printerName == "") {
this.gPrintSettings.printerName = aPrintService.defaultPrinterName;
//alert('used .defaultPrinterName');
'page_settings' : function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
this.GetPrintSettings();
var PO = Components.classes["@mozilla.org/gfx/printsettings-service;1"].getService(Components.interfaces.nsIPrintOptions);
PO.ShowPrintSetupDialog(this.gPrintSettings);
'load_settings' : function() {
try {
var error_msg = '';
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = new util.file('gPrintSettings.' + this.context);
if (file._file.exists()) {
temp = file.get_object(); file.close();
'save_settings' : function() {
try {
var obj = this;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = new util.file('gPrintSettings.' + this.context);
if (typeof obj.gPrintSettings == 'undefined') obj.GetPrintSettings();
if (obj.gPrintSettings) file.set_object(obj.gPrintSettings);
<!-- BEHAVIOR -->
<script type="text/javascript">
var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
</script>
<scripts id="openils_util_scripts"/>
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
</commandset>
<popupset>
- <popup id="debug_popup">
+ <menupopup id="debug_popup">
<menuitem label="&common.browser.view_source.label;" accesskey="&common.browser.view_source.accesskey;" command="cmd_view_source" />
<menuitem label="&common.browser.set_url.label;" accesskey="&common.browser.set_url.accesskey;" command="cmd_debug" />
<menuitem label="&common.browser.find.label;" accesskey="&common.browser.find.accesskey;" command="cmd_find" />
- </popup>
+ </menupopup>
</popupset>
<vbox flex="1">
<label id="debug" value="Debug" disabled="true" popup="debug_popup" />
<button id="browser_print" command="cmd_print" hidden="true"/>
</hbox>
- <browser id="browser_browser" flex="1" autoscroll="false" type="content"/>
+ <browser id="browser_browser" flex="1" autoscroll="false" type="content" oils_force_external="true" />
</vbox>
</window>
function win_list() {
var list = [];
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
getService(Components.interfaces.nsIWindowMediator);
var enumerator = wm.getEnumerator('eg_menu');
idx = b;
}
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var tabs = win.document.getElementById('main_tabs');
var panels = win.document.getElementById('main_panels');
return { 'name' : tabs.childNodes[idx].getAttribute('label'), 'content' : panels.childNodes[idx].firstChild.contentWindow };
dump('SOUND('+this.sig+'): starting timer with intervalId = ' + intervalId + '\n');
}
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var SOUNDContractID = "@mozilla.org/sound;1";
var SOUNDIID = Components.interfaces.nsISound;
this.SOUND = Components.classes[SOUNDContractID].createInstance(SOUNDIID);
'xp_url_init' : function (aURL) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var URLContractID = "@mozilla.org/network/standard-url;1";
var URLIID = Components.classes[URLContractID].createInstance( );
var URL = URLIID.QueryInterface(Components.interfaces.nsIURL);
var obj = this;
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
var url2 = obj.xp_url_init( data.server + url );
if (typeof data.no_sound == 'undefined' || data.no_sound == false || data.no_sound == 'false') {
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
util.widgets.save_xml = function (filename,node) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
JSAN.use('util.file'); var file = new util.file(filename);
node = util.widgets.get(node);
dump('\telement_id = ' + element_id + '\n');
}
}
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
//FIXME - WHY DOES THIS NOT WORK?// JSAN.use('util.file'); var file = new util.file(filename);
file.set_object(blob); file.close();
} catch(E) {
util.widgets.load_attributes = function (file) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
//FIXME - WHY DOES THIS NOT WORK?// JSAN.use('util.file'); var file = new util.file(filename);
if (file._file.exists()) {
var blob = file.get_object(); file.close();
'SafeWindowOpen' : function (url,title,features) {
var w;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesRead");
- netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesWrite");
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
-
const CI = Components.interfaces;
const PB = Components.classes["@mozilla.org/preferences-service;1"].getService(CI.nsIPrefBranch);
'SafeWindowOpenDialog' : function (url,title,features) {
var w;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesRead");
- netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesWrite");
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
- netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserWrite");
-
const CI = Components.interfaces;
const PB = Components.classes["@mozilla.org/preferences-service;1"].getService(CI.nsIPrefBranch);
},
'open' : function(url,title,features,my_xulG) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var key;
if (!title) title = '_blank';
if (!features) features = 'chrome';
} else if (typeof url_prefix == 'function') {
key = key.replace( url_prefix('/'), '/' );
}
+ // oils://remote/ looks like http://server/ to files loaded off of it. That is, location.pathname ignores it.
+ // So remove it here, like we remove url_prefix.
+ key = key.replace('oils://remote/', '/');
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');
},
'openDialog' : function(url,title,features,my_xulG) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var key;
if (!title) title = '_blank';
if (!features) features = 'chrome'; // Note that this is a default for openDialog anyway
} else if (typeof url_prefix == 'function') {
key = key.replace( url_prefix('/'), '/' );
}
+ // oils://remote/ looks like http://server/ to files loaded off of it. That is, location.pathname ignores it.
+ // So remove it here, like we remove url_prefix.
+ key = key.replace('oils://remote/', '/');
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');
<textbox id="ta" multiline="true" wrap="true" flex="1" onkeydown="resetTimeout()"
value='<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<label value="Put your XUL here!"/>
</window>'/>
<splitter id="split"/>
-<iframe id="content" src="about:blank" flex="1"/>
+<iframe id="content" src="about:blank" flex="1" oils_force_external="true"/>
<hbox><button id="open" label="Open preview in new window" onclick="openwin()"/><spacer flex="1"/></hbox>
</vbox>
</window>
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/TR/REC-html40");
-window:not([active="true"]) menubar > menu { color: menutext !important }
-
*|textarea:focus { background-color: #DDFFDD; }
*|input:focus { background-color: #DDFFDD; }
-const nsISupports = Components.interfaces.nsISupports;\r
-const nsICategoryManager = Components.interfaces.nsICategoryManager;\r
-const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;\r
-const nsICommandLine = Components.interfaces.nsICommandLine;\r
-const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;\r
-const nsIFactory = Components.interfaces.nsIFactory;\r
-const nsIModule = Components.interfaces.nsIModule;\r
-const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;\r
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");\r
\r
+// This component exists to handle custom command line options\r
+// First up, some useful constants\r
\r
+// Standalone interface information\r
const XUL_STANDALONE = "chrome://open_ils_staff_client/content/circ/offline.xul";\r
-const XUL_MAIN = "chrome://open_ils_staff_client/content/main/main.xul";\r
const WINDOW_STANDALONE = "eg_offline"\r
+// Main (login) window information\r
+const XUL_MAIN = "chrome://open_ils_staff_client/content/main/main.xul";\r
const WINDOW_MAIN = "eg_main"\r
\r
-const clh_contractID = "@mozilla.org/commandlinehandler/general-startup;1?type=egcli";\r
-const clh_CID = Components.ID("{7e608198-7355-483a-a85a-20322e4ef91a}");\r
-// category names are sorted alphabetically. Typical command-line handlers use a\r
-// category that begins with the letter "m".\r
-const clh_category = "m-egcli";\r
-\r
-/**\r
- * Utility functions\r
- */\r
+// Useful utility functions\r
\r
/**\r
* Opens a chrome window.\r
*/\r
function findOrOpenWindow(aWindowType, aChromeURISpec, aName, aArgument, aLoginInfo)\r
{\r
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].\r
- getService(Components.interfaces.nsIWindowMediator);\r
- var targetWindow = wm.getMostRecentWindow(aWindowType);\r
- if (targetWindow != null) {\r
- var noFocus = false;\r
- if(typeof targetWindow.new_tabs == 'function' && aArgument != null) {\r
- targetWindow.new_tabs(aArgument);\r
- noFocus = true;\r
- }\r
- if(typeof targetWindow.auto_login == 'function' && aLoginInfo != null) {\r
- targetWindow.auto_login(aLoginInfo);\r
- noFocus = true;\r
- }\r
- if(!noFocus) {\r
- targetwindow.focus;\r
- }\r
- }\r
- else {\r
- var params = null;\r
- if (aArgument != null && aArgument.length != 0 || aLoginInfo != null)\r
- {\r
- params = { "openTabs" : aArgument, "loginInfo" : aLoginInfo };\r
- params.wrappedJSObject = params;\r
- }\r
- var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].\r
- getService(Components.interfaces.nsIWindowWatcher);\r
- ww.openWindow(null, aChromeURISpec, aName,\r
- "chrome,resizable,dialog=no", params);\r
- }\r
-}\r
- \r
-/**\r
- * The XPCOM component that implements nsICommandLineHandler.\r
- * It also implements nsIFactory to serve as its own singleton factory.\r
- */\r
-const myAppHandler = {\r
- /* nsISupports */\r
- QueryInterface : function clh_QI(iid)\r
- {\r
- if (iid.equals(nsICommandLineHandler) ||\r
- iid.equals(nsIFactory) ||\r
- iid.equals(nsISupports))\r
- return this;\r
-\r
- throw Components.results.NS_ERROR_NO_INTERFACE;\r
- },\r
-\r
- /* nsICommandLineHandler */\r
-\r
- handle : function clh_handle(cmdLine)\r
- {\r
- // Each of these options is used for opening a new tab, either on login or remote send.\r
- // XULRunner does some sanitize to turn /ilsblah into -ilsblah, for example.\r
- // In addition to the ones here, -ilslogin, -ilsoffline, and -ilsstandalone\r
- // are defined below.\r
-\r
- // With the exception of 'new', 'tab', and 'init', the value is checked for in urls in main.js.\r
-\r
- // NOTE: The option itself should be all lowercase (we .toLowerCase below)\r
- var options = {\r
- '-ilscheckin' : 'XUL_CHECKIN',\r
- '-ilscheckout' : 'XUL_PATRON_BARCODE_ENTRY',\r
- '-ilsnew' : 'new', // 'new' is a special keyword for opening a new window\r
- '-ilstab' : 'tab', // 'tab' is a special keyword for opening a new tab with the default content\r
- '-ilsnew_default' : 'init', // 'init' is a special keyword for opening a new window with an initial default tab\r
- };\r
-\r
- var inParams = new Array();\r
- var loginInfo = {};\r
- var loginInfoProvided = false;\r
- var position = 0;\r
- while (position < cmdLine.length) {\r
- var arg = cmdLine.getArgument(position).toLowerCase();\r
- if (options[arg] != undefined) {\r
- inParams.push(options[arg]);\r
- cmdLine.removeArguments(position,position);\r
- continue;\r
- }\r
- if (arg == '-ilsurl' && cmdLine.length > position) {\r
- inParams.push(cmdLine.getArgument(position + 1));\r
- cmdLine.removeArguments(position, position + 1);\r
- continue;\r
- }\r
- if (arg == '-ilshost' && cmdLine.length > position) {\r
- loginInfo.host = cmdLine.getArgument(position + 1);\r
- cmdLine.removeArguments(position, position + 1);\r
- loginInfoProvided = true;\r
- continue;\r
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]\r
+ .getService(Components.interfaces.nsIWindowMediator);\r
+ var targetWindow = wm.getMostRecentWindow(aWindowType);\r
+ if (targetWindow != null) {\r
+ var noFocus = false;\r
+ if(typeof targetWindow.new_tabs == 'function' && aArgument != null) {\r
+ targetWindow.new_tabs(aArgument);\r
+ noFocus = true;\r
}\r
- if (arg == '-ilsuser' && cmdLine.length > position) {\r
- loginInfo.user = cmdLine.getArgument(position + 1);\r
- cmdLine.removeArguments(position, position + 1);\r
- loginInfoProvided = true;\r
- continue;\r
+ if(typeof targetWindow.auto_login == 'function' && aLoginInfo != null) {\r
+ targetWindow.auto_login(aLoginInfo);\r
+ noFocus = true;\r
}\r
- if (arg == '-ilspassword' && cmdLine.length > position) {\r
- loginInfo.passwd = cmdLine.getArgument(position + 1);\r
- cmdLine.removeArguments(position, position + 1);\r
- loginInfoProvided = true;\r
- continue;\r
+ if(!noFocus) {\r
+ targetWindow.focus();\r
}\r
- position=position + 1;\r
- }\r
-\r
- if (cmdLine.handleFlag("ILSlogin", false) || inParams.length > 0 || loginInfoProvided) {\r
- findOrOpenWindow(WINDOW_MAIN, XUL_MAIN, '_blank', inParams, loginInfoProvided ? loginInfo : null);\r
- cmdLine.preventDefault = true;\r
- }\r
-\r
- if (cmdLine.handleFlag("ILSoffline", false) || cmdLine.handleFlag("ILSstandalone", false)) {\r
- findOrOpenWindow(WINDOW_STANDALONE, XUL_STANDALONE, 'Offline', null, null);\r
- cmdLine.preventDefault = true;\r
- }\r
- },\r
-\r
- // CHANGEME: change the help info as appropriate, but\r
- // follow the guidelines in nsICommandLineHandler.idl\r
- // specifically, flag descriptions should start at\r
- // character 24, and lines should be wrapped at\r
- // 72 characters with embedded newlines,\r
- // and finally, the string should end with a newline\r
- helpInfo : " -ILScheckin Open an Evergreen checkin tab\n" +\r
- " -ILScheckout Open an Evergreen checkout tab\n" +\r
- " -ILSnew Open a new Evergreen 'menu' window\n" +\r
- " -ILSnew_default Open a new Evergreen 'menu' window,\n" +\r
- " with a 'default' tab\n" +\r
- " -ILStab Open a 'default' tab alone\n" +\r
- " -ILSurl <url> Open the specified url in an Evergreen tab\n" +\r
- " -ILShost Default hostname for login\n" +\r
- " -ILSuser Default username for login\n" +\r
- " -ILSpassword Default password for login\n" +\r
- " The above three, if all specified, trigger an automatic login attempt\n" +\r
- " The above nine imply -ILSlogin\n" +\r
- " -ILSlogin Open the Evergreen Login window\n" +\r
- " -ILSstandalone Open the Evergreen Standalone interface\n" +\r
- " -ILSoffline Alias for -ILSstandalone\n",\r
-\r
- /* nsIFactory */\r
-\r
- createInstance : function clh_CI(outer, iid)\r
- {\r
- if (outer != null)\r
- throw Components.results.NS_ERROR_NO_AGGREGATION;\r
-\r
- return this.QueryInterface(iid);\r
- },\r
-\r
- lockFactory : function clh_lock(lock)\r
- {\r
- /* no-op */\r
- }\r
-};\r
-\r
-/**\r
- * The XPCOM glue that implements nsIModule\r
- */\r
-const myAppHandlerModule = {\r
- /* nsISupports */\r
- QueryInterface : function mod_QI(iid)\r
- {\r
- if (iid.equals(nsIModule) ||\r
- iid.equals(nsISupports))\r
- return this;\r
-\r
- throw Components.results.NS_ERROR_NO_INTERFACE;\r
- },\r
-\r
- /* nsIModule */\r
- getClassObject : function mod_gch(compMgr, cid, iid)\r
- {\r
- if (cid.equals(clh_CID))\r
- return myAppHandler.QueryInterface(iid);\r
-\r
- throw Components.results.NS_ERROR_NOT_REGISTERED;\r
- },\r
-\r
- registerSelf : function mod_regself(compMgr, fileSpec, location, type)\r
- {\r
- compMgr.QueryInterface(nsIComponentRegistrar);\r
-\r
- compMgr.registerFactoryLocation(clh_CID,\r
- "myAppHandler",\r
- clh_contractID,\r
- fileSpec,\r
- location,\r
- type);\r
-\r
- var catMan = Components.classes["@mozilla.org/categorymanager;1"].\r
- getService(nsICategoryManager);\r
- catMan.addCategoryEntry("command-line-handler",\r
- clh_category,\r
- clh_contractID, true, true);\r
- },\r
+ }\r
+ else {\r
+ var params = null;\r
+ if (aArgument != null && aArgument.length != 0 || aLoginInfo != null)\r
+ {\r
+ params = { "openTabs" : aArgument, "loginInfo" : aLoginInfo };\r
+ params.wrappedJSObject = params;\r
+ }\r
+ var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]\r
+ .getService(Components.interfaces.nsIWindowWatcher);\r
+ ww.openWindow(null, aChromeURISpec, aName, "chrome,resizable,dialog=no", params);\r
+ }\r
+}\r
\r
- unregisterSelf : function mod_unreg(compMgr, location, type)\r
- {\r
- compMgr.QueryInterface(nsIComponentRegistrar);\r
- compMgr.unregisterFactoryLocation(clh_CID, location);\r
+function oilsCommandLineHandler() {}\r
+oilsCommandLineHandler.prototype = {\r
+ classDescription: "OpenILS Command Line Handler",\r
+ classID: Components.ID("{7e608198-7355-483a-a85a-20322e4ef91a}"),\r
+ contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=egcli",\r
+ _xpcom_categories: [{\r
+ category: "command-line-handler",\r
+ entry: "m-egcli"\r
+ }],\r
+ QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsICommandLineHandler]),\r
+ handle : function clh_handle(cmdLine) {\r
+ // Each of these options is used for opening a new tab, either on login or remote send.\r
+ // XULRunner does some sanitize to turn /ilsblah into -ilsblah, for example.\r
+ // In addition to the ones here:\r
+ // -ilslogin, -ilsoffline, -ilsstandalone, -ilshost, -ilsuser, and -ilspassword\r
+ // are defined below.\r
+\r
+ // With the exception of 'new', 'tab', and 'init', the value is checked for in urls in main.js.\r
+\r
+ // NOTE: The option itself should be all lowercase (we .toLowerCase below)\r
+ var options = {\r
+ '-ilscheckin' : 'XUL_CHECKIN',\r
+ '-ilscheckout' : 'XUL_PATRON_BARCODE_ENTRY',\r
+ '-ilsnew' : 'new', // 'new' is a special keyword for opening a new window\r
+ '-ilstab' : 'tab', // 'tab' is a special keyword for opening a new tab with the default content\r
+ '-ilsnew_default' : 'init', // 'init' is a special keyword for opening a new window with an initial default tab\r
+ };\r
+\r
+ var inParams = new Array();\r
+ var loginInfo = {};\r
+ var loginInfoProvided = false;\r
+ var position = 0;\r
+ while (position < cmdLine.length) {\r
+ var arg = cmdLine.getArgument(position).toLowerCase();\r
+ if (options[arg] != undefined) {\r
+ inParams.push(options[arg]);\r
+ cmdLine.removeArguments(position,position);\r
+ continue;\r
+ }\r
+ if (arg == '-ilsurl' && cmdLine.length > position) {\r
+ inParams.push(cmdLine.getArgument(position + 1));\r
+ cmdLine.removeArguments(position, position + 1);\r
+ continue;\r
+ }\r
+ if (arg == '-ilshost' && cmdLine.length > position) {\r
+ loginInfo.host = cmdLine.getArgument(position + 1);\r
+ cmdLine.removeArguments(position, position + 1);\r
+ loginInfoProvided = true;\r
+ continue;\r
+ }\r
+ if (arg == '-ilsuser' && cmdLine.length > position) {\r
+ loginInfo.user = cmdLine.getArgument(position + 1);\r
+ cmdLine.removeArguments(position, position + 1);\r
+ loginInfoProvided = true;\r
+ continue;\r
+ }\r
+ if (arg == '-ilspassword' && cmdLine.length > position) {\r
+ loginInfo.passwd = cmdLine.getArgument(position + 1);\r
+ cmdLine.removeArguments(position, position + 1);\r
+ loginInfoProvided = true;\r
+ continue;\r
+ }\r
+ position=position + 1;\r
+ }\r
\r
- var catMan = Components.classes["@mozilla.org/categorymanager;1"].\r
- getService(nsICategoryManager);\r
- catMan.deleteCategoryEntry("command-line-handler", clh_category);\r
- },\r
+ if (cmdLine.handleFlag("ILSlogin", false) || inParams.length > 0 || loginInfoProvided) {\r
+ findOrOpenWindow(WINDOW_MAIN, XUL_MAIN, '_blank', inParams, loginInfoProvided ? loginInfo : null);\r
+ cmdLine.preventDefault = true;\r
+ }\r
\r
- canUnload : function (compMgr)\r
- {\r
- return true;\r
- }\r
+ if (cmdLine.handleFlag("ILSoffline", false) || cmdLine.handleFlag("ILSstandalone", false)) {\r
+ findOrOpenWindow(WINDOW_STANDALONE, XUL_STANDALONE, 'Offline', null, null);\r
+ cmdLine.preventDefault = true;\r
+ }\r
+ },\r
+\r
+ // Help Info:\r
+ // Flag descriptions start on char 24\r
+ // 72 char wrap on lines, embedded newlines\r
+ // End with a newline\r
+ helpInfo : " -ILScheckin Open an Evergreen checkin tab\n" +\r
+ " -ILScheckout Open an Evergreen checkout tab\n" +\r
+ " -ILSnew Open a new Evergreen 'menu' window\n" +\r
+ " -ILSnew_default Open a new Evergreen 'menu' window,\n" +\r
+ " with a 'default' tab\n" +\r
+ " -ILStab Open a 'default' tab alone\n" +\r
+ " -ILSurl <url> Open the specified url in an Evergreen tab\n" +\r
+ " -ILShost Default hostname for login\n" +\r
+ " -ILSuser Default username for login\n" +\r
+ " -ILSpassword Default password for login\n" +\r
+ " The above three, if all specified, trigger an automatic login attempt\n" +\r
+ " The above nine imply -ILSlogin\n" +\r
+ " -ILSlogin Open the Evergreen Login window\n" +\r
+ " -ILSstandalone Open the Evergreen Standalone interface\n" +\r
+ " -ILSoffline Alias for -ILSstandalone\n",\r
};\r
\r
-/* The NSGetModule function is the magic entry point that XPCOM uses to find what XPCOM objects\r
- * this component provides\r
- */\r
-function NSGetModule(comMgr, fileSpec)\r
-{\r
- return myAppHandlerModule;\r
-}\r
+if (XPCOMUtils.generateNSGetFactory)\r
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([oilsCommandLineHandler]);\r
+else\r
+ var NSGetModule = XPCOMUtils.generateNSGetModule([oilsCommandLineHandler]);\r
\r
-const nsISupports = Components.interfaces.nsISupports;
-const nsICategoryManager = Components.interfaces.nsICategoryManager;
-const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
-const nsIContentPolicy = Components.interfaces.nsIContentPolicy;
-const nsIFactory = Components.interfaces.nsIFactory;
-const nsIModule = Components.interfaces.nsIModule;
-const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
-
-const WINDOW_MAIN = "eg_main"
-
-const fe_contractID = "@mozilla.org/content-policy;1?type=egfe";
-const fe_CID = Components.ID("{D969ED61-DF4C-FA12-A2A6-70AA94C222FB}");
-// category names are sorted alphabetically. Typical command-line handlers use a
-// category that begins with the letter "m".
-const fe_category = "m-egfe";
-
-const myAppHandler = {
-
- shouldLoad: function(contentType, contentLocation, requestOrigin, node, mimeTypeGuess, extra)
- {
- if (contentType == nsIContentPolicy.TYPE_DOCUMENT) {
- var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
- getService(Components.interfaces.nsIWindowMediator);
- var targetWindow = wm.getMostRecentWindow("eg_main");
- if (targetWindow != null) {
- var host = targetWindow.G.data.server_unadorned;
- if(host && (contentLocation.scheme == 'http' || contentLocation.scheme == 'https') && contentLocation.host != host) {
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+
+// This content policy component tries to prevent outside sites from getting xulG hooks
+// It does so by forcing them to open outside of Evergreen
+
+function oilsForceExternal() {}
+oilsForceExternal.prototype = {
+ classDescription: "OpenILS Force External",
+ classID: Components.ID("{D969ED61-DF4C-FA12-A2A6-70AA94C222FB}"),
+ contractID: "@mozilla.org/content-policy;1?type=egfe",
+ _xpcom_categories: [{
+ category: "content-policy",
+ entry: "m-egfe"
+ }],
+ QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIContentPolicy]),
+ shouldLoad: function(contentType, contentLocation, requestOrigin, node, mimeTypeGuess, extra)
+ {
+ if ((contentType == Components.interfaces.nsIContentPolicy.TYPE_DOCUMENT || contentType == Components.interfaces.nsIContentPolicy.TYPE_SUBDOCUMENT)
+ && (contentLocation.scheme == 'http' || contentLocation.scheme == 'https')
+ && node && node.getAttribute('oils_force_external') == 'true') {
+ var data_cache = Components.classes["@open-ils.org/openils_data_cache;1"].getService().wrappedJSObject.data;
+ var host = data_cache.server_unadorned;
+ if(host && contentLocation.host != host) {
// first construct an nsIURI object using the ioservice
var ioservice = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var uriToOpen = ioservice.newURI(contentLocation.spec, null, null);
var extps = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
- .getService(Components.interfaces.nsIExternalProtocolService);
+ .getService(Components.interfaces.nsIExternalProtocolService);
// now, open it!
extps.loadURI(uriToOpen, null);
- return nsIContentPolicy.REJECT_REQUEST;
+ return Components.interfaces.nsIContentPolicy.REJECT_REQUEST;
}
- }
- }
- return nsIContentPolicy.ACCEPT;
- },
-
- shouldProcess: function(contentType, contentLocation, requestOrigin, insecNode, mimeType, extra)
- {
- return nsIContentPolicy.ACCEPT;
- },
-
- /* nsISupports */
- QueryInterface : function fe_QI(iid)
- {
- if (iid.equals(nsIContentPolicy) ||
- iid.equals(nsIFactory) ||
- iid.equals(nsISupports))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- /* nsIFactory */
-
- createInstance : function fe_CI(outer, iid)
- {
- if (outer != null)
- throw Components.results.NS_ERROR_NO_AGGREGATION;
-
- return this.QueryInterface(iid);
- },
-
- lockFactory : function fe_lock(lock)
- {
- /* no-op */
- }
-};
-
-/**
- * The XPCOM glue that implements nsIModule
- */
-const myAppHandlerModule = {
- /* nsISupports */
- QueryInterface : function mod_QI(iid)
- {
- if (iid.equals(nsIModule) ||
- iid.equals(nsISupports))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- /* nsIModule */
- getClassObject : function mod_gch(compMgr, cid, iid)
- {
- if (cid.equals(fe_CID))
- return myAppHandler.QueryInterface(iid);
-
- throw Components.results.NS_ERROR_NOT_REGISTERED;
- },
-
- registerSelf : function mod_regself(compMgr, fileSpec, location, type)
- {
- compMgr.QueryInterface(nsIComponentRegistrar);
-
- compMgr.registerFactoryLocation(fe_CID,
- "myAppHandler",
- fe_contractID,
- fileSpec,
- location,
- type);
-
- var catMan = Components.classes["@mozilla.org/categorymanager;1"].
- getService(nsICategoryManager);
- catMan.addCategoryEntry("content-policy",
- fe_category,
- fe_contractID, true, true);
- },
-
- unregisterSelf : function mod_unreg(compMgr, location, type)
- {
- compMgr.QueryInterface(nsIComponentRegistrar);
- compMgr.unregisterFactoryLocation(fe_CID, location);
-
- var catMan = Components.classes["@mozilla.org/categorymanager;1"].
- getService(nsICategoryManager);
- catMan.deleteCategoryEntry("content-policy", fe_category);
- },
-
- canUnload : function (compMgr)
- {
- return true;
- }
+ }
+ return Components.interfaces.nsIContentPolicy.ACCEPT;
+ },
+
+ shouldProcess: function(contentType, contentLocation, requestOrigin, insecNode, mimeType, extra)
+ {
+ return Components.interfaces.nsIContentPolicy.ACCEPT;
+ },
};
-/* The NSGetModule function is the magic entry point that XPCOM uses to find what XPCOM objects
- * this component provides
- */
-function NSGetModule(comMgr, fileSpec)
-{
- return myAppHandlerModule;
-}
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([oilsForceExternal]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([oilsForceExternal]);
+++ /dev/null
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is DOM Inspector.
- *
- * The Initial Developer of the Original Code is
- * Christopher A. Aillon <christopher@aillon.com>.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Christopher A. Aillon <christopher@aillon.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-// NOTE: this file implements both the seamonkey nsICmdLineHandler and
-// the toolkit nsICommandLineHandler, using runtime detection.
-
-const INSPECTOR_CMDLINE_CONTRACTID = "@mozilla.org/commandlinehandler/general-startup;1?type=inspector";
-const INSPECTOR_CMDLINE_CLSID = Components.ID('{38293526-6b13-4d4f-a075-71939435b408}');
-const CATMAN_CONTRACTID = "@mozilla.org/categorymanager;1";
-const nsISupports = Components.interfaces.nsISupports;
-
-const nsICategoryManager = Components.interfaces.nsICategoryManager;
-const nsICmdLineHandler = Components.interfaces.nsICmdLineHandler;
-const nsICommandLine = Components.interfaces.nsICommandLine;
-const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
-const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
-const nsISupportsString = Components.interfaces.nsISupportsString;
-const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
-
-function InspectorCmdLineHandler() {}
-InspectorCmdLineHandler.prototype =
-{
- /* nsISupports */
- QueryInterface : function handler_QI(iid) {
- if (iid.equals(nsISupports))
- return this;
-
- if (nsICmdLineHandler && iid.equals(nsICmdLineHandler))
- return this;
-
- if (nsICommandLineHandler && iid.equals(nsICommandLineHandler))
- return this;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- /* nsICmdLineHandler */
- commandLineArgument : "-inspector",
- prefNameForStartup : "general.startup.inspector",
- chromeUrlForTask : "chrome://inspector/content/inspector.xul",
- helpText : "Start with the DOM Inspector.",
- handlesArgs : true,
- defaultArgs : "",
- openWindowWithArgs : true,
-
- /* nsICommandLineHandler */
- handle : function handler_handle(cmdLine) {
- var args = Components.classes["@mozilla.org/supports-string;1"]
- .createInstance(nsISupportsString);
- try {
- var uristr = cmdLine.handleFlagWithParam("inspector", false);
- if (uristr == null)
- return;
- try {
- args.data = cmdLine.resolveURI(uristr).spec;
- }
- catch (e) {
- return;
- }
- }
- catch (e) {
- cmdLine.handleFlag("inspector", true);
- }
-
- var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
- .getService(nsIWindowWatcher);
- wwatch.openWindow(null, "chrome://inspector/content/", "_blank",
- "chrome,dialog=no,all", args);
- cmdLine.preventDefault = true;
- },
-
- helpInfo : " -inspector <url> Open the DOM inspector.\n"
-};
-
-
-var InspectorCmdLineFactory =
-{
- createInstance : function(outer, iid)
- {
- if (outer != null) {
- throw Components.results.NS_ERROR_NO_AGGREGATION;
- }
-
- return new InspectorCmdLineHandler().QueryInterface(iid);
- }
-};
-
-
-var InspectorCmdLineModule =
-{
- registerSelf : function(compMgr, fileSpec, location, type)
- {
- compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
-
- compMgr.registerFactoryLocation(INSPECTOR_CMDLINE_CLSID,
- "DOM Inspector CommandLine Service",
- INSPECTOR_CMDLINE_CONTRACTID,
- fileSpec,
- location,
- type);
-
- var catman = Components.classes[CATMAN_CONTRACTID].getService(nsICategoryManager);
- catman.addCategoryEntry("command-line-argument-handlers",
- "inspector command line handler",
- INSPECTOR_CMDLINE_CONTRACTID, true, true);
- catman.addCategoryEntry("command-line-handler",
- "m-inspector",
- INSPECTOR_CMDLINE_CONTRACTID, true, true);
- },
-
- unregisterSelf : function(compMgr, fileSpec, location)
- {
- compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
-
- compMgr.unregisterFactoryLocation(INSPECTOR_CMDLINE_CLSID, fileSpec);
- catman = Components.classes[CATMAN_CONTRACTID].getService(nsICategoryManager);
- catman.deleteCategoryEntry("command-line-argument-handlers",
- "inspector command line handler", true);
- catman.deleteCategoryEntry("command-line-handler",
- "m-inspector", true);
- },
-
- getClassObject : function(compMgr, cid, iid)
- {
- if (cid.equals(INSPECTOR_CMDLINE_CLSID)) {
- return InspectorCmdLineFactory;
- }
-
- if (!iid.equals(Components.interfaces.nsIFactory)) {
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
- }
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
- },
-
- canUnload : function(compMgr)
- {
- return true;
- }
-};
-
-
-function NSGetModule(compMgr, fileSpec) {
- return InspectorCmdLineModule;
-}
+++ /dev/null
-#include "nsISupports.idl"
-[scriptable, uuid(dc3e4b5f-c0f4-4b34-bc57-7b4099c3a5d6)]
-interface nsIOpenILS : nsISupports
-{
- void help( );
-};
-function OpenILS(){}
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-OpenILS.prototype = {
+// This entire component is a singleton that exists solely to store data.
- help: function () {
- dump("Ah ha! This xpcom isn't really 'xp'. We make use of the .wrappedJSObject method to get a truly global place to stick data.\n");
- },
-
- data: {},
-
- wrappedJSObject: this,
-
- QueryInterface: function (iid) {
- if (!iid.equals(Components.interfaces.nsIOpenILS)
- && !iid.equals(Components.interfaces.nsISupports))
- {
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
- return this;
- }
+function nsOpenILS() {
+ this.wrappedJSObject = this;
}
-var Module = {
- firstTime: true,
-
- registerSelf: function (compMgr, fileSpec, location, type) {
- if (this.firstTime) {
- dump("*** Deferring registration of OpenILS data cache\n");
- this.firstTime = false;
- throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN;
+nsOpenILS.prototype = {
+ classDescription: "OpenILS Data Cache",
+ classID: Components.ID("{dc3e4b5f-c0f4-4b34-bc57-7b4099c3a5d6}"),
+ contractID: "@open-ils.org/openils_data_cache;1",
+ QueryInterface: XPCOMUtils.generateQI(),
+ _xpcom_factory: {
+ singleton: null,
+ createInstance: function (aOuter, aIID) {
+ if (aOuter != null)
+ throw Components.results.NS_ERROR_NO_AGGREGATION;
+ if (this.singleton == null)
+ this.singleton = new nsOpenILS();
+ return this.singleton.QueryInterface(aIID);
+ },
+ getService: function (aIID) {
+ if (aOuter != null)
+ throw Components.results.NS_ERROR_NO_AGGREGATION;
+ if (this.singleton == null)
+ this.singleton = new nsOpenILS();
+ return this.singleton.QueryInterface(aIID);
}
- debug("*** Registering OpenILS data cache\n");
- compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
- compMgr.registerFactoryLocation(this.myCID,
- "OpenILS data cache",
- this.myProgID,
- fileSpec,
- location,
- type);
},
-
- getClassObject : function (compMgr, cid, iid) {
- if (!cid.equals(this.myCID))
- throw Components.results.NS_ERROR_NO_INTERFACE
- if (!iid.equals(Components.interfaces.nsIFactory))
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
- return this.myFactory;
- },
-
- myCID: Components.ID("{dc3e4b5f-c0f4-4b34-bc57-7b4099c3a5d6}"),
- myProgID: "@mozilla.org/openils_data_cache;1",
-
- myFactory: {
- createInstance: function (outer, iid) {
- //dump("CI: " + iid + "\n");
- if (outer != null)
- throw Components.results.NS_ERROR_NO_AGGREGATION;
- return (new OpenILS()).QueryInterface(iid);
+ data: {},
+ openMainEGWindow: function() {
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var targetWindow = wm.getMostRecentWindow("eg_main");
+ if (targetWindow != null) {
+ targetWindow.focus();
+ } else {
+ var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
+ .getService(Components.interfaces.nsIWindowWatcher);
+ ww.openWindow(null, "chrome://open_ils_staff_client/content/main/main.xul", "_blank", "chrome,resizable,dialog=no", null);
}
},
+};
- canUnload: function(compMgr) {
- dump("****** Unloading: OpenILS data cache! ****** \n");
- return true;
- }
-}; // END Module
-
-function NSGetModule(compMgr, fileSpec) { return Module; }
-
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([nsOpenILS]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([nsOpenILS]);
--- /dev/null
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+
+// This component is intended to handle remote XUL requests
+
+function oilsProtocol() {}
+
+oilsProtocol.prototype = {
+ _system_principal: null,
+ scheme: "oils",
+ protocolflags: Components.interfaces.nsIProtocolHandler.URI_DANGEROUS_TO_LOAD |
+ Components.interfaces.nsIProtocolHandler.URI_INHERITS_SECURITY_CONTEXT,
+ newURI: function(aSpec, aOriginCharset, aBaseURI) {
+ var new_url = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIStandardURL);
+ new_url.init(1, -1, aSpec, aOriginCharset, aBaseURI);
+ return new_url.QueryInterface(Components.interfaces.nsIURI);
+ },
+ newChannel: function(aURI) {
+ var ios = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
+ var host;
+ switch(aURI.spec.replace(/^oils:\/\/([^\/]*)\/.*$/,'$1')) {
+ case 'remote':
+ var data_cache = Components.classes["@open-ils.org/openils_data_cache;1"].getService().wrappedJSObject.data;
+ host = data_cache.server_unadorned;
+ break;
+ case 'selfcheck':
+ // To allow elevated permissions on a specific host for selfcheck purposes change this from null.
+ // This is intended for installing an extension on Firefox specifically for selfcheck purposes
+ // NOTE: I honestly don't know how dangerous this might be, but I can't imagine it is worse than the previous "grant the domain permissions to do anything" model.
+ host = null;
+ break;
+ default:
+ return null; // Bad input. Not really sure what to do.
+ break;
+ }
+ if(!host) return null; // Not really sure what to do when we don't have the data we need. Unless manual entry is happening, though, shouldn't be an issue.
+ var chunk = aURI.spec.replace(/^oils:\/\/[^\/]*\//,'');
+ var channel = ios.newChannel("https://" + host + "/" + chunk, null, null).QueryInterface(Components.interfaces.nsIHttpChannel);
+ channel.setRequestHeader("OILS-Wrapper", "true", false);
+ if(this._system_principal == null) {
+ // We don't have the owner?
+ var chrome_service = Components.classesByID['{61ba33c0-3031-11d3-8cd0-0060b0fc14a3}'].getService().QueryInterface(Components.interfaces.nsIProtocolHandler);
+ var chrome_uri = chrome_service.newURI("chrome://open_ils_staff_client/content/main/main.xul", null, null);
+ var chrome_channel = chrome_service.newChannel(chrome_uri);
+ this._system_principal = chrome_channel.owner;
+ var chrome_request = chrome_channel.QueryInterface(Components.interfaces.nsIRequest);
+ chrome_request.cancel(0x804b0002);
+ }
+ if (this._system_principal) channel.owner = this._system_principal;
+ return channel;
+ },
+ allowPort: function(aPort, aScheme) {
+ return false;
+ },
+ classDescription: "OILS Protocol Handler",
+ contractID: "@mozilla.org/network/protocol;1?name=oils",
+ classID: Components.ID('{51d35450-5e59-11e1-b86c-0800200c9a66}'),
+ QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIProtocolHandler]),
+}
+
+if (XPCOMUtils.generateNSGetFactory)
+ var NSGetFactory = XPCOMUtils.generateNSGetFactory([oilsProtocol]);
+else
+ var NSGetModule = XPCOMUtils.generateNSGetModule([oilsProtocol]);
+
+++ /dev/null
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is The JavaScript Debugger.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Robert Ginda, <rginda@netscape.com>, original author
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/* components defined in this file */
-const CLINE_SERVICE_CTRID =
- "@mozilla.org/commandlinehandler/general-startup;1?type=venkman";
-const CLINE_SERVICE_CID =
- Components.ID("{18269616-1dd2-11b2-afa8-b612439bda27}");
-const JSDPROT_HANDLER_CTRID =
- "@mozilla.org/network/protocol;1?name=x-jsd";
-const JSDPROT_HANDLER_CID =
- Components.ID("{12ec790d-304e-4525-89a9-3e723d489d14}");
-const JSDCNT_HANDLER_CTRID =
- "@mozilla.org/uriloader/content-handler;1?type=x-application-jsd";
-const JSDCNT_HANDLER_CID =
- Components.ID("{306670f0-47bb-466b-b53b-613235623bbd}");
-
-/* components used by this file */
-const CATMAN_CTRID = "@mozilla.org/categorymanager;1";
-const STRING_STREAM_CTRID = "@mozilla.org/io/string-input-stream;1";
-const MEDIATOR_CTRID =
- "@mozilla.org/appshell/window-mediator;1";
-const ASS_CONTRACTID =
- "@mozilla.org/appshell/appShellService;1";
-const SIMPLEURI_CTRID = "@mozilla.org/network/simple-uri;1";
-
-const nsIWindowMediator = Components.interfaces.nsIWindowMediator;
-const nsIAppShellService = Components.interfaces.nsIAppShellService;
-const nsICmdLineHandler = Components.interfaces.nsICmdLineHandler;
-const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
-const nsICategoryManager = Components.interfaces.nsICategoryManager;
-const nsIContentHandler = Components.interfaces.nsIContentHandler;
-const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
-const nsIURI = Components.interfaces.nsIURI;
-const nsIURL = Components.interfaces.nsIURL;
-const nsIStringInputStream = Components.interfaces.nsIStringInputStream;
-const nsIChannel = Components.interfaces.nsIChannel;
-const nsIRequest = Components.interfaces.nsIRequest;
-const nsIProgressEventSink = Components.interfaces.nsIProgressEventSink;
-const nsISupports = Components.interfaces.nsISupports;
-const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
-const nsICommandLine = Components.interfaces.nsICommandLine;
-
-function findDebuggerWindow ()
-{
- var windowManager =
- Components.classes[MEDIATOR_CTRID].getService(nsIWindowMediator);
- return windowManager.getMostRecentWindow("mozapp:venkman");
-}
-
-function openDebuggerWindow(args)
-{
- var ass = Components.classes[ASS_CONTRACTID].getService(nsIAppShellService);
- var window = ass.hiddenDOMWindow;
- window.openDialog("chrome://venkman/content/venkman.xul", "_blank",
- "chrome,menubar,toolbar,status,resizable,dialog=no",
- args);
-}
-
-function safeHTML(str)
-{
- function replaceChars(ch)
- {
- switch (ch)
- {
- case "<":
- return "<";
-
- case ">":
- return ">";
-
- case "&":
- return "&";
-
- case "'":
- return "'";
-
- case '"':
- return """;
- }
-
- return "?";
- };
-
- return String(str).replace(/[<>&"']/g, replaceChars);
-}
-
-/* Command Line handler service */
-function CLineService()
-{}
-
-/* nsISupports */
-CLineService.prototype.QueryInterface =
-function handler_QI(iid)
-{
- if (iid.equals(nsISupports) ||
- (nsICommandLineHandler && iid.equals(nsICommandLineHandler)) ||
- (nsICmdLineHandler && iid.equals(nsICmdLineHandler)))
- {
- return this;
- }
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
-}
-
-/* nsICmdLineHandler */
-CLineService.prototype.commandLineArgument = "-venkman";
-CLineService.prototype.prefNameForStartup = "general.startup.venkman";
-CLineService.prototype.chromeUrlForTask = "chrome://venkman/content";
-CLineService.prototype.helpText = "Start with JavaScript Debugger (Venkman).";
-CLineService.prototype.handlesArgs = false;
-CLineService.prototype.defaultArgs = "";
-CLineService.prototype.openWindowWithArgs = false;
-
-/* nsICommandLineHandler */
-
-CLineService.prototype.handle =
-function handler_handle(cmdLine)
-{
- try
- {
- if (cmdLine.handleFlag("venkman", false))
- openDebuggerWindow(null);
- }
- catch (e)
- {
- debug(e);
- }
-}
-
-CLineService.prototype.helpInfo =
- " -venkman Start with JavaScript debugger (Venkman).\n"
-
-/* factory for command line handler service (CLineService) */
-var CLineFactory = new Object();
-
-CLineFactory.createInstance =
-function clf_create (outer, iid) {
- if (outer != null)
- throw Components.results.NS_ERROR_NO_AGGREGATION;
-
- return new CLineService().QueryInterface(iid);
-}
-
-/* x-jsd: protocol handler */
-
-const JSD_DEFAULT_PORT = 2206; /* Dana's apartment number. */
-
-/* protocol handler factory object */
-var JSDProtocolHandlerFactory = new Object();
-
-JSDProtocolHandlerFactory.createInstance =
-function jsdhf_create (outer, iid) {
- if (outer != null)
- throw Components.results.NS_ERROR_NO_AGGREGATION;
-
- if (!iid.equals(nsIProtocolHandler) && !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_INVALID_ARG;
-
- return new JSDProtocolHandler();
-}
-
-function JSDURI (spec, charset)
-{
- this.spec = this.prePath = spec;
- this.charset = this.originCharset = charset;
-}
-
-JSDURI.prototype.QueryInterface =
-function jsdch_qi (iid)
-{
- if (!iid.equals(nsIURI) && !iid.equals(nsIURL) &&
- !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
-
- return this;
-}
-
-JSDURI.prototype.scheme = "x-jsd";
-
-JSDURI.prototype.fileBaseName =
-JSDURI.prototype.fileExtension =
-JSDURI.prototype.filePath =
-JSDURI.prototype.param =
-JSDURI.prototype.query =
-JSDURI.prototype.ref =
-JSDURI.prototype.directory =
-JSDURI.prototype.fileName =
-JSDURI.prototype.username =
-JSDURI.prototype.password =
-JSDURI.prototype.hostPort =
-JSDURI.prototype.path =
-JSDURI.prototype.asciiHost =
-JSDURI.prototype.userPass = "";
-
-JSDURI.prototype.port = JSD_DEFAULT_PORT;
-
-JSDURI.prototype.schemeIs =
-function jsduri_schemeis (scheme)
-{
- return scheme.toLowerCase() == "x-jsd";
-}
-
-JSDURI.prototype.getCommonBaseSpec =
-function jsduri_commonbase (uri)
-{
- return "x-jsd:";
-}
-
-JSDURI.prototype.getRelativeSpec =
-function jsduri_commonbase (uri)
-{
- return uri;
-}
-
-JSDURI.prototype.equals =
-function jsduri_equals (uri)
-{
- return uri.spec == this.spec;
-}
-
-JSDURI.prototype.clone =
-function jsduri_clone ()
-{
- return new JSDURI (this.spec);
-}
-
-JSDURI.prototype.resolve =
-function jsduri_resolve(path)
-{
- //dump ("resolve " + path + " from " + this.spec + "\n");
- if (path[0] == "#")
- return this.spec + path;
-
- return path;
-}
-
-function JSDProtocolHandler()
-{
- /* nothing here */
-}
-
-JSDProtocolHandler.prototype.scheme = "x-jsd";
-JSDProtocolHandler.prototype.defaultPort = JSD_DEFAULT_PORT;
-JSDProtocolHandler.prototype.protocolFlags = nsIProtocolHandler.URI_NORELATIVE |
- nsIProtocolHandler.URI_NOAUTH;
-if ("URI_DANGEROUS_TO_LOAD" in nsIProtocolHandler) {
- JSDProtocolHandler.prototype.protocolFlags |=
- nsIProtocolHandler.URI_DANGEROUS_TO_LOAD;
-}
-
-JSDProtocolHandler.prototype.allowPort =
-function jsdph_allowport (aPort, aScheme)
-{
- return false;
-}
-
-JSDProtocolHandler.prototype.newURI =
-function jsdph_newuri (spec, charset, baseURI)
-{
- var clazz = Components.classes[SIMPLEURI_CTRID];
- var uri = clazz.createInstance(nsIURI);
- uri.spec = spec;
- return uri;
-}
-
-JSDProtocolHandler.prototype.newChannel =
-function jsdph_newchannel (uri)
-{
- return new JSDChannel (uri);
-}
-
-function JSDChannel (uri)
-{
- this.URI = uri;
- this.originalURI = uri;
- this._isPending = false;
- var clazz = Components.classes[STRING_STREAM_CTRID];
- this.stringStream = clazz.createInstance(nsIStringInputStream);
-}
-
-JSDChannel.prototype.QueryInterface =
-function jsdch_qi (iid)
-{
-
- if (!iid.equals(nsIChannel) && !iid.equals(nsIRequest) &&
- !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
-
- return this;
-}
-
-/* nsIChannel */
-JSDChannel.prototype.loadAttributes = null;
-JSDChannel.prototype.contentType = "text/html";
-JSDChannel.prototype.contentLength = -1;
-JSDChannel.prototype.owner = null;
-JSDChannel.prototype.loadGroup = null;
-JSDChannel.prototype.notificationCallbacks = null;
-JSDChannel.prototype.securityInfo = null;
-
-JSDChannel.prototype.open =
-function jsdch_open()
-{
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
-}
-
-JSDChannel.prototype.asyncOpen =
-function jsdch_aopen (streamListener, context)
-{
- this.streamListener = streamListener;
- this.context = context;
- this._isPending = true;
-
- if (!window && this.URI.spec == "x-jsd:debugger")
- {
- this.contentType = "x-application-jsd";
- this.contentLength = 0;
- streamListener.onStartRequest(this, context);
- return;
- }
-
- var window = findDebuggerWindow();
- var ary = this.URI.spec.match (/x-jsd:([^:]+)/);
- var exception;
-
- if (this.loadGroup)
- this.loadGroup.addRequest (this, null);
-
- if (window && "console" in window && ary)
- {
- try
- {
- window.asyncOpenJSDURL (this, streamListener, context);
- return;
- }
- catch (ex)
- {
- exception = ex;
- }
- }
-
- var str =
- "<html><head><title>Error</title></head><body>Could not load <<b>" +
- safeHTML(this.URI.spec) + "</b>><br>";
-
- if (!ary)
- {
- str += "<b>Error parsing uri.</b>";
- }
- else if (exception)
- {
- str += "<b>Internal error: " + safeHTML(exception) + "</b><br><pre>" +
- safeHTML(exception.stack);
- }
- else
- {
- str += "<b>Debugger is not running.</b>";
- }
-
- str += "</body></html>";
-
- this.respond (str);
-}
-
-JSDChannel.prototype.respond =
-function jsdch_respond (str)
-{
- this.streamListener.onStartRequest (this, this.context);
-
- var len = str.length;
- this.stringStream.setData (str, len);
- this.streamListener.onDataAvailable (this, this.context,
- this.stringStream, 0, len);
- this.streamListener.onStopRequest (this, this.context,
- Components.results.NS_OK);
- if (this.loadGroup)
- this.loadGroup.removeRequest (this, null, Components.results.NS_OK);
- this._isPending = false;
-}
-
-/* nsIRequest */
-JSDChannel.prototype.isPending =
-function jsdch_ispending ()
-{
- return this._isPending;
-}
-
-JSDChannel.prototype.status = Components.results.NS_OK;
-
-JSDChannel.prototype.cancel =
-function jsdch_cancel (status)
-{
- if (this._isPending)
- {
- this._isPending = false;
- this.streamListener.onStopRequest (this, this.context, status);
- if (this.loadGroup)
- {
- try
- {
- this.loadGroup.removeRequest (this, null, status);
- }
- catch (ex)
- {
- debug ("we're not in the load group?\n");
- }
- }
- }
-
- this.status = status;
-}
-
-JSDChannel.prototype.suspend =
-JSDChannel.prototype.resume =
-function jsdch_notimpl ()
-{
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
-}
-
-/*****************************************************************************/
-
-/* x-application-jsd content handler */
-function JSDContentHandler ()
-{}
-
-JSDContentHandler.prototype.QueryInterface =
-function jsdh_qi(iid)
-{
- if (!iid.equals(nsIContentHandler) && !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_NO_INTERFACE;
-
- return this;
-}
-
-JSDContentHandler.prototype.handleContent =
-function jsdh_handle(contentType, windowTarget, request)
-{
- var e;
- var channel = request.QueryInterface(nsIChannel);
-
- // prevent someone from invoking the debugger remotely by serving
- // up any old file with the x-application-jsd content type.
- if (channel.URI.spec != "x-jsd:debugger")
- {
- debug ("Not handling content from unknown location ``" +
- channel.URI.spec + "''");
- return;
- }
-
- var window = findDebuggerWindow()
-
- if (window)
- {
- window.focus();
- }
- else
- {
- var ass =
- Components.classes[ASS_CONTRACTID].getService(nsIAppShellService);
- window = ass.hiddenDOMWindow;
-
- var args = new Object();
- args.url = channel.URI.spec;
-
- openDebuggerWindow(args);
- }
-}
-
-/*****************************************************************************/
-
-/* content handler factory object (IRCContentHandler) */
-var JSDContentHandlerFactory = new Object();
-
-JSDContentHandlerFactory.createInstance =
-function jsdhf_create(outer, iid)
-{
- if (outer != null)
- throw Components.results.NS_ERROR_NO_AGGREGATION;
-
- if (!iid.equals(nsIContentHandler) && !iid.equals(nsISupports))
- throw Components.results.NS_ERROR_INVALID_ARG;
-
- return new JSDContentHandler();
-}
-
-/*****************************************************************************/
-
-var Module = new Object();
-
-Module.registerSelf =
-function (compMgr, fileSpec, location, type)
-{
- debug("*** Registering -venkman handler.\n");
-
- compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
-
- compMgr.registerFactoryLocation(CLINE_SERVICE_CID,
- "Venkman CommandLine Service",
- CLINE_SERVICE_CTRID,
- fileSpec,
- location,
- type);
-
- catman = Components.classes[CATMAN_CTRID].getService(nsICategoryManager);
- catman.addCategoryEntry("command-line-argument-handlers",
- "venkman command line handler",
- CLINE_SERVICE_CTRID, true, true);
-
- catman.addCategoryEntry("command-line-handler",
- "venkman command line handler",
- CLINE_SERVICE_CTRID, true, true);
-
- debug("*** Registering x-jsd protocol handler.\n");
- compMgr.registerFactoryLocation(JSDPROT_HANDLER_CID,
- "x-jsd protocol handler",
- JSDPROT_HANDLER_CTRID,
- fileSpec,
- location,
- type);
-
- debug("*** Registering x-application-jsd content handler.\n");
- compMgr.registerFactoryLocation(JSDCNT_HANDLER_CID,
- "x-application-jsd content handler",
- JSDCNT_HANDLER_CTRID,
- fileSpec,
- location,
- type);
- try
- {
- const JSD_CTRID = "@mozilla.org/js/jsd/debugger-service;1";
- const jsdIDebuggerService = Components.interfaces.jsdIDebuggerService;
- var jsds = Components.classes[JSD_CTRID].getService(jsdIDebuggerService);
- jsds.initAtStartup = true;
- }
- catch (ex)
- {
- debug ("*** ERROR initializing debugger service");
- debug (ex);
- }
-}
-
-Module.unregisterSelf =
-function(compMgr, fileSpec, location)
-{
- compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
-
- compMgr.unregisterFactoryLocation(CLINE_SERVICE_CID, fileSpec);
- catman = Components.classes[CATMAN_CTRID].getService(nsICategoryManager);
- catman.deleteCategoryEntry("command-line-argument-handlers",
- CLINE_SERVICE_CTRID, true);
- catman.deleteCategoryEntry("command-line-handler",
- CLINE_SERVICE_CTRID, true);
-}
-
-Module.getClassObject =
-function (compMgr, cid, iid) {
- if (cid.equals(CLINE_SERVICE_CID))
- return CLineFactory;
-
- if (cid.equals(JSDPROT_HANDLER_CID))
- return JSDProtocolHandlerFactory;
-
- if (cid.equals(JSDCNT_HANDLER_CID))
- return JSDContentHandlerFactory;
-
- if (!iid.equals(Components.interfaces.nsIFactory))
- throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
-
- throw Components.results.NS_ERROR_NO_INTERFACE;
-
-}
-
-Module.canUnload =
-function(compMgr)
-{
- return true;
-}
-
-/* entrypoint */
-function NSGetModule(compMgr, fileSpec) {
- return Module;
-}
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
if (typeof example == 'undefined') example = {};
example.template = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
} catch(E) {
dump('example.template: ' + E + '\n');
'init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
var obj = this;
JSAN.use('util.controller'); obj.controller = new util.controller();
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<command id="cmd_broken" />
</commandset>
- <browser id="template_browser" flex="1"/>
+ <browser id="template_browser" flex="1" oils_force_external="true"/>
</window>
<Description about="urn:mozilla:install-manifest">
<em:id>staff-client@open-ils.org</em:id>
- <em:version>1.6</em:version>
+ <em:version>2.2</em:version>
<em:type>2</em:type>
<!-- Target Application this extension can install into,
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.5</em:minVersion>
- <em:maxVersion>3.6.*</em:maxVersion>
+ <em:maxVersion>14.*</em:maxVersion>
</Description>
</em:targetApplication>
if(session == null ) {
cgi = new CGI();
session = cgi.param('ses');
+ if(!session && (location.protocol == 'chrome:' || location.protocol == 'oils:')) {
+ try {
+ var CacheClass = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
+ session = CacheClass.wrappedJSObject.data.session.key;
+ } catch(e) {
+ console.log("Error loading XUL stash: " + e);
+ }
+ }
}
if(!session) throw "User session is not defined";
SESSION = session;
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function clEditorInit() {
cgi = new CGI();
session = cgi.param('ses');
+ if(!session && (location.protocol == 'chrome:' || location.protocol == 'oils:')) {
+ try {
+ var CacheClass = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
+ session = CacheClass.wrappedJSObject.data.session.key;
+ } catch(e) {
+ console.log("Error loading XUL stash: " + e);
+ }
+ }
if(!session) throw "User session is not defined!";
fetchUser(session);
$('user').appendChild(text(USER.usrname()));
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
function save() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('global_font_adjust');
file.set_object(g.data.global_font_adjust);
file.close();
function save_sound() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('no_sound');
file.write_content( 'truncate', String( document.getElementById('sound').checked ) );
file.close();
var listOffset = 0;
function pullListInit() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
</div>
</td><td>
<div style='padding: 8px;'>
- <a href='javascript:window.xulG.new_tab(window.xulG.url_prefix("/opac/extras/circ/alt_holds_print.html").replace("http","https") + "?do=shelf_expired_holds&chunk_size=25",{"tab_name":"&staff.server.admin.index.expired_holds_shelf;"},{});'>&staff.server.admin.index.expired_holds_shelf;</a>
+ <a href='javascript:window.xulG.new_tab(window.xulG.url_prefix("ALT_HOLDS_PRINT").replace("http","https") + "?do=shelf_expired_holds&chunk_size=25",{"tab_name":"&staff.server.admin.index.expired_holds_shelf;"},{});'>&staff.server.admin.index.expired_holds_shelf;</a>
</div>
<div style='padding: 8px;'>
<a href='javascript:window.xulG.new_tab("/xul/server/patron/holds.xul",{"tab_name":"&staff.server.admin.index.hold_pull_list;"},{});'>&staff.server.admin.index.hold_pull_list;</a> <span style="color: red">&staff.server.admin.index.testing;</span>
for (var i = 0; i < obj.sel_list.length; i++) {
- var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI)
- + "?ses=" + window.escape(ses())
+ var url = xulG.url_prefix('XUL_OFFLINE_MANAGE_XACTS_CGI?ses=')
+ + window.escape(ses())
+ "&action=execute"
+ "&seskey=" + window.escape(obj.seslist[obj.sel_list[i]].key)
+ "&ws=" + window.escape(obj.data.ws_name);
clear_the_cache();
obj.data.stash_retrieve();
- var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI)
- + "?ses=" + window.escape(ses())
+ var url = xulG.url_prefix('XUL_OFFLINE_MANAGE_XACTS_CGI?ses=')
+ + window.escape(ses())
+ "&action=status"
+ "&seskey=" + window.escape(obj.seslist[ obj.sel_list[0] ].key)
+ "&ws=" + window.escape(obj.data.ws_name)
},
'rename_file' : function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
try {
},
'revert_file' : function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
try {
},
'archive_file' : function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
try {
},
'upload' : function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
try {
var x = document.createElement('iframe'); xx.appendChild(x); x.flex = 1;
x.setAttribute(
'src',
- window.xulG.url_prefix( urls.XUL_REMOTE_BROWSER )
+ window.xulG.url_prefix('XUL_REMOTE_BROWSER')
/*
+ '?url=' + window.escape(
urls.XUL_OFFLINE_UPLOAD_XACTS
'filename' : obj.transition_filename,
'url_prefix' : window.xulG.url_prefix,
'handle_event' : function(robj){
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
try {
dump('robj = ' + js2JSON(robj) + '\n');
if ( robj.ilsevent != 0 ) {
clear_the_cache();
obj.data.stash_retrieve();
- var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI)
- + "?ses=" + window.escape(ses())
+ var url = xulG.url_prefix('XUL_OFFLINE_MANAGE_XACTS_CGI?ses=')
+ + window.escape(ses())
+ "&action=status"
+ "&seskey=" + window.escape(obj.seslist[obj.sel_list[0]].key)
+ "&ws=" + window.escape(obj.data.ws_name)
clear_the_cache();
obj.data.stash_retrieve();
- var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI)
- + "?ses=" + window.escape(ses())
+ var url = xulG.url_prefix('XUL_OFFLINE_MANAGE_XACTS_CGI?ses=')
+ + window.escape(ses())
+ "&action=create"
+ "&desc=" + window.escape(desc)
+ "&ws=" + window.escape(obj.data.ws_name);
clear_the_cache();
obj.data.stash_retrieve();
- var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI)
- + "?ses=" + window.escape(ses())
+ var url = xulG.url_prefix('XUL_OFFLINE_MANAGE_XACTS_CGI?ses=')
+ + window.escape(ses())
+ "&action=status"
+ "&org=" + window.escape(obj.data.list.au[0].ws_ou())
+ "&status_type=sessions";
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
dojo.require('openils.widget.AutoFieldWidget');
dojo.require('openils.widget.ProgressDialog');
dojo.require('dijit.Toolbar');
+dojo.require('openils.XUL');
var authtoken;
var query;
showProcessingDialog(true);
authtoken = new openils.CGI().param('ses') || dojo.cookie('ses');
+ if(!authtoken && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ authtoken = stash.session.key;
+ }
query = new openils.CGI().param('filter');
user = new openils.User({authtoken:authtoken});
contextOrg = user.user.ws_ou();
function patrons_due_refunds_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
if (typeof JSAN == 'undefined') {
throw(
$('commonStrings').getString('common.jsan.missing')
</groupbox>
<popupset id="au_popupset">
- <popup id="au_actions" position="at_pointer">
+ <menupopup id="au_actions" position="at_pointer">
<menuitem command="retrieve_patron" />
- </popup>
+ </menupopup>
</popupset>
</window>
<input type="radio" name="context" value="offline" onclick="g.set_printer_context('offline');">&staff.printing.context.radio.offline.label;</input>
</form>
<h1>&staff.printing.normal_settings.header;</h1>
- <iframe id="sample" src="printer_settings.txt"></iframe><br />
+ <iframe id="sample" src="printer_settings.txt" oils_force_external="true"></iframe><br />
<button onclick="try { g.printer_settings(); } catch(E) { alert(E); }">&staff.printing.set_default;</button>
<button onclick="try { g.page_settings(); } catch(E) { alert(E); }">&staff.printing.page_settings;</button><br />
<h1>&staff.printing.advanced_settings.header;</h1>
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
x.checked = print_silent_pref;
/*
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
g.PSSVC = Components.classes["@mozilla.org/gfx/printsettings-service;1"].getService(Components.interfaces.nsIPrintSettingsService);
g.PO = Components.classes["@mozilla.org/gfx/printsettings-service;1"].getService(Components.interfaces.nsIPrintOptions);
g.PPSVC = Components.classes["@mozilla.org/embedcomp/printingprompt-service;1"].getService(Components.interfaces.nsIPrintingPromptService);
g.toggle_silent_print = function() {
var x = document.getElementById('print_silent');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (x.checked) {
g.prefs.setBoolPref('print.always_print_silent', true);
dump('Setting print.always_print_silent to true\n');
}
g.page_settings = function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
g.print.page_settings();
g.print.save_settings();
}
g.printer_settings = function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var print_silent_pref = false;
if (g.prefs.prefHasUserValue('print.always_print_silent')) {
print_silent_pref = g.prefs.getBoolPref('print.always_print_silent');
}
g.set_print_strategy = function(which) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
if (which == 'custom.print') {
var key = 'oils.printer.external.cmd.' + g.context;
var has_key = g.prefs.prefHasUserValue(key);
function scEditorInit() {
cgi = new CGI();
session = cgi.param('ses');
+ if(!session && (location.protocol == 'chrome:' || location.protocol == 'oils:')) {
+ try {
+ var CacheClass = Components.classes["@open-ils.org/openils_data_cache;1"].getService();
+ session = CacheClass.wrappedJSObject.data.session.key;
+ } catch(e) {
+ console.log("Error loading XUL stash: " + e);
+ }
+ }
if(!session) throw "User session is not defined";
user = fetchUser(session);
$('sc_type_selector').onchange = scBuildNew;
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
</vbox>
<popupset id="transit_list_popupset">
- <popup id="transit_list_actions" position="at_pointer">
+ <menupopup id="transit_list_actions" position="at_pointer">
<menuitem command="sel_clip" label="&staff.server.admin.transit.list.copy.label;" accesskey="&staff.server.admin.transit.list.copy.accesskey;" />
<menuitem command="sel_bucket" label="&staff.server.admin.transit.list.add.label;" accesskey="&staff.server.admin.transit.list.add.accesskey;"/>
<menuitem command="sel_opac" label="&staff.server.admin.transit.list.show.label;" accesskey="&staff.server.admin.transit.list.show.accesskey;" />
<menuitem command="sel_transit_abort" label="&staff.server.admin.transit.list.abort.label;" />
<menuseparator />
<menuitem command="save_columns" label="&staff.server.admin.transit.list.save.label;"/>
- </popup>
+ </menupopup>
</popupset>
<commandset id="transit_list_cmds">
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalFileRead");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('..');
$( 'seskey' ).setAttribute('value', xul_param('seskey'));
$( 'delta' ).setAttribute('value', xul_param('delta'));
- $( 'form' ).setAttribute('action', xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI));
+ $( 'form' ).setAttribute('action', xulG.url_prefix('XUL_OFFLINE_MANAGE_XACTS_CGI'));
setTimeout(
function() {
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
</vbox>
<popupset>
- <popup id="work_log_actions">
+ <menupopup id="work_log_actions">
<menuitem label="&staff.admin.work_log.list1.retrieve_item_btn.label;" accesskey="&staff.admin.work_log.list1.retrieve_item_btn.accesskey;" command="cmd_retrieve_item" />
<menuitem label="&staff.admin.work_log.list1.retrieve_patron_btn.label;" accesskey="&staff.admin.work_log.list1.retrieve_patron_btn.accesskey;" command="cmd_retrieve_patron1" />
- </popup>
- <popup id="patron_actions">
+ </menupopup>
+ <menupopup id="patron_actions">
<menuitem label="&staff.admin.work_log.list2.retrieve_patron_btn.label;" accesskey="&staff.admin.work_log.list2.retrieve_patron_btn.accesskey;" command="cmd_retrieve_patron2" />
- </popup>
+ </menupopup>
</popupset>
<commandset>
if (docid < 0) {
alert(document.getElementById("catStrings").getString('staff.cat.bib_brief.noncat.alert'));
} else {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
//win.open( urls.XUL_MARC_VIEW + '?noprint=1&docid=' + docid, 'marc_view', 'chrome,resizable,modal,width=400,height=400');
win.open( urls.XUL_MARC_VIEW, 'marc_view', 'chrome,resizable,modal,width=400,height=400',{'noprint':1,'docid':docid});
}
var unified_interface = String( g.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( g.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ url = window.xulG.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
} else {
- url = window.xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+ url = window.xulG.url_prefix('XUL_VOLUME_COPY_CREATOR_ORIGINAL');
}
var w = xulG.new_tab(
url,
}
function ui_init() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw(
document.getElementById("commonStrings").getString(
}
function dynamic_grid_replacement(mode) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes[
'@mozilla.org/preferences-service;1'
].getService(
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
if (typeof xulG.on_merge == 'function') {
xulG.on_merge(robj);
}
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + lead_record;
+ var opac_url = xulG.url_prefix('opac_rdetail') + lead_record;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'opac_url' : opac_url,
};
xulG.set_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name':'Retrieving title...'},
content_params
);
<input name="lead_button" type="radio" xmlns="http://www.w3.org/1999/xhtml"></input>
&staff.cat.record_buckets.merge_records.lead;
</hbox>
- <iframe name="bib_brief" flex="1" />
+ <iframe name="bib_brief" flex="1" oils_force_external="true" />
<hbox>
<radiogroup flex="0" orient="horizontal">
<radio name="view_bib" label="View Bib" />
if (typeof cat == 'undefined') cat = {};
cat.copy_browser = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
} catch(E) {
dump('cat.copy_browser: ' + E + '\n');
'init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
obj.docid = params.docid;
var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- url = xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ url = xulG.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
} else {
- url = xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+ url = xulG.url_prefix('XUL_VOLUME_COPY_CREATOR_ORIGINAL');
}
var w = xulG.new_tab(
);
xulG.new_tab(
- xulG.url_prefix( urls.XUL_SPINE_LABEL ),
+ xulG.url_prefix('XUL_SPINE_LABEL'),
{ 'tab_name' : document.getElementById('catStrings').getString('staff.cat.copy_browser.print_spine.tab') },
{
'barcodes' : util.functional.map_list( list, function(o){return o.barcode();})
var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- url = xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ url = xulG.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
} else {
- url = xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+ url = xulG.url_prefix('XUL_VOLUME_COPY_CREATOR_ORIGINAL');
}
var w = xulG.new_tab(
}
);
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
-
var acn_list = util.functional.map_list(
list,
function (o) {
+ '" accesskey="'
+ document.getElementById('catStrings').getString('staff.cat.copy_browser.transfer.cancel.accesskey')
+ '" name="fancy_cancel"/></hbox>';
- xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + obj.data.marked_library.docid + '"/>';
+ xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + obj.data.marked_library.docid + '" oils_force_external="true"/>';
xml += '</vbox>';
JSAN.use('OpenILS.data');
var data = new OpenILS.data(); data.init({'via':'stash'});
);
xulG.new_tab(
- window.xulG.url_prefix(urls.MANAGE_MULTI_HOME_ITEMS),
+ window.xulG.url_prefix('MANAGE_MULTI_HOME_ITEMS'),
{},
{ 'docid' : obj.data.marked_multi_home_record, 'barcodes' : list }
);
'append_org' : function (org,parent_org,params) {
var obj = this;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.error.consoleService.logStringMessage('append_org: org = ' + org.shortname() + ' parent_org = ' + (parent_org ? parent_org.shortname() : '') + ' params = ' + js2JSON(params) + '\n');
try {
if (obj.map_tree[ 'aou_' + org.id() ]) {
'list_init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
JSAN.use('circ.util');
return row;
},
'on_click' : function(ev) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserRead');
var row = {}; var col = {}; var nobj = {};
obj.list.node.treeBoxObject.getCellAt(ev.clientX,ev.clientY,row,col,nobj);
if ((row.value == -1)||(nobj.value != 'twisty')) { return; }
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
</commandset>
<popupset>
- <popup id="copy_browser_actions">
+ <menupopup id="copy_browser_actions">
<menuitem command="sel_clip" label="&staff.cat.copy_browser.actions.sel_clip.label;" accesskey="&staff.cat.copy_browser.actions.sel_clip.accesskey;"/>
<menuitem command="cmd_add_items_to_buckets" label="&staff.cat.copy_browser.actions.cmd_add_items_to_buckets.label;" accesskey="&staff.cat.copy_browser.actions.cmd_add_items_to_buckets.accesskey;"/>
<menuitem command="sel_copy_details" label="&staff.cat.copy_browser.actions.sel_copy_details.label;" accesskey="&staff.cat.copy_browser.actions.sel_copy_details.label;" />
<menuitem command="cmd_replace_barcode" label="&staff.cat.copy_browser.holdings_maintenance.cmd_replace_barcode.label;" accesskey="&staff.cat.copy_browser.holdings_maintenance.cmd_replace_barcode.accesskey;"/>
<menuitem command="save_columns" label="&staff.cat.copy_browser.actions.save_columns.label;"/>
<menuitem command="cmd_refresh_list" label="&staff.cat.copy_browser.actions.cmd_refresh_list.label;" accesskey="&staff.cat.copy_browser.actions.cmd_refresh_list.accesskey;"/>
- </popup>
+ </menupopup>
</popupset>
<groupbox flex="1" class="my_overflow">
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
/******************************************************************************************************/
/* setup JSAN and some initial libraries */
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( $('commonStrings').getString('common.jsan.missing') );
}
g.export_templates = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.file'); var f = new util.file('');
f.export_file( { 'title' : $('catStrings').getString('staff.cat.copy_editor.export_templates.title'), 'data' : g.templates } );
} catch(E) {
g.import_templates = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.file'); var f = new util.file('');
var temp = f.import_file( { 'title' : $('catStrings').getString('staff.cat.copy_editor.import_templates.title') } );
if (temp) {
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( $("commonStrings").getString('common.jsan.missing') );
}
function new_note() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
var xml = '<groupbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1"> \
<caption label="' + $('catStrings').getString('staff.cat.copy_notes.new_note.label') + '"/> \
<grid flex="1"><columns><column/><column flex="1"/></columns> \
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( $("commonStrings").getString('common.jsan.missing') );
}
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
commonStrings = $('commonStrings');
catStrings = $('catStrings');
</commandset>
<popupset>
- <popup id="actions">
+ <menupopup id="actions">
<menuitem command="opac" />
<menuitem command="change" />
<menuitem command="remove" />
- </popup>
+ </menupopup>
</popupset>
<groupbox id="bib_brief_groupbox" hidden="true">
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
/* load translatable strings for cataloging interfaces */
catStrings = document.getElementById('catStrings');
/* Replace tab with OPAC-view of record */
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + robj.id();
+ var opac_url = xulG.url_prefix('opac_rdetail') + robj.id();
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'on_complete' : function() {
try {
xulG.set_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name': catStrings.getString('staff.cat.marc_new.retrieving.label')},
content_params
);
$('marc_editor_box').appendChild(marc_editor);
marc_editor.setAttribute('flex','1');
marc_editor.setAttribute('src',url);
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
get_contentWindow(marc_editor).xulG = params;
/* hide template widgets */
function(ev) {
var template_name;
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
template_name = $('menu_placeholder').firstChild.value;
g.prefs.setCharPref(default_template_key, template_name);
alert(catStrings.getFormattedString('staff.cat.marc_new.set_default.success', [template_name]));
function xsl_marc2html_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
xsltProcessor = new XSLTProcessor();
var req = new XMLHttpRequest();
req.open("GET", urls.xsl_marc2html, false);
function apply_xsl_marc2html(marc) {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var obj = this;
var parser = new DOMParser();
var doc = parser.parseFromString( marc, 'text/xml' );
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById('commonStrings').getString('common.jsan.missing') );
}
function(req) {
var marc_html = req.getResultObject();
if (noprint||typeof xulG == 'undefined') marc_html = marc_html.replace(/<button.+?button>/, '');
- document.getElementById('marc_frame').setAttribute('src', 'data:text/html,' + marc_html);
+ document.getElementById('marc_frame').setAttribute('src', 'data:text/html,' + encodeURIComponent(marc_html));
}
);
} else {
<groupbox flex="1">
<caption label="&staff.cat.marc_view.title;"/>
- <iframe id="marc_frame" flex="1"/>
+ <iframe id="marc_frame" flex="1" oils_force_external="true"/>
</groupbox>
</window>
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
var locale = "en-US";
// Try to get the locale from our preferences
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
try {
const Cc = Components.classes;
const Ci = Components.interfaces;
function createMARCTextbox (element,attrs) {
var box = createComplexXULElement('textbox', attrs, Array.prototype.slice.apply(arguments, [2]) );
- box.addEventListener('keypress',function(ev) { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); if (!(ev.altKey || ev.ctrlKey || ev.metaKey)) { oils_lock_page(); } },false);
+ box.addEventListener('keypress',function(ev) { if (!(ev.altKey || ev.ctrlKey || ev.metaKey)) { oils_lock_page(); } },false);
box.onkeypress = function (event) {
var root_node;
var node = element;
To run in Firefox directly, must set signed.applets.codebase_principal_support
to true in about:config
*/
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
// Match marc2are.pl last_xact_id format, roughly
</hbox>
<hbox id="fastItemAdd_textboxes">
<label control="fastItemAdd_callnumber" accesskey="&staff.cat.marcedit.fastItemAdd_callnumber.accesskey;" value="&staff.cat.marcedit.fastItemAdd_callnumber.label;" />
- <textbox onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" context="clipboard" id="fastItemAdd_callnumber" />
+ <textbox onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" context="clipboard" id="fastItemAdd_callnumber" />
<label control="fastItemAdd_barcode" accesskey="&staff.cat.marcedit.fastItemAdd_barcode.accesskey;" value="&staff.cat.marcedit.fastItemAdd_barcode.label;" />
- <textbox onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" context="clipboard" id="fastItemAdd_barcode"/>
+ <textbox onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" context="clipboard" id="fastItemAdd_barcode"/>
</hbox>
</groupbox>
<rows>
<row>
<label name="Type" control="Type_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="Type" />
- <textbox id="Type_tb" context="clipboard" class="plain" name="Type" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Type_tb" context="clipboard" class="plain" name="Type" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="ELvl" control="ELvl_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="ELvl" />
- <textbox id="Elvl_tb" context="clipboard" class="plain" name="ELvl" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Elvl_tb" context="clipboard" class="plain" name="ELvl" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Srce" control="Srce_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="Srce" />
- <textbox id="Srce_tb" context="clipboard" class="plain" name="Srce" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Srce_tb" context="clipboard" class="plain" name="Srce" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Audn" control="Audn_tb" set="BKS VIS SCO REC COM" value="Audn" />
- <textbox id="Audn_tb" context="clipboard" class="plain" name="Audn" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Audn_tb" context="clipboard" class="plain" name="Audn" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Ctrl" control="Ctrl_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="Ctrl" />
- <textbox id="Ctrl_tb" context="clipboard" class="plain" name="Ctrl" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Ctrl_tb" context="clipboard" class="plain" name="Ctrl" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Lang" control="Lang_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="Lang" />
- <textbox id="Lang_tb" context="clipboard" class="plain" name="Lang" maxlength="3" size="3" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Lang_tb" context="clipboard" class="plain" name="Lang" maxlength="3" size="3" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="BLvl" control="BLvl_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="BLvl" />
- <textbox id="BLvl_tb" context="clipboard" class="plain" name="BLvl" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="BLvl_tb" context="clipboard" class="plain" name="BLvl" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Form" control="Form_tb" set="BKS SER VIS MIX MAP SCO REC" value="Form" />
- <textbox id="Form_tb" context="clipboard" class="plain" name="Form" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Form_tb" context="clipboard" class="plain" name="Form" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Conf" control="Conf_tb" set="BKS SER" value="Conf" />
- <textbox id="Conf_tb" context="clipboard" class="plain" name="Conf" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Conf_tb" context="clipboard" class="plain" name="Conf" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Biog" control="Biog_tb" set="BKS" value="Biog" />
- <textbox id="Biog_tb" context="clipboard" class="plain" name="Biog" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Biog_tb" context="clipboard" class="plain" name="Biog" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="MRec" control="MRec_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="MRec" />
- <textbox id="MRec_tb" context="clipboard" class="plain" name="MRec" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="MRec_tb" context="clipboard" class="plain" name="MRec" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Ctry" control="Ctry_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="Ctry" />
- <textbox id="Ctry_tb" context="clipboard" class="plain" name="Ctry" maxlength="3" size="3" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Ctry_tb" context="clipboard" class="plain" name="Ctry" maxlength="3" size="3" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="S/L" control="s_l_tb" set="SER" value="S/L" />
- <textbox id="s_l_tb" context="clipboard" class="plain" name="S/L" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="s_l_tb" context="clipboard" class="plain" name="S/L" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Cont" control="Cont_tb" set="BKS SER" value="Cont" />
- <textbox id="Cont_tb" context="clipboard" class="plain" name="Cont" maxlength="4" size="4" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Cont_tb" context="clipboard" class="plain" name="Cont" maxlength="4" size="4" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="GPub" control="GPub_tb" set="BKS SER VIS MAP COM" value="GPub" />
- <textbox id="GPub_tb" context="clipboard" class="plain" name="GPub" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="GPub_tb" context="clipboard" class="plain" name="GPub" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="LitF" control="LitF_tb" set="BKS" value="LitF" />
- <textbox id="LitF_tb" context="clipboard" class="plain" name="LitF" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="LitF_tb" context="clipboard" class="plain" name="LitF" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Indx" control="Indx_tb" set="BKS MAP" value="Indx" />
- <textbox id="Indx_tb" context="clipboard" class="plain" name="Indx" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Indx_tb" context="clipboard" class="plain" name="Indx" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Alph" control="Alph_tb" set="SER" value="Alph" />
- <textbox id="Alph_tb" context="clipboard" class="plain" name="Alph" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Alph_tb" context="clipboard" class="plain" name="Alph" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="Desc" control="Desc_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="Desc" />
- <textbox id="Desc_tb" context="clipboard" class="plain" name="Desc" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Desc_tb" context="clipboard" class="plain" name="Desc" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Ills" control="Ills_tb" set="BKS" value="Ills" />
- <textbox id="Ills_tb" context="clipboard" class="plain" name="Ills" maxlength="4" size="4" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Ills_tb" context="clipboard" class="plain" name="Ills" maxlength="4" size="4" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Fest" control="Fest_tb" set="BKS" value="Fest" />
- <textbox id="Fest_tb" context="clipboard" class="plain" name="Fest" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Fest_tb" context="clipboard" class="plain" name="Fest" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="DtSt" control="DtSt_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="DtSt" />
- <textbox id="DtSt_tb" context="clipboard" class="plain" name="DtSt" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="DtSt_tb" context="clipboard" class="plain" name="DtSt" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Date1" control="Date1_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="Date1" />
- <textbox id="Date1_tb" context="clipboard" class="plain" name="Date1" maxlength="4" size="4" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Date1_tb" context="clipboard" class="plain" name="Date1" maxlength="4" size="4" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Date2" control="Date2_tb" set="BKS SER VIS MIX MAP SCO REC COM" value="Date2" />
- <textbox id="Date2_tb" context="clipboard" class="plain" name="Date2" maxlength="4" size="4" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Date2_tb" context="clipboard" class="plain" name="Date2" maxlength="4" size="4" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="SrTp" control="SrTp_tb" set="SER" value="SrTp" />
- <textbox id="SrTp_tb" context="clipboard" class="plain" name="SrTp" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="SrTp_tb" context="clipboard" class="plain" name="SrTp" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Regl" control="Regl_tb" set="SER" value="Regl" />
- <textbox id="Regl_tb" context="clipboard" class="plain" name="Regl" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Regl_tb" context="clipboard" class="plain" name="Regl" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Orig" control="Orig_tb" set="SER" value="Orig" />
- <textbox id="Orig_tb" context="clipboard" class="plain" name="Orig" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Orig_tb" context="clipboard" class="plain" name="Orig" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Freq" control="Freq_tb" set="SER" value="Freq" />
- <textbox id="Freq_tb" context="clipboard" class="plain" name="Freq" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Freq_tb" context="clipboard" class="plain" name="Freq" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="EntW" control="EntW_tb" set="SER" value="EntW" />
- <textbox id="EntW_tb" context="clipboard" class="plain" name="EntW" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="EntW_tb" context="clipboard" class="plain" name="EntW" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="TrAr" control="TrAr_tb" set="SCO REC" value="TrAr" />
- <textbox id="TrAr_tb" context="clipboard" class="plain" name="TrAr" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="TrAr_tb" context="clipboard" class="plain" name="TrAr" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Part" control="Part_tb" set="SCO REC" value="Part" />
- <textbox id="Part_tb" context="clipboard" class="plain" name="Part" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Part_tb" context="clipboard" class="plain" name="Part" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="LTxt" control="LTxt_tb" set="SCO REC" value="LTxt" />
- <textbox id="LTxt_tb" context="clipboard" class="plain" name="LTxt" maxlength="2" size="2" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="LTxt_tb" context="clipboard" class="plain" name="LTxt" maxlength="2" size="2" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="FMus" control="FMus_tb" set="SCO REC" value="FMus" />
- <textbox id="FMus_tb" context="clipboard" class="plain" name="FMus" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="FMus_tb" context="clipboard" class="plain" name="FMus" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="AccM" control="AccM_tb" set="SCO REC" value="AccM" />
- <textbox id="AccM_tb" context="clipboard" class="plain" name="AccM" maxlength="6" size="6" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="AccM_tb" context="clipboard" class="plain" name="AccM" maxlength="6" size="6" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Comp" control="Comp_tb" set="SCO REC" value="Comp" />
- <textbox id="Comp_tb" context="clipboard" class="plain" name="Comp" maxlength="2" size="2" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Comp_tb" context="clipboard" class="plain" name="Comp" maxlength="2" size="2" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="SpFm" control="SpFm_tb" set="MAP" value="SpFm" />
- <textbox id="SpFm_tb" context="clipboard" class="plain" name="SpFm" maxlength="2" size="2" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="SpFm_tb" context="clipboard" class="plain" name="SpFm" maxlength="2" size="2" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Relf" control="Relf_tb" set="MAP" value="Relf" />
- <textbox id="Relf_tb" context="clipboard" class="plain" name="Relf" maxlength="4" size="4" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Relf_tb" context="clipboard" class="plain" name="Relf" maxlength="4" size="4" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Proj" control="Proj_tb" set="MAP" value="Proj" />
- <textbox id="Proj_tb" context="clipboard" class="plain" name="Proj" maxlength="2" size="2" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Proj_tb" context="clipboard" class="plain" name="Proj" maxlength="2" size="2" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="CrTp" control="CrTp_tb" set="MAP" value="CrTp" />
- <textbox id="CrTp_tb" context="clipboard" class="plain" name="CrTp" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="CrTp_tb" context="clipboard" class="plain" name="CrTp" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="TMat" control="TMat_tb" set="VIS" value="TMat" />
- <textbox id="TMat_tb" context="clipboard" class="plain" name="TMat" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="TMat_tb" context="clipboard" class="plain" name="TMat" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Time" control="Time_tb" set="VIS" value="Time" />
- <textbox id="Time_tb" context="clipboard" class="plain" name="Time" maxlength="3" size="3" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Time_tb" context="clipboard" class="plain" name="Time" maxlength="3" size="3" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Tech" control="Tech_tb" set="VIS" value="Tech" />
- <textbox id="Tech_tb" context="clipboard" class="plain" name="Tech" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Tech_tb" context="clipboard" class="plain" name="Tech" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="File" control="File_tb" set="COM" value="File" />
- <textbox id="File_tb" context="clipboard" class="plain" name="File" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="File_tb" context="clipboard" class="plain" name="File" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="Type" control="Type_tbmfhd" set="AUT MFHD" value="Type" />
- <textbox id="Type_tbmfhd" context="clipboard" class="plain" name="Type" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Type_tbmfhd" context="clipboard" class="plain" name="Type" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="ELvl" control="ELvl_tbmfhd" set="AUT MFHD" value="ELvl" />
- <textbox id="ELvl_tbmfhd" context="clipboard" class="plain" name="ELvl" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="ELvl_tbmfhd" context="clipboard" class="plain" name="ELvl" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Item" control="Item_tbmfhd" set="AUT MFHD" value="Item" />
- <textbox id="Item_tbmfhd" context="clipboard" class="plain" name="Item" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Item_tbmfhd" context="clipboard" class="plain" name="Item" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="GeoDiv" control="GeoDiv_tb" set="AUT" value="GeoDiv" />
- <textbox id="GeoDiv_tb" context="clipboard" class="plain" name="GeoDiv" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="GeoDiv_tb" context="clipboard" class="plain" name="GeoDiv" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Roman" control="Roman_tb" set="AUT" value="Roman" />
- <textbox id="Roman_tb" context="clipboard" class="plain" name="Roman" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Roman_tb" context="clipboard" class="plain" name="Roman" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="CatLang" control="CatLang_tb" set="AUT" value="CatLang" />
- <textbox id="CatLang_tb" context="clipboard" class="plain" name="CatLang" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="CatLang_tb" context="clipboard" class="plain" name="CatLang" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="Kind" control="Kind_tb" set="AUT" value="Kind" />
- <textbox id="Kind_tb" context="clipboard" class="plain" name="Kind" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Kind_tb" context="clipboard" class="plain" name="Kind" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Rules" control="Rules_tb" set="AUT" value="Rules" />
- <textbox id="Rules_tb" context="clipboard" class="plain" name="Rules" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Rules_tb" context="clipboard" class="plain" name="Rules" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="SHSys" control="SHSys_tb" set="AUT" value="SHSys" />
- <textbox id="SHSys_tb" context="clipboard" class="plain" name="SHSys" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="SHSys_tb" context="clipboard" class="plain" name="SHSys" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="SerType" control="SerType_tb" set="AUT" value="SerType" />
- <textbox id="SerType_tb" context="clipboard" class="plain" name="SerType" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="SerType_tb" context="clipboard" class="plain" name="SerType" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="SerNum" control="SerNum_tb" set="AUT" value="SerNum" />
- <textbox id="SerNum_tb" context="clipboard" class="plain" name="SerNum" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="SerNum_tb" context="clipboard" class="plain" name="SerNum" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="HeadMain" control="HeadMain_tb" set="AUT" value="HeadMain" />
- <textbox id="HeadMain_tb" context="clipboard" class="plain" name="HeadMain" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="HeadMain_tb" context="clipboard" class="plain" name="HeadMain" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="Subj" control="Subj_tb" set="AUT" value="Subj" />
- <textbox id="Subj_tb" context="clipboard" class="plain" name="Subj" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Subj_tb" context="clipboard" class="plain" name="Subj" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="HeadSer" control="HeadSer_tb" set="AUT" value="HeadSer" />
- <textbox id="HeadSer_tb" context="clipboard" class="plain" name="HeadSer" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="HeadSer_tb" context="clipboard" class="plain" name="HeadSer" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="TypeSubd" control="TypeSubd_tb" set="AUT" value="TypeSubd" />
- <textbox id="TypeSubd_tb" context="clipboard" class="plain" name="TypeSubd" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="TypeSubd_tb" context="clipboard" class="plain" name="TypeSubd" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="TypeGov" control="TypeGov_tb" set="AUT" value="TypeGov" />
- <textbox id="TypeGov_tb" context="clipboard" class="plain" name="TypeGov" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="TypeGov_tb" context="clipboard" class="plain" name="TypeGov" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="RefEval" control="RefEval_tb" set="AUT" value="RefEval" />
- <textbox id="RefEval_tb" context="clipboard" class="plain" name="RefEval" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="RefEval_tb" context="clipboard" class="plain" name="RefEval" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="RecUpd" control="RecUpd_tb" set="AUT" value="RecUpd" />
- <textbox id="RecUpd_tb" context="clipboard" class="plain" name="RecUpd" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="RecUpd_tb" context="clipboard" class="plain" name="RecUpd" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
<row>
<label name="NameDiff" control="NameDiff_tb" set="AUT" value="NameDiff" />
- <textbox id="NameDiff_tb" context="clipboard" class="plain" name="NameDiff" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="NameDiff_tb" context="clipboard" class="plain" name="NameDiff" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="Level" control="Level_tb" set="AUT" value="Level" />
- <textbox id="Level_tb" context="clipboard" class="plain" name="Level" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="Level_tb" context="clipboard" class="plain" name="Level" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="ModRec" control="ModRec_tb" set="AUT" value="ModRec" />
- <textbox id="ModRec_tb" context="clipboard" class="plain" name="ModRec" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="ModRec_tb" context="clipboard" class="plain" name="ModRec" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
<label name="CatSrc" control="CatSrc_tb" set="AUT" value="CatSrc" />
- <textbox id="CatSrc_tb" context="clipboard" class="plain" name="CatSrc" maxlength="1" size="1" onkeypress="netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
+ <textbox id="CatSrc_tb" context="clipboard" class="plain" name="CatSrc" maxlength="1" size="1" onkeypress="if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); }" oninput="updateFixedFields(this);" onfocus="this.select();"/>
</row>
</rows>
</groupbox>
<hbox hidden="true" id="text-editor" flex="1">
- <xhtml:textarea rows="50" cols='100' onkeypress="if (event.charCode == 115 && event.ctrlKey && $('symbol-panel')) { setNod(tab); $('symbol-panel').openPopup(tab, 'after_pointer'); } else { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); } }" context="clipboard" id="text-editor-box"></xhtml:textarea>
+ <xhtml:textarea rows="50" cols='100' onkeypress="if (event.charCode == 115 && event.ctrlKey && $('symbol-panel')) { setNod(tab); $('symbol-panel').openPopup(tab, 'after_pointer'); } else {if (!(event.altKey || event.ctrlKey || event.metaKey)) { oils_lock_page(); } }" context="clipboard" id="text-editor-box"></xhtml:textarea>
</hbox>
<grid name="authority-marc-template" hidden="true">
</grid>
<popupset>
- <popup id="recordTypeMenu" position="after_start">
+ <menupopup id="recordTypeMenu" position="after_start">
<menuitem label="BKS" oncommand="changeFFEditor('BKS');"/>
<menuitem label="SER" oncommand="changeFFEditor('SER');"/>
<menuitem label="VIS" oncommand="changeFFEditor('VIS');"/>
<menuitem label="REC" oncommand="changeFFEditor('REC');"/>
<menuitem label="COM" oncommand="changeFFEditor('COM');"/>
<menuitem label="MFHD" oncommand="changeFFEditor('MFHD');"/>
- </popup>
+ </menupopup>
</popupset>
</window>
};
cat.record_buckets.pick_file = function (defaultFileName) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
var nsIFilePicker = Components.interfaces.nsIFilePicker;
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance( nsIFilePicker );
cat.record_buckets.export_records = function(obj, output_type) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.list2.select_all();
obj.data.stash_retrieve();
JSAN.use('util.functional');
}
);
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var top_xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" >';
top_xml += '<description>' + $("catStrings").getString('staff.cat.record_buckets.delete_records.xml1') + '</description>';
top_xml += '<hbox>';
xml += '</tr><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
xml += '<td nowrap="nowrap"><iframe src="' + urls.XUL_BIB_BRIEF;
- xml += '?docid=' + record_ids[i] + '"/></td>';
+ xml += '?docid=' + record_ids[i] + '" oils_force_external="true"/></td>';
}
xml += '</tr><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
- xml += '<td nowrap="nowrap"><iframe style="min-height: 1000px; min-width: 300px;" flex="1" src="' + urls.XUL_MARC_VIEW + '?docid=' + record_ids[i] + ' "/></td>';
+ xml += '<td nowrap="nowrap"><iframe style="min-height: 1000px; min-width: 300px;" flex="1" src="' + urls.XUL_MARC_VIEW + '?docid=' + record_ids[i] + ' " oils_force_external="true"/></td>';
}
xml += '</tr></table></form>';
//obj.data.temp_merge_top = top_xml; obj.data.stash('temp_merge_top');
for (var i = 0; i < docids.length; i++) {
var doc_id = docids[i];
if (seen[doc_id]) continue; seen[doc_id] = true;
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + doc_id;
+ var opac_url = xulG.url_prefix('opac_rdetail') + doc_id;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'opac_url' : opac_url
};
xulG.new_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name':$("catStrings").getString('staff.cat.record_buckets.cmd_sel_opac.tab_name')},
content_params
);
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
/* ugly hack so we don't have to upgrade the chrome for quick buckets */
if (typeof xulG == 'undefined') location.href = String(location.href).replace(/record_buckets.xul/,'record_buckets_quick.xul');
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function preview(idx) {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var pt = Number( $('pt').value ); /* font size */
if (!pt) {
pt = g.data.hash.aous['cat.label.font.size'] || 10;
'title' : $("catStrings").getString('staff.cat.spine_labels.preview.title'),
'on_url_load' : function(b) {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
if (typeof w.xulG.written == 'undefined') {
w.xulG.written = true;
w.g.browser.get_content().document.write(html);
alert($("catStrings").getString('staff.cat.util.transfer_copies.unmarked_volume_alert'));
return;
}
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: auto">';
if (!params.message) {
params.message = $("catStrings").getFormattedString('staff.cat.util.transfer_copies.params_message', [data.hash.aou[ params.owning_lib ].shortname(), params.volume_label]);
xml += '<hbox><button label="' + $("catStrings").getString('staff.cat.util.transfer_copies.transfer.label')+ '" name="fancy_submit"/>';
xml += '<button label="' + $("catStrings").getString('staff.cat.util.transfer_copies.cancel.label');
xml += '" accesskey="'+ $("catStrings").getString('staff.cat.util.transfer_copies.cancel.accesskey') +'" name="fancy_cancel"/></hbox>';
- xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + params.docid + '"/>';
+ xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + params.docid + '" oils_force_external="true"/>';
xml += '</vbox>';
//data.temp_transfer = xml; data.stash('temp_transfer');
JSAN.use('util.window'); var win = new util.window();
try {
JSAN.use('util.functional');
xulG.new_tab(
- xulG.url_prefix( urls.XUL_SPINE_LABEL ),
+ xulG.url_prefix('XUL_SPINE_LABEL'),
{ 'tab_name' : $("catStrings").getString('staff.cat.util.spine_editor.tab_name') },
{
'barcodes' : util.functional.map_list( selection_list, function(o){return o.barcode;})
continue;
}
seen[doc_id] = true;
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + doc_id;
+ var opac_url = xulG.url_prefix('opac_rdetail') + doc_id;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'opac_url' : opac_url,
};
xulG.new_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name':$('catStrings').getString('staff.cat.util.show_in_opac.retrieving_title')},
content_params
);
);
data.stash('cb_temp_copy_ids');
win.open(
- xulG.url_prefix(urls.XUL_COPY_BUCKETS_QUICK),
+ xulG.url_prefix('XUL_COPY_BUCKETS_QUICK'),
'_blank',
'chrome,resizable,center'
);
}
if (filtered_record_ids.length > 0) {
win.open(
- xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK),
+ xulG.url_prefix('XUL_RECORD_BUCKETS_QUICK'),
'_blank',
'chrome,resizable,modal,center',
{
var unified_interface = String( data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ var url = window.xulG.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
var w = xulG.set_tab(
url,
{
xulG.resultant_brsrc = brsrc_list.map(function(o) { return o[0]; });
xulG.new_tab(
urls.XUL_BROWSER + "?url=" + window.escape(
- xulG.url_prefix("/eg/conify/global/booking/resource")
+ xulG.url_prefix("BOOKING_RESOURCE")
), {
"tab_name": offlineStrings.getString(
"menu.cmd_booking_resource.tab"
}
var my_xulG = win.open(
- xulG.url_prefix(urls.XUL_VOLUME_EDITOR),
+ xulG.url_prefix('XUL_VOLUME_EDITOR'),
title,
'chrome,modal,resizable',
{ 'volumes' : clone_list( fleshed_volumes ) }
}
if (ev.button == 0 /* left click, spawn opac */) {
- var opac_url = xulG.url_prefix( urls.opac_rdetail )
+ var opac_url = xulG.url_prefix('opac_rdetail')
+ data[data_key];
var content_params = {
'session' : ses(),
'opac_url' : opac_url,
};
xulG.new_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name':'Retrieving title...'},
content_params
);
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
/***********************************************************************************************************/
/* Initial setup */
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
xulG.reload_opac();
}
if (xul_param('load_opac_when_done')) {
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + g.doc_id;
+ var opac_url = xulG.url_prefix('opac_rdetail') + g.doc_id;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'opac_url' : opac_url
};
xulG.set_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{
'tab_name':'Retrieving title...',
'on_tab_load' : function(cw) {
g.load_prefs = function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('volume_copy_creator.prefs');
if (file._file.exists()) {
var prefs = file.get_object(); file.close();
g.save_prefs = function () {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('volume_copy_creator.prefs');
file.set_object(
{
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<vbox flex="1">
<vbox id="top_pane" flex="1" oils_persist="height">
<hbox id="template_bar_holder"/>
- <browser id="volume_pane" flex="1" />
+ <browser id="volume_pane" flex="1" oils_force_external="true" />
</vbox>
<splitter
collapse="after"
<grippy/>
</splitter>
<vbox id="bottom_pane" flex="1" oils_persist="height">
- <browser id="item_pane" flex="1" />
+ <browser id="item_pane" flex="1" oils_force_external="true" />
<hbox id="bottom_bar"/>
</vbox>
</vbox>
<hbox flex="0" id="template_bar_holder"/>
<hbox flex="1">
<vbox id="top_pane" flex="1" oils_persist="width">
- <browser id="volume_pane" flex="1" />
+ <browser id="volume_pane" flex="1" oils_force_external="true" />
</vbox>
<splitter
collapse="after"
<grippy/>
</splitter>
<vbox id="bottom_pane" flex="1" oils_persist="width">
- <browser id="item_pane" flex="1" />
+ <browser id="item_pane" flex="1" oils_force_external="true" />
<hbox id="bottom_bar"/>
</vbox>
</hbox>
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
if (typeof cat == 'undefined') cat = {};
cat.z3950 = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('util.network'); this.network = new util.network();
} catch(E) {
'init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.widgets');
var obj = this;
n.setAttribute('toggle','1');
n.setAttribute('label', $("catStrings").getString('staff.cat.z3950.results_view.label'));
n.setAttribute('accesskey', $("catStrings").getString('staff.cat.z3950.results_view.accesskey'));
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var f = get_contentWindow(document.getElementById('marc_frame'));
var retrieve_id = n.getAttribute('retrieve_id');
var result_idx = retrieve_id.split('-')[0];
try {
var doc_id = obj.controller.view.mark_overlay.getAttribute('doc_id');
if (doc_id) {
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + doc_id;
+ var opac_url = xulG.url_prefix('opac_rdetail') + doc_id;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'opac_url' : opac_url,
};
xulG.new_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name': $("catStrings").getString('staff.cat.z3950.replace_tab_with_opac.tab_name')},
content_params
);
},
'replace_tab_with_opac' : function(doc_id) {
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + doc_id;
+ var opac_url = xulG.url_prefix('opac_rdetail') + doc_id;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'opac_url' : opac_url,
};
xulG.set_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name': $("catStrings").getString('staff.cat.z3950.replace_tab_with_opac.tab_name')},
content_params
);
if ( $('marc_editor').checked ) {
xulG.new_tab(
- xulG.url_prefix(urls.XUL_MARC_EDIT),
+ xulG.url_prefix('XUL_MARC_EDIT'),
{ 'tab_name' : 'MARC Editor' },
{
'marc_control_number_identifier': obj.data.hash.aous['cat.marc_control_number_identifier'] || 'Set cat.marc_control_number_identifier in Library Settings',
'confirm_overlay' : function(record_ids) {
var obj = this; // JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var top_xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" >';
top_xml += '<description>'+$("catStrings").getString('staff.cat.z3950.confirm_overlay.description')+'</description>';
top_xml += '<hbox><button id="lead" disabled="false" label="'+$("catStrings").getString('staff.cat.z3950.confirm_overlay.lead.label')+'" name="fancy_submit"';
xml += '<table width="100%"><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
xml += '<td nowrap="nowrap"><iframe src="' + urls.XUL_BIB_BRIEF;
- xml += '?docid=' + record_ids[i] + '"/></td>';
+ xml += '?docid=' + record_ids[i] + '" oils_force_external="true"/></td>';
}
xml += '</tr><tr valign="top">';
for (var i = 0; i < record_ids.length; i++) {
- xml += '<td nowrap="nowrap"><iframe style="min-height: 1000px; min-width: 300px;" flex="1" src="' + urls.XUL_MARC_VIEW + '?docid=' + record_ids[i] + ' "/></td>';
+ xml += '<td nowrap="nowrap"><iframe style="min-height: 1000px; min-width: 300px;" flex="1" src="' + urls.XUL_MARC_VIEW + '?docid=' + record_ids[i] + ' " oils_force_external="true"/></td>';
}
xml += '</tr></table></form>';
// data.temp_merge_top = top_xml; data.stash('temp_merge_top');
if ( $('marc_editor').checked ) {
xulG.new_tab(
- xulG.url_prefix(urls.XUL_MARC_EDIT),
+ xulG.url_prefix('XUL_MARC_EDIT'),
{ 'tab_name' : $("catStrings").getString('staff.cat.z3950.spawn_marc_editor_for_overlay.tab_name') },
{
'record' : { 'marc' : my_marcxml },
}
}
*/
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('z3950_store');
if (file._file.exists()) {
var creds = file.get_object(); file.close();
}
}
obj.creds.version = obj.creds_version;
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('z3950_store');
file.set_object(obj.creds);
file.close();
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<splitter id="jacket_splitter" collapse="before" oils_persist="state hidden" oils_persist_peers="jacket_image deck"><grippy id="jacket_splitter_grippy" /></splitter>
<deck id="deck" flex="1" oils_persist="width">
<tree id="results" flex="1" enableColumnDrag="true" seltype="single"/>
- <iframe id="marc_frame" src="/xul/server/cat/marc_view.html" flex="1"/>
+ <iframe id="marc_frame" src="/xul/server/cat/marc_view.html" flex="1" oils_force_external="true"/>
</deck>
</hbox>
</groupbox>
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<popupset id="copy_status_popupset">
- <popup id="copy_status_actions" position="at_pointer">
+ <menupopup id="copy_status_actions" position="at_pointer">
<menuitem command="sel_clip" label="&staff.circ.checkin_overlay.sel_clip.label;" accesskey="&staff.circ.checkin_overlay.sel_clip.accesskey;" />
<menuitem command="sel_bucket" label="&staff.circ.checkin_overlay.sel_bucket.label;" accesskey="&staff.circ.checkin_overlay.sel_bucket.accesskey;"/>
<menuitem command="sel_opac" label="&staff.circ.checkin_overlay.sel_opac.label;" accesskey="&staff.circ.checkin_overlay.sel_opac.accesskey;" />
<menuseparator />
<menuitem command="sel_spine" label="&staff.circ.checkin_overlay.sel_spine.label;" accesskey="&staff.circ.checkin_overlay.sel_spine.accesskey;"/>
<menuitem command="save_columns" label="&staff.circ.checkin_overlay.save_columns.label;"/>
- </popup>
+ </menupopup>
</popupset>
<box id="checkin_main" flex="1" orient="vertical" class="my_overflow">
} else {
params.noncat = 1;
params.noncat_type = obj.controller.view.checkout_menu.value;
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var r = window.prompt(
document.getElementById('circStrings').getFormattedString('staff.circ.checkout.cmd_checkout_submit.msg', [obj.data.hash.cnct[params.noncat_type].name()]),
'1',
if(in_barcode.type == 'actor') {
// Go to new patron (do not pass go, do not collect $200, do not prompt user)
var horizontal_interface = String( obj.data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true';
- var loc = xulG.url_prefix( horizontal_interface ? urls.XUL_PATRON_HORIZ_DISPLAY : urls.XUL_PATRON_DISPLAY );
+ var loc = xulG.url_prefix( horizontal_interface ? 'XUL_PATRON_HORIZ_DISPLAY' : 'XUL_PATRON_DISPLAY' );
xulG.set_tab( loc, {}, { 'barcode' : in_barcode.barcode } );
return;
}
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
n.setAttribute('toggle','1');
n.setAttribute('label', document.getElementById("circStrings").getString('staff.circ.copy_status.list_view.label'));
n.setAttribute('accesskey', document.getElementById("circStrings").getString('staff.circ.copy_status.list_view.accesskey'));
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
obj.controller.view.copy_status_barcode_entry_textbox.focus();
if (obj.selection_list.length == 0) return;
var f = obj.browser.get_content();
'cmd_copy_status_upload_file' : [
['command'],
function() {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
JSAN.use('util.file');
var f = new util.file('');
var content = f.import_file( { 'title' : document.getElementById('circStrings').getString('staff.circ.copy_status.upload_file.title'), 'not_json' : true } );
var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ url = window.xulG.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
} else {
- url = window.xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+ url = window.xulG.url_prefix('XUL_VOLUME_COPY_CREATOR_ORIGINAL');
}
var w = xulG.new_tab(
var unified_interface = String( obj.data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
if (unified_interface) {
var horizontal_interface = String( obj.data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
- url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+ url = window.xulG.url_prefix( horizontal_interface ? 'XUL_VOLUME_COPY_CREATOR_HORIZONTAL' : 'XUL_VOLUME_COPY_CREATOR' );
} else {
- url = window.xulG.url_prefix( urls.XUL_VOLUME_COPY_CREATOR_ORIGINAL );
+ url = window.xulG.url_prefix('XUL_VOLUME_COPY_CREATOR_ORIGINAL');
}
var w = xulG.new_tab(
list.push(map_acn[v]);
}
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: auto">';
xml += '<description>';
xml += '" accesskey="';
xml += document.getElementById('circStrings').getString('staff.circ.copy_status.transfer_volume.cancel.accesskey');
xml += '" name="fancy_cancel"/></hbox>';
- xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + obj.data.marked_library.docid + '"/>';
+ xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + obj.data.marked_library.docid + '" oils_force_external="true"/>';
xml += '</vbox>';
JSAN.use('OpenILS.data');
//var data = new OpenILS.data(); data.init({'via':'stash'});
var result = obj.network.simple_request('FM_ACP_DETAILS_VIA_BARCODE.authoritative', [ ses(), barcode ]);
handle_req({'getResultObject':function(){return result;}}); // used to be async
if (result.copy && document.getElementById('deck').selectedIndex == 1) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var f = obj.browser.get_content();
xulG.barcode = result.copy.barcode(); // FIXME: We could pass the already-fetched data, but need to figure out how to manage that and honor Trim List, the whole point of which is to limit memory consumption
if (f) {
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
<commandset id="copy_status_cmds" />
<popupset id="copy_status_popupset">
- <popup id="copy_status_actions" position="at_pointer">
+ <menupopup id="copy_status_actions" position="at_pointer">
<menuitem command="sel_clip" label="&staff.circ.copy_status_overlay.sel_clip.label;" accesskey="&staff.circ.copy_status_overlay.sel_clip.accesskey;" />
<menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
<menuitem command="sel_record_bucket" />
<menuitem command="sel_spine" label="&staff.circ.copy_status_overlay.sel_spine.label;" accesskey="&staff.circ.copy_status_overlay.sel_spine.accesskey;"/>
<menuitem command="cmd_replace_barcode" label="&staff.circ.copy_status_overlay.cmd_replace_barcode.label;" accesskey="&staff.circ.copy_status_overlay.cmd_replace_barcode.accesskey;"/>
<menuitem command="save_columns" label="&staff.circ.copy_status_overlay.save_columns.label;"/>
- </popup>
+ </menupopup>
</popupset>
<popupset id="copy_cat_status_popupset">
- <popup id="copy_cat_status_actions" position="at_pointer">
+ <menupopup id="copy_cat_status_actions" position="at_pointer">
<menuitem command="sel_clip" label="&staff.circ.copy_status_overlay.sel_clip.label;" accesskey="&staff.circ.copy_status_overlay.sel_clip.accesskey;" />
<menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
<menuitem command="sel_record_bucket" />
<menuitem command="sel_spine" label="&staff.circ.copy_status_overlay.sel_spine.label;" accesskey="&staff.circ.copy_status_overlay.sel_spine.accesskey;"/>
<menuitem command="cmd_replace_barcode" label="&staff.circ.copy_status_overlay.cmd_replace_barcode.label;" accesskey="&staff.circ.copy_status_overlay.cmd_replace_barcode.accesskey;"/>
<menuitem command="save_columns" label="&staff.circ.copy_status_overlay.save_columns.label;"/>
- </popup>
+ </menupopup>
</popupset>
<hbox id="copy_status_top_ui" />
<deck id="deck" flex="1">
<tree id="copy_status_list" flex="1" enableColumnDrag="true" context="copy_status_actions" />
- <browser id="copy_status_frame" src="" flex="1" autoscroll="false" />
+ <browser id="copy_status_frame" src="" flex="1" autoscroll="false" oils_force_external="true" />
</deck>
<hbox id="copy_status_bottom_ui" />
</groupbox>
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<![CDATA[
function my_init() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
if (typeof circ == 'undefined') circ = {};
circ.print_list_template_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
} catch(E) {
dump('print_list: ' + E + '\n');
'init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
var obj = this;
JSAN.use('OpenILS.data'); obj.data = new OpenILS.data(); obj.data.init({'via':'stash'});
obj.data.print_list_templates[name].type = obj.controller.view.template_type_menu.value;
obj.data.print_list_templates[name].context = obj.controller.view.template_context_menu.value;
obj.data.stash( 'print_list_templates' );
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.file'); var file = new util.file('print_list_templates');
file.set_object(obj.data.print_list_templates); file.close();
alert(document.getElementById('circStrings').getString('staff.circ.print_list_template.save') + '\n' + js2JSON(obj.data.print_list_templates[name]));
'export_templates' : function() {
try {
var obj = this;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.file'); var f = new util.file('');
f.export_file( { 'title' : document.getElementById('circStrings').getString('staff.circ.print_list_template.save_as'), 'data' : obj.data.print_list_templates } );
'import_templates' : function() {
try {
var obj = this;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.file'); var f = new util.file('');
var temp = f.import_file( { 'title' : document.getElementById('circStrings').getString('staff.circ.print_list_template.import') } );
if (!temp) { return; }
obj.data.stash('print_list_templates');
alert(document.getElementById('circStrings').getFormattedString('staff.circ.print_list_template.import_results', [s]));
if (xulG) {
- xulG.set_tab(xulG.url_prefix(urls.XUL_PRINT_LIST_TEMPLATE_EDITOR), {}, {});
+ xulG.set_tab(xulG.url_prefix('XUL_PRINT_LIST_TEMPLATE_EDITOR'), {}, {});
} else {
alert(document.getElementById('circStrings').getString('staff.circ.print_list_template.reload'));
}
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
<hbox flex="1">
<groupbox flex="1">
<caption label="&staff.circ.print_list.top_ui.preview.label;" />
- <iframe id="sample" flex="1"/>
+ <iframe id="sample" flex="1" oils_force_external="true"/>
</groupbox>
<vbox flex="1">
<groupbox flex="1">
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( document.getElementById("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<commandset id="renew_cmds" />
<popupset id="copy_status_popupset">
- <popup id="copy_status_actions" position="at_pointer">
+ <menupopup id="copy_status_actions" position="at_pointer">
<menuitem command="sel_clip" label="&staff.circ.renew_overlay.sel_clip.label;" accesskey="&staff.circ.renew_overlay.sel_clip.accesskey;" />
<menuitem command="sel_bucket" label="&staff.circ.renew_overlay.sel_bucket.label;" accesskey="&staff.circ.renew_overlay.sel_bucket.accesskey;"/>
<menuitem command="sel_opac" label="&staff.circ.renew_overlay.sel_opac.label;" accesskey="&staff.circ.renew_overlay.sel_opac.accesskey;" />
<menuseparator />
<menuitem command="sel_spine" label="&staff.circ.renew_overlay.sel_spine.label;" accesskey="&staff.circ.renew_overlay.sel_spine.accesskey;"/>
<menuitem command="save_columns" label="&staff.circ.renew_overlay.save_columns.label;"/>
- </popup>
+ </menupopup>
</popupset>
<box id="renew_main" flex="1" orient="vertical" class="my_overflow">
if (typeof copy_id == 'object' && copy_id != null) copy_id = copy_id.id();
try {
- var url = xulG.url_prefix( urls.XUL_COPY_DETAILS ); // + '?copy_id=' + copy_id;
+ var url = xulG.url_prefix('XUL_COPY_DETAILS'); // + '?copy_id=' + copy_id;
var my_xulG = obj.win.open( url, 'show_copy_details', 'chrome,resizable,modal', { 'copy_id' : copy_id, 'new_tab' : xulG.new_tab, 'url_prefix' : xulG.url_prefix } );
if (typeof my_xulG.retrieve_these_patrons == 'undefined') return;
);
try {
- var url = xulG.url_prefix( urls.XUL_BACKDATE );
+ var url = xulG.url_prefix('XUL_BACKDATE');
var my_xulG = obj.win.open( url, 'backdate_post_checkin', 'chrome,resizable,modal', { 'circ_ids' : circ_ids } );
return my_xulG;
for (var i = 0; i < selection_list.length; i++) {
try {
if (typeof selection_list[i].copy_id == 'undefined' || selection_list[i].copy_id == null) continue;
- var url = xulG.url_prefix( urls.XUL_CIRC_SUMMARY ); // + '?copy_id=' + selection_list[i].copy_id + '&count=' + count;
+ var url = xulG.url_prefix('XUL_CIRC_SUMMARY'); // + '?copy_id=' + selection_list[i].copy_id + '&count=' + count;
var my_xulG = obj.win.open( url, 'show_last_few_circs', 'chrome,resizable,modal', { 'copy_id' : selection_list[i].copy_id, 'new_tab' : xulG.new_tab, 'url_prefix': xulG.url_prefix } );
if (typeof my_xulG.retrieve_these_patrons == 'undefined') continue;
if (r = openils.Util.readResponse(r)) {
if (r.purchase_order()) {
var url = urls.XUL_BROWSER + "?url=" +
- xulG.url_prefix(
- escape(urls.EG_ACQ_PO_VIEW +
- "/" + r.purchase_order() + "/" + r.id())
+ window.escape(
+ xulG.url_prefix('EG_ACQ_PO_VIEW/')
+ + r.purchase_order() + "/" + r.id()
);
window.xulG.new_tab(
url, {"browser": true}, {
var search_depth = 0; // 0 = consortium, 1 = system, 2 = library, 3 = sub-library, etc.
if(textbox && textbox.value != "") {
- var opac_url = xulG.url_prefix(urls.opac_rresult) + "?rt=keyword&tp=keyword&l=" + home_ou_id + "&d=" + search_depth +"&f=&t=" + escape(textbox.value);
+ var opac_url = xulG.url_prefix('opac_rresult') + "?rt=keyword&tp=keyword&l=" + home_ou_id + "&d=" + search_depth +"&f=&t=" + escape(textbox.value);
if (urls.opac_rresult.match(/\/eg\/opac\/results/)) {
- opac_url = xulG.url_prefix(urls.opac_rresult) + "?query=" + escape(textbox.value);
+ opac_url = xulG.url_prefix('opac_rresult') + "?query=" + escape(textbox.value);
}
var params = {'tab_name':'Catalog'};
var content_params = { 'session' : ses(), 'authtime' : ses('authtime'), 'opac_url' : opac_url };
xulG.set_tab_name('Portal');
}
function jb_open_eg_web_page(path, label) {
- var loc = urls.XUL_BROWSER + '?url=' + window.escape(xulG.url_prefix(urls.EG_WEB_BASE) + '/' + path);
+ var loc = urls.XUL_BROWSER + '?url=' + window.escape(xulG.url_prefix('EG_WEB_BASE') + '/' + path);
xulG.set_tab(
loc,
);
}
function jb_open_eg_web_page_newtab(path, label) {
- var loc = urls.XUL_BROWSER + '?url=' + window.escape(xulG.url_prefix(urls.EG_WEB_BASE) + '/' + path);
+ var loc = urls.XUL_BROWSER + '?url=' + window.escape(xulG.url_prefix('EG_WEB_BASE') + '/' + path);
xulG.new_tab(
loc,
jb_open_eg_web_page('vandelay/vandelay', 'Server Settings');
}
function local_admin_reports(newtab) {
- var loc = urls.XUL_BROWSER + '?url=' + window.escape( xulG.url_prefix(urls.XUL_REPORTS) + '?ses=' + ses());
+ var loc = urls.XUL_BROWSER + '?url=' + window.escape( xulG.url_prefix('XUL_REPORTS') + '?ses=' + ses());
params = {'tab_name' : 'Reports', 'browser' : false }
content_params = {'no_xulG' : false, 'show_print_button' : false, show_nav_buttons : true }
if(newtab)
}
function toggle_tpac(mode) {
var use_tpac = false;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
try {
use_tpac = prefs.getBoolPref('oils.use_tpac');
function data_init() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
- // XXX: We're reproducing what's in main.js just for a time so we can have this immediately in some environments
- // without requiring a new staff client build be deployed
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Ci['nsIPrefBranch']); if (prefs.prefHasUserValue('general.useragent.override')) {
- // don't want an ever-growing useragent
- } else {
- prefs.setCharPref('general.useragent.override',navigator.userAgent + ' oils_xulrunner /xul/server/');
- }
-
if (typeof JSAN == 'undefined') {
throw(document.getElementById("commonStrings").getString('common.jsan.missing'));
}
g.open_menu = function() {
delete xulG['_sound'];
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"].
getService(Components.interfaces.nsIWindowMediator);
var eg_main = wm.getMostRecentWindow('eg_main');
<groupbox id="data_groupbox" flex="1" class="my_overflow">
<caption id="caption" label="&staff.main.data.loading;"/>
<description id="data_progress"/>
- <iframe id="iframe" />
+ <iframe id="iframe" oils_force_external="true" />
</groupbox>
</window>
<![CDATA[
function my_init() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
if (typeof JSAN == 'undefined') {
throw(document.getElementById('commonStrings').getString('common.jsan.missing'));
}
function gen_offline_menus_init() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
JSAN.use('util.functional');
save_object('offline_ou_list', build_ou_list());
}
function save_object(filename,obj) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.file'); var file = new util.file(filename);
file.set_object(obj); file.close();
}
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( offlineStrings.getString('common.jsan.missing'));
}
document.getElementById('wsname').disabled = true;
document.getElementById('wsname').value = document.getElementById('commonStrings').getString('staff.main.gen_offline_widgets.please_wait');
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
if (typeof JSAN == 'undefined') {
throw(document.getElementById("commonStrings").getString('common.jsan.missing'));
}
default: g.error.standard_unexpected_error_alert(document.getElementById('commonStrings').getFormattedString('staff.main.gen_offline_widgets.registration.error', ['1']), robj); break;
}
} else {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalPreferencesWrite UniversalBrowserWrite UniversalPreferencesRead UniversalBrowserRead");
g.data.ws_info[ xulG.auth.controller.view.server_prompt.value ] = {
'name' : g.my_libs_shortname_hash[ g.ml.value ] + '-' + g.tb.value,
'owning_lib' : g.ml.value,
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function spawn_checkout(barcode) {
try {
var horizontal_interface = String( g.data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true';
- var loc = xulG.url_prefix( horizontal_interface ? urls.XUL_PATRON_HORIZ_DISPLAY : urls.XUL_PATRON_DISPLAY );
+ var loc = xulG.url_prefix( horizontal_interface ? 'XUL_PATRON_HORIZ_DISPLAY' : 'XUL_PATRON_DISPLAY' );
if (typeof window.xulG == 'object' && typeof window.xulG.set_tab == 'function') {
window.xulG.set_tab( loc, {}, { 'barcode' : barcode } );
} else {
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
$('copy_details').setAttribute('disabled', g.bill_list_selection.length == 0);
},
'on_click' : function(ev) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserRead');
var row = {}; var col = {}; var nobj = {};
g.bill_list.node.treeBoxObject.getCellAt(ev.clientX,ev.clientY,row,col,nobj);
if (row.value == -1) return;
if (no_print_prompting) {
if (no_print_prompting.indexOf( "Bill Pay" ) > -1) { return; } // Skip print attempt
}
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
g.data.stash_retrieve();
var template = 'bill_payment';
JSAN.use('patron.util'); JSAN.use('util.functional');
</commandset>
<popupset>
- <popup id="actions_popup">
+ <menupopup id="actions_popup">
<menuitem command="opac" />
<menuitem command="copy_details" />
<menuitem command="voidall" />
<menuitem command="refund" />
<menuitem command="add" />
<menuitem command="details" />
- </popup>
+ </menupopup>
</popupset>
<vbox flex="1" class="my_overflow">
}
function info_init() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function $(id) { return document.getElementById(id); }
function info_init() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
if (get_bool(r_circ.phone_renewal() ) ) r += 'PHONE ';
$('renewal').value = r || 'No';
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var csb = $('copy_summary_vbox'); while (csb.firstChild) csb.removeChild(csb.lastChild);
var copy_summary = document.createElement('iframe'); csb.appendChild(copy_summary);
copy_summary.setAttribute('src',urls.XUL_COPY_SUMMARY); // + '?copy_id=' + r_circ.target_copy());
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function patron_bill_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
{
'patron_id' : obj.patron.id(),
'on_list_change' : function(b) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.summary_window.g.summary.controller.render('patron_checkouts');
obj.summary_window.g.summary.controller.render('patron_standing_penalties');
obj.summary_window.g.summary.controller.render('patron_bill');
'new_patron_tab' : function(a,b) { return xulG.new_patron_tab(a,b); }
}
);
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.items_window = get_contentWindow(frame);
}
],
// if (param_count++ == 0) url += '?'; else url += '&';
// url += i + '=' + window.escape(p[i]);
//}
- var loc = xulG.url_prefix( urls.XUL_REMOTE_BROWSER ); // + '?url=' + window.escape( url );
+ var loc = xulG.url_prefix('XUL_REMOTE_BROWSER'); // + '?url=' + window.escape( url );
xulG.new_tab(
loc,
{},
JSAN.use('patron.util');
patron.util.work_log_patron_edit(p);
if (obj.barcode) obj.barcode = p.card().barcode();
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
//obj.summary_window.g.summary.retrieve();
obj.refresh_all();
} catch(E) {
['command'],
function(ev) {
openils.XUL.newTabEasy(
- "/eg/booking/reservation",
+ "BOOKING_RESERVATION",
$("offlineStrings").getString(
"menu.cmd_booking_reservation.tab"
), {
['command'],
function(ev) {
openils.XUL.newTabEasy(
- "/eg/booking/pickup",
+ "BOOKING_PICKUP",
$("offlineStrings").getString(
"menu.cmd_booking_reservation_pickup.tab"
), {
['command'],
function(ev) {
openils.XUL.newTabEasy(
- "/eg/booking/return",
+ "BOOKING_RETURN",
$("offlineStrings").getString(
"menu.cmd_booking_reservation_return.tab"
), {
'patron_barcode' : obj.patron.card().barcode(),
'on_list_change' : function(h) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.summary_window.g.summary.controller.render('patron_holds');
} catch(E) {
alert(E);
'get_new_session' : function(a) { return xulG.get_new_session(a); },
'new_tab' : function(a,b,c) { return xulG.new_tab(a,b,c); },
'on_money_change' : function(b) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.summary_window.refresh();
}
}
);
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.bill_window = get_contentWindow(f);
}
],
}
}
);
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.summary_window = get_contentWindow(frame);
} else {
}
}
);
- netscape.security.PrivilegeManager.enablePrivilege(
- "UniversalXPConnect"
- );
obj.summary_window = get_contentWindow(frame);
obj.patron = obj.summary_window.g.summary.patron;
obj.controller.render('patron_name');
}
}
);
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.search_result = get_contentWindow(list_frame);
}
};
{},
my_xulG
);
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.search_window = get_contentWindow(form_frame);
obj._already_defaulted_once = true;
},
'refresh_deck' : function(url) {
var obj = this;
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
for (var i = 0; i < obj.right_deck.node.childNodes.length; i++) {
try {
var f = obj.right_deck.node.childNodes[i];
'patron' : obj.patron,
'check_stop_checkouts' : function() { return obj.check_stop_checkouts(); },
'on_list_change_old' : function(checkout) {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var x = obj.summary_window.g.summary.controller.view.patron_checkouts;
var n = Number(x.getAttribute('value'));
x.setAttribute('value',n+1);
},
'on_list_change' : function(checkout,is_renewal) {
-
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
// Downside here: an extra network call, open-ils.actor.user.checked_out.count.authoritative
obj.summary_window.g.summary.controller.render('patron_checkouts');
obj.summary_window.g.summary.controller.render('patron_standing_penalties');
'url_prefix' : xulG.url_prefix
}
);
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.checkout_window = get_contentWindow(frame);
} catch(E) {
alert('Error in spawn_checkout_interface(): ' + E);
if (obj.stop_checkouts && obj.checkout_window) {
setTimeout( function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
obj.checkout_window.g.checkout.check_disable();
} catch(E) { }
}, 1000);
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
setTimeout(
function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = g.patron.right_deck.node.selectedPanel;
if (node && get_contentWindow(node) && typeof get_contentWindow(node).default_focus == 'function') {
get_contentWindow(node).default_focus();
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
setTimeout(
function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var node = g.patron.right_deck.node.selectedPanel;
if (node && get_contentWindow(node) && typeof get_contentWindow(node).default_focus == 'function') {
get_contentWindow(node).default_focus();
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function new_notification() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
var xml = '<groupbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">';
xml += '<caption label="' + $("patronStrings").getString('staff.patron.hold_notices.new_notification_record') + '"/><grid flex="1"><columns><column/><column flex="1"/></columns><rows>';
xml += '<row><label value="' + $("patronStrings").getString('staff.patron.hold_notices.method') + '"/><textbox id="method" name="fancy_data" context="clipboard"/></row>';
function new_note() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
var xml = '<groupbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">';
xml += '<caption label="' + $("patronStrings").getString('staff.patron.hold_notes.new_note') + '"/><grid flex="1"><columns><column/><column flex="1"/></columns><rows>';
xml += '<row><label value="' + $('patronStrings').getString('staff.patron.hold_notes.new_note.public') + '"/><checkbox id="pub" name="fancy_data" checked="false"/></row>';
n.setAttribute('toggle','1');
n.setAttribute('label', document.getElementById("circStrings").getString('staff.circ.holds.list_view.label'));
n.setAttribute('accesskey', document.getElementById("circStrings").getString('staff.circ.holds.list_view.accesskey'));
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
if (obj.retrieve_ids.length == 0) return;
var f = obj.browser.get_content();
xulG.ahr_id = obj.retrieve_ids[0].id;
});
var loc = urls.XUL_BROWSER + "?url=" + window.escape(
- xulG.url_prefix("/opac/extras/circ/alt_holds_print.html").replace("http:","https:")
+ xulG.url_prefix("ALT_HOLDS_PRINT")
);
xulG.new_tab(
loc, {
bot_xml += 'accesskey="'+ $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.done.accesskey') +'" name="fancy_submit"/>';
bot_xml += '<button label="'+ $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.cancel.label') +'"';
bot_xml += 'accesskey="'+ $("patronStrings").getString('staff.patron.holds.holds_edit_selection_depth.cancel.accesskey') +'" name="fancy_cancel"/></hbox>';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
JSAN.use('util.window'); var win = new util.window();
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.done.accesskey')+'" name="fancy_submit"/>';
bot_xml += '<button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.cancel.label')+'"';
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_pickup_lib.cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
JSAN.use('util.window'); var win = new util.window();
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.btn_done.accesskey')+'" name="fancy_submit"/>';
bot_xml += '<button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.btn_cancel.label')+'"';
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_phone_notify.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
JSAN.use('util.window'); var win = new util.window();
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_sms_notify.btn_done.accesskey')+'" name="fancy_submit"/>';
bot_xml += '<button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_sms_notify.btn_cancel.label')+'"';
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_sms_notify.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
JSAN.use('util.window'); var win = new util.window();
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_sms_carrier.btn_done.accesskey')+'" name="fancy_submit"/>';
bot_xml += '<button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_sms_carrier.btn_cancel.label')+'"';
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_sms_carrier.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
JSAN.use('util.window'); var win = new util.window();
var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
bot_xml += '<spacer flex="1"/><button label="'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.btn_cancel.label')+'"';
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_edit_email_notify.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
//obj.data.temp_mid = xml; obj.data.stash('temp_mid');
//obj.data.temp_bot = bot_xml; obj.data.stash('temp_bot');
JSAN.use('util.window'); var win = new util.window();
var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
bot_xml += '<spacer flex="1"/><button label="'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.btn_cancel.label')+'"';
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_cut_in_line.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
JSAN.use('util.window'); var win = new util.window();
var fancy_prompt_data = win.open(
urls.XUL_FANCY_PROMPT,
var bot_xml = '<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: vertical">';
bot_xml += '<spacer flex="1"/><button label="'+$("patronStrings").getString('staff.patron.holds.holds_desire_mint_condition.btn_cancel.label')+'"';
bot_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.holds.holds_desire_mint_condition.btn_cancel.accesskey')+'" name="fancy_cancel"/></hbox>';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
JSAN.use('util.window'); var win = new util.window();
var fancy_prompt_data = win.open(
urls.XUL_FANCY_PROMPT,
msg = $("patronStrings").getFormattedString('staff.patron.holds.holds_cancel.cancel_hold_message.singular', [hold_list.join(', ')]);
}
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.window');
var win = new util.window();
var my_xulG = win.open(
var opac_url;
switch(htype) {
case 'M' :
- opac_url = xulG.url_prefix( urls.opac_rresult_metarecord ) + htarget;
+ opac_url = xulG.url_prefix('opac_rresult_metarecord') + htarget;
break;
case 'T' :
- opac_url = xulG.url_prefix( urls.opac_rdetail ) + htarget;
+ opac_url = xulG.url_prefix('opac_rdetail') + htarget;
break;
case 'P' :
- opac_url = xulG.url_prefix( urls.opac_rdetail )
+ opac_url = xulG.url_prefix('opac_rdetail')
+ obj.hold_part_map[ obj.retrieve_ids[i].id ].record();
break;
case 'I' :
- opac_url = xulG.url_prefix( urls.opac_rdetail )
+ opac_url = xulG.url_prefix('opac_rdetail')
+ obj.hold_subscription_map[ obj.retrieve_ids[i].id ].record_entry();
break;
case 'V' :
var my_acn = obj.network.simple_request( 'FM_ACN_RETRIEVE.authoritative', [ htarget ]);
- opac_url = xulG.url_prefix( urls.opac_rdetail) + my_acn.record();
+ opac_url = xulG.url_prefix('opac_rdetail') + my_acn.record();
break;
case 'C' :
case 'R' :
my_acn = obj.network.simple_request( 'FM_ACN_RETRIEVE.authoritative',
[ my_acp.call_number() ]);
}
- opac_url = xulG.url_prefix( urls.opac_rdetail) + my_acn.record();
+ opac_url = xulG.url_prefix('opac_rdetail') + my_acn.record();
break;
default:
obj.error.standard_unexpected_error_alert($("patronStrings").getFormattedString('staff.patron.holds.show_catalog.unknown_htype', [htype]), obj.retrieve_ids[i]);
'opac_url' : opac_url
};
xulG.new_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name': htype == 'M' ? 'Catalog' : $("patronStrings").getString('staff.patron.holds.show_catalog.retrieving_title') },
content_params
);
function(ev) {
try {
var content_params = {
- 'show_nav_buttons' : false,
+ 'show_nav_buttons' : true,
'show_print_button' : true,
'passthru_content_params' : {
'authtoken' : ses(),
'authtime' : ses('authtime'),
'window_open' : function(a,b,c) {
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
return window.open(a,b,c);
} catch(E) {
obj.error.standard_unexpected_error_alert('window_open',E);
'patron_barcode' : obj.patron_barcode
},
'url_prefix' : xulG.url_prefix,
- 'url' : xulG.url_prefix(urls.browser)
+ 'url' : xulG.url_prefix('browser')
};
xulG.display_window.g.patron.right_deck.set_iframe( urls.XUL_REMOTE_BROWSER + '?patron_hold=1', {}, content_params);
} catch(E) {
}
dump('hold details UI ready\n');
}
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.browser');
obj.browser = new util.browser();
obj.browser.init(
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
</commandset>
<popupset id="holds_popupset">
- <popup id="holds_actions" position="at_pointer">
+ <menupopup id="holds_actions" position="at_pointer">
<menuitem command="sel_clip" label="&staff.circ.holds.copy_to_clipboard;" accesskey="&staff.circ.holds.copy_to_clipboard.accesskey;" />
<menuitem label="&staff.circ.holds.show_in_catalog;" command="cmd_show_catalog" accesskey="&staff.circ.holds.show_in_catalog.accesskey;"/>
<menuitem command="sel_copy_details" label="&staff.circ.holds.show_item_details;" accesskey="&staff.circ.holds.show_item_details.accesskey;" />
<menuitem id="holds_uncancel_btn" hidden="true" label="&staff.circ.holds.uncancel;" command="cmd_holds_uncancel" accesskey="&staff.circ.holds.uncancel.accesskey;"/>
<menuseparator />
<menuitem command="save_columns" label="&staff.circ.holds.save_columns;" accesskey="&staff.circ.holds.save_columns.accesskey;"/>
- </popup>
+ </menupopup>
</popupset>
</vbox>
<deck id="deck" flex="1">
<tree id="holds_list" flex="1" enableColumnDrag="true" context="holds_actions"/>
- <browser id="hold_detail_frame" src="" flex="1" autoscroll="false" />
+ <browser id="hold_detail_frame" src="" flex="1" autoscroll="false" oils_force_external="true" />
</deck>
<vbox flex="0">
<hbox id="holds_bottom_ui" />
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
if (! g.sel_list ) return;
try {
for (var i = 0; i < g.sel_list.length; i++) {
- var loc = xulG.url_prefix( urls.XUL_REMOTE_BROWSER );
+ var loc = xulG.url_prefix('XUL_REMOTE_BROWSER');
//+ '?url=' + window.escape( urls.XUL_PATRON_EDIT + '?ses='
//+ window.escape( ses() ) + '&clone=' + g.sel_list[i] );
if (typeof window.xulG == 'object' && typeof window.xulG.new_tab == 'function') xulG.new_tab(
for (var i in p) {
passthru[i] = p[i];
}
- var loc = xulG.url_prefix( urls.XUL_REMOTE_BROWSER ); // + '?url=' + window.escape( url );
+ var loc = xulG.url_prefix('XUL_REMOTE_BROWSER'); // + '?url=' + window.escape( url );
if (typeof window.xulG == 'object' && typeof window.xulG.new_tab == 'function') xulG.new_tab(
loc,
{},
}
var horizontal_interface = String( g.data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true';
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
var top_xml = '<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1" style="overflow: auto"><description>' + second_msg + '</description>';
top_xml += '<hbox><spacer flex="1"/><button label="'+$("patronStrings").getString('staff.patron.info_group.link_patron.move.label')+'"';
top_xml += ' accesskey="'+$("patronStrings").getString('staff.patron.info_group.link_patron.move.accesskey')+'" name="fancy_submit"/>';
xml += '<image src="/xul/server/skin/media/images/patron_left_arrow.png"/>';
}
xml += '</hbox>';
- xml += '<iframe style="min-height: 100px" flex="1" src="' + xulG.url_prefix( urls.XUL_PATRON_SUMMARY );
- xml += '?show_name=1&id=' + g.sel_list[i] + '"/>';
+ xml += '<iframe style="min-height: 100px" flex="1" src="' + xulG.url_prefix('XUL_PATRON_SUMMARY');
+ xml += '?show_name=1&id=' + g.sel_list[i] + '" oils_force_external="true"/>';
xml += '</vbox>';
xml += '<vbox flex="1">';
xml += '<hbox>';
xml += '<image src="/xul/server/skin/media/images/patron_left_arrow.png"/>';
}
xml += '<spacer flex="1"/></hbox>';
- xml += '<iframe style="min-height: 100px" flex="1" src="' + xulG.url_prefix( urls.XUL_PATRON_SUMMARY );
- xml += '?show_name=1&id=' + patron_b.id() + '"/>';
+ xml += '<iframe style="min-height: 100px" flex="1" src="' + xulG.url_prefix('XUL_PATRON_SUMMARY');
+ xml += '?show_name=1&id=' + patron_b.id() + '" oils_force_external="true"/>';
xml += '</vbox>';
/************/
if (horizontal_interface) {
</commandset>
<popupset id="info_group_popupset">
- <popup id="info_group_actions" position="at_pointer">
+ <menupopup id="info_group_actions" position="at_pointer">
<menuitem command="clone" />
<menuitem command="remove" />
<menuitem command="move" />
<menuitem command="add" />
<menuitem command="retrieve_p" />
<menuitem command="merge_p" />
- </popup>
+ </menupopup>
</popupset>
<vbox flex="1" class="my_overflow" id="group_panel">
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function new_note() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
var xml = '<groupbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1">';
xml += '<caption label="'+$("patronStrings").getString('staff.patron.info_notes.new_note.label')+'"/><grid flex="1"><columns><column/><column flex="1"/></columns><rows><row>';
xml += '<label value="'+$("patronStrings").getString('staff.patron.info_notes.new_note.patron_visible.value')+'"/><checkbox id="pub" name="fancy_data"/></row>';
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
alert($("patronStrings").getFormattedString('staff.patron.items.show_catalog.barcode_not_cataloged', [retrieve_ids[i].barcode]));
continue;
}
- var opac_url = xulG.url_prefix( urls.opac_rdetail ) + doc_id;
+ var opac_url = xulG.url_prefix('opac_rdetail') + doc_id;
var content_params = {
'session' : ses(),
'authtime' : ses('authtime'),
'opac_url' : opac_url
};
xulG.new_tab(
- xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+ xulG.url_prefix('XUL_OPAC_WRAPPER'),
{'tab_name': $("patronStrings").getString('staff.patron.items.show_catalog.retrieving_title')},
content_params
);
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
<popupset id="items_popupset">
- <popup id="items_actions" position="at_pointer">
+ <menupopup id="items_actions" position="at_pointer">
<menuitem command="sel_clip" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;"/>
<menuitem command="sel_bucket" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
<menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog" />
<menuitem label="&staff.patron.items_overlay.add_billing.label;" command="cmd_add_billing" />
<menuseparator />
<menuitem command="save_columns" label="&staff.patron.items_overlay.save_columns.label;"/>
- </popup>
- <popup id="items_actions2" position="at_pointer">
+ </menupopup>
+ <menupopup id="items_actions2" position="at_pointer">
<menuitem command="sel_clip2" label="&staff.patron.items_overlay.sel_clip.label;" accesskey="&staff.patron.items_overlay.sel_clip.accesskey;" />
<menuitem command="sel_bucket2" label="&staff.patron.items_overlay.sel_bucket.label;" accesskey="&staff.patron.items_overlay.sel_bucket.accesskey;"/>
<menuitem label="&staff.patron.items_overlay.show_catalog.label;" command="cmd_show_catalog2" />
<menuitem label="&staff.patron.items_overlay.add_billing.label;" command="cmd_add_billing2" />
<menuseparator />
<menuitem command="save_columns2" label="&staff.patron.items_overlay.save_columns.label;"/>
- </popup>
+ </menupopup>
</popupset>
}
function ui_setup() {
- netscape.security.PrivilegeManager.enablePrivilege(
- "UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( "The JSAN library object is missing.");
}
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
setTimeout(
function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
document.getElementById('family_name').focus();
} catch(E) {
g.error.sdump('D_ERROR','default_focus(): ' + js2JSON(E));
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
setTimeout(
function() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
document.getElementById('family_name').focus();
} catch(E) {
g.error.sdump('D_ERROR','default_focus(): ' + js2JSON(E));
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function staged_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
commonStrings = $('commonStrings');
patronStrings = $('patronStrings');
function spawn_editor(p,func) {
var url = urls.XUL_PATRON_EDIT;
- var loc = xulG.url_prefix( urls.XUL_REMOTE_BROWSER );
+ var loc = xulG.url_prefix('XUL_REMOTE_BROWSER');
xulG.new_tab(
loc,
{},
</groupbox>
<popupset id="stgu_popupset">
- <popup id="stgu_actions" position="at_pointer">
+ <menupopup id="stgu_actions" position="at_pointer">
<menuitem command="cmd_load" label="&staff.patron_display.staged.menu.actions.load.label;" accesskey="&staff.patron_display.menu.actions.load.accesskey;"/>
<menuitem command="cmd_cancel" label="&staff.patron_display.staged.menu.actions.cancel.label;" accesskey="&staff.patron_display.menu.actions.cancel.accesskey;"/>
- </popup>
+ </menupopup>
</popupset>
</window>
function penalty_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
commonStrings = document.getElementById('commonStrings');
patronStrings = document.getElementById('patronStrings');
function handle_apply_penalty(ev) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.window');
var win = new util.window();
var my_xulG = win.open(
function handle_edit_penalty(ev) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.window');
var win = new util.window();
</groupbox>
<popupset id="csp_popupset">
- <popup id="ausp_actions" position="at_pointer">
+ <menupopup id="ausp_actions" position="at_pointer">
<menuitem command="cmd_remove_penalty" label="&staff.patron_display.penalty.menu.actions.remove.label;" accesskey="&staff.patron_display.menu.actions.remove.accesskey;"/>
<menuitem command="cmd_edit_penalty" label="&staff.patron_display.penalty.menu.actions.edit.label;" accesskey="&staff.patron_display.menu.actions.edit.accesskey;"/>
<menuitem command="cmd_archive_penalty" label="&staff.patron_display.penalty.menu.actions.archive.label;" accesskey="&staff.patron_display.menu.actions.archive.accesskey;"/>
- </popup>
+ </menupopup>
</popupset>
</window>
function() {
//alert('setting shrink_state to ' + gb_content.hidden);
//caption.setAttribute('shrink_state',gb_content.hidden);
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('patron_id_shrink');
file.set_object(String(gb_content.hidden)); file.close();
}, 0
);
//var shrink_state = caption.getAttribute('shrink_state');
var shrink_state = false;
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.file'); var file = new util.file('patron_id_shrink');
if (file._file.exists()) {
shrink_state = file.get_object(); file.close();
function myObserver() { this.register(); }
myObserver.prototype = {
register: function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(this, "xul-overlay-merged", false);
},
unregister: function() {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.removeObserver(this, "xul-overlay-merged");
},
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function post_overlay() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
var patron_id = xul_param('id');
var patron_bc = xul_param('barcode');
</grid>
<popupset id="patron_summary_popups">
- <popup id="addr_export_popup" oncommand="export_address(event);">
+ <menupopup id="addr_export_popup" oncommand="export_address(event);">
<menuitem id="addr_export_copy" label="&staff.patron_display.address_export_popup.copy;"/>
<menuitem id="addr_export_print" label="&staff.patron_display.address_export_popup.print;"/>
- </popup>
+ </menupopup>
</popupset>
<groupbox id="PatronSummaryContact_mailing_address" orient="vertical">
</commandset>
<popupset id="patron_summary_popups">
- <popup id="group_actions" position="at_pointer">
+ <menupopup id="group_actions" position="at_pointer">
<menuitem command="group_tab_retrieve_patron"
label="&staff.patron.summary_overlay.group_tab.retrieve_patron.label;"
accesskey="&staff.patron.summary_overlay.group_tab.retrieve_patron.accesskey;" />
- </popup>
+ </menupopup>
</popupset>
<box id="patron_summary_main" flex="1" orient="vertical" class="my_overflow">
</vbox>
<popupset id="patron_summary_popups">
- <popup id="addr_export_popup" oncommand="export_address(event);">
+ <menupopup id="addr_export_popup" oncommand="export_address(event);">
<menuitem id="addr_export_copy" label="&staff.patron_display.address_export_popup.copy;"/>
<menuitem id="addr_export_print" label="&staff.patron_display.address_export_popup.print;"/>
- </popup>
+ </menupopup>
</popupset>
<vbox id="PatronSummaryContact_address">
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
/* load translatable strings for patron interfaces */
patronStrings = document.getElementById('patronStrings');
patron.util.merge = function(record_ids) {
var error;
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
JSAN.use('util.error'); error = new util.error();
JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve();
var horizontal_interface = String( data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true';
xml += '<tr valign="top">' + table_cell_with_lead_button( record_ids[i] );
}
xml += '<td nowrap="nowrap"><iframe style="' + iframe_css + '" flex="1" src="' + urls.XUL_PATRON_SUMMARY;
- xml += '?id=' + record_ids[i] + '&show_name=1"/></td>';
+ xml += '?id=' + record_ids[i] + '&show_name=1" oils_force_external="true"/></td>';
if (horizontal_interface) {
xml += '</tr>';
}
patron.util.work_log_patron_edit = function(p) {
var error;
try {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
JSAN.use('util.error'); error = new util.error();
error.work_log(
document.getElementById('patronStrings').getFormattedString(
"oncomplete": function(r) {
if ((r = openils.Util.readResponse(r)) && r.length) {
openils.XUL.newTabEasy(
- "/eg/serial/print_routing_list_users",
+ "SERIAL_PRINT_ROUTING_LIST_USERS",
S("print_routing_list_users"), {
"show_print_button": false, /* we supply one */
"routing_list_data": {
function my_init() {
var cgi = new openils.CGI();
-
+ var authtoken = (typeof ses == "function" ? ses() : 0) ||
+ cgi.param("ses") || dojo.cookie("ses");
+ if(!authtoken && openils.XUL.isXUL()) {
+ var stash = openils.XUL.getStash();
+ authtoken = stash.session.key;
+ }
batch_receiver = new BatchReceiver(
- (typeof ses == "function" ? ses() : 0) ||
- cgi.param("ses") || dojo.cookie("ses"),
+ authtoken,
cgi.param("docid") || null, cgi.param("subid") || null
);
}
/******************************************************************************************************/
/* setup JSAN and some initial libraries */
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( $('commonStrings').getString('common.jsan.missing') );
}
if (typeof serial == 'undefined') serial = {};
serial.manage_dists = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
} catch(E) {
dump('serial/manage_dists: ' + E + '\n');
'init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
obj.docid = params.docid;
var list = obj.ids_from_sel_list('sdist');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
-
JSAN.use('util.functional');
var sdist_list = util.functional.map_list(
+ '" accesskey="'
+ document.getElementById('catStrings').getString('staff.cat.copy_browser.transfer.cancel.accesskey')
+ '" name="fancy_cancel"/></hbox>';
- xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + obj.data.marked_library.docid + '"/>';
+ xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + obj.data.marked_library.docid + '" oils_force_external="true"/>';
xml += '</vbox>';
JSAN.use('OpenILS.data');
var data = new OpenILS.data(); data.init({'via':'stash'});
obj.data.temp_barcodes_for_labels = util.functional.map_list( list, function(o){return o.barcode();}) ;
obj.data.stash('temp_barcodes_for_labels');
xulG.new_tab(
- xulG.url_prefix( urls.XUL_SPINE_LABEL ),
+ xulG.url_prefix('XUL_SPINE_LABEL'),
{ 'tab_name' : document.getElementById('catStrings').getString('staff.cat.copy_browser.print_spine.tab') },
{}
);
'list_init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
JSAN.use('circ.util');
return row;
},
'on_click' : function(ev) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserRead');
var row = {}; var col = {}; var nobj = {};
obj.list.node.treeBoxObject.getCellAt(ev.clientX,ev.clientY,row,col,nobj);
if ((row.value == -1)||(nobj.value != 'twisty')) { return; } // on_click runs for twistys only
return;
}
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
</script>
<popupset>
- <popup id="serial_manage_dists_popup">
+ <menupopup id="serial_manage_dists_popup">
<menuitem command="cmd_add_sstr" label="&staff.serial.manage_dists.actions.cmd_add_sstr.label;"/>
<menuseparator/>
<menuitem command="cmd_delete_sstr" label="&staff.serial.manage_dists.actions.cmd_delete_sstr.label;"/>
<menuitem command="cmd_delete_siss" label="Delete Issuance"/>
<menuitem command="cmd_delete_scap" label="Delete Caption/Pattern"/>
-->
- </popup>
+ </menupopup>
</popupset>
<hbox flex="1">
try {
JSAN.use('util.window'); var win = new util.window();
var select_unit_window = win.open(
- xulG.url_prefix(urls.XUL_SERIAL_SELECT_UNIT),
+ xulG.url_prefix('XUL_SERIAL_SELECT_UNIT'),
'_blank',
'chrome,resizable,modal,centerscreen',
{'sdist_ids' : obj.sdist_ids}
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
]]>
</script>
<popupset>
- <popup id="serial_manage_items_popup">
+ <menupopup id="serial_manage_items_popup">
<menuitem command="cmd_edit_items" label="&staff.serial.manage_items.actions.cmd_edit_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_edit_items.accesskey;"/>
<menuitem command="cmd_reset_items" label="&staff.serial.manage_items.actions.cmd_reset_items.label;" />
<menuitem command="cmd_delete_items" label="&staff.serial.manage_items.actions.cmd_delete_items.label;" accesskey="&staff.serial.manage_items.actions.cmd_delete_items.accesskey;"/>
<menuitem command="cmd_view_sitem_notes" label="&staff.serial.manage_items.actions.cmd_view_sitem_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sitem_notes.accesskey;"/>
<menuitem command="cmd_view_sdist_notes" label="&staff.serial.manage_items.actions.cmd_view_sdist_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_sdist_notes.accesskey;"/>
<menuitem command="cmd_view_ssub_notes" label="&staff.serial.manage_items.actions.cmd_view_ssub_notes.label;" accesskey="&staff.serial.manage_items.actions.cmd_view_ssub_notes.accesskey;"/>
- </popup>
+ </menupopup>
</popupset>
<tabpanel id="serial_manage_items" orient="vertical" flex="1">
<hbox align="center">
if (typeof serial == 'undefined') serial = {};
serial.manage_subs = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
} catch(E) {
dump('serial/manage_subs: ' + E + '\n');
'init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
obj.docid = params.docid;
var list = obj.ids_from_sel_list('ssub');
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite');
-
JSAN.use('util.functional');
var ssub_list = util.functional.map_list(
+ '" accesskey="'
+ document.getElementById('catStrings').getString('staff.cat.copy_browser.transfer.cancel.accesskey')
+ '" name="fancy_cancel"/></hbox>';
- xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + obj.data.marked_library.docid + '"/>';
+ xml += '<iframe style="overflow: scroll" flex="1" src="' + urls.XUL_BIB_BRIEF + '?docid=' + obj.data.marked_library.docid + '" oils_force_external="true"/>';
xml += '</vbox>';
JSAN.use('OpenILS.data');
var data = new OpenILS.data(); data.init({'via':'stash'});
'list_init' : function( params ) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var obj = this;
JSAN.use('circ.util');
return row;
},
'on_click' : function(ev) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserRead');
var row = {}; var col = {}; var nobj = {};
obj.list.node.treeBoxObject.getCellAt(ev.clientX,ev.clientY,row,col,nobj);
if ((row.value == -1)||(nobj.value != 'twisty')) { return; } // on_click runs for twistys only
return;
}
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
</script>
<popupset>
- <popup id="serial_manage_subs_popup">
+ <menupopup id="serial_manage_subs_popup">
<menuitem command="cmd_add_subscriptions" label="Add Subscription"/>
<menuitem command="cmd_add_sdist" label="Add Distribution"/>
<menuitem command="cmd_add_siss" label="Add Issuance"/>
<menuitem command="cmd_delete_sdist" label="Delete Distribution"/>
<menuitem command="cmd_delete_siss" label="Delete Issuance"/>
<menuitem command="cmd_delete_scap" label="Delete Caption/Pattern"/>
- </popup>
+ </menupopup>
</popupset>
<hbox flex="1">
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( $("commonStrings").getString('common.jsan.missing') );
}
}
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect UniversalBrowserWrite");
value = value.replace(/\n/g, " "); // preserve newlines
var xml = '<groupbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" flex="1"> \
<caption label="' + label_text + '"/> \
if (typeof serial == 'undefined') serial = {};
serial.sbsum_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
JSAN.use('util.network'); this.network = new util.network();
if (typeof serial == 'undefined') serial = {};
serial.scap_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
JSAN.use('util.network'); this.network = new util.network();
obj.summarize(obj.scaps);
obj.render();
};
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
window.openDialog(
- xulG.url_prefix("/xul/server/serial/pattern_wizard.xul"),
+ xulG.url_prefix("XUL_SERIAL_PATTERN_WIZARD"),
"pattern_wizard",
"width=800",
onsubmit
if (typeof serial == 'undefined') serial = {};
serial.sdist_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
JSAN.use('util.network'); this.network = new util.network();
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') { throw( $("commonStrings").getString('common.jsan.missing') ); }
JSAN.errorLevel = "die"; // none, warn, or die
JSAN.addRepository('/xul/server/');
</commandset>
<!--<popupset>
- <popup id="serctrl_main_actions">
+ <menupopup id="serctrl_main_actions">
<menuitem command="cmd_add_items" label="&staff.cat.copy_browser.actions.cmd_add_items.label;" accesskey="&staff.cat.copy_browser.actions.cmd_add_items.accesskey;"/>
<menuitem command="cmd_edit_items" label="Edit Item Attributes" accesskey="&staff.cat.copy_browser.actions.cmd_edit_items.accesskey;"/>
<menuitem command="cmd_delete_items" label="Delete Item" accesskey="&staff.cat.copy_browser.actions.cmd_delete_items.accesskey;"/>
<menuseparator/>
<menuitem command="save_columns" label="&staff.cat.copy_browser.actions.save_columns.label;"/>
<menuitem command="cmd_refresh_list" label="&staff.cat.copy_browser.actions.cmd_refresh_list.label;" accesskey="&staff.cat.copy_browser.actions.cmd_refresh_list.accesskey;"/>
- </popup>
+ </menupopup>
</popupset> -->
<!-- <groupbox flex="1" class="my_overflow"> -->
if (typeof serial == 'undefined') serial = {};
serial.siss_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
JSAN.use('util.network'); this.network = new util.network();
if (typeof serial == 'undefined') serial = {};
serial.sisum_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
JSAN.use('util.network'); this.network = new util.network();
if (typeof serial == 'undefined') serial = {};
serial.sitem_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
JSAN.use('util.network'); this.network = new util.network();
<![CDATA[
function my_init() {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
if (typeof JSAN == 'undefined') {
throw( document.getElementById("commonStrings").getString('common.jsan.missing') );
}
if (typeof serial == 'undefined') serial = {};
serial.sssum_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
JSAN.use('util.network'); this.network = new util.network();
if (typeof serial == 'undefined') serial = {};
serial.sstr_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
JSAN.use('util.network'); this.network = new util.network();
if (typeof serial == 'undefined') serial = {};
serial.ssub_editor = function (params) {
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
JSAN.use('util.error'); this.error = new util.error();
} catch(E) {
dump('serial/ssub_editor: ' + E + '\n');
// Debugging aids. _dump_level = 4 enables all dump statements
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
if (prefs.prefHasUserValue('oils.dump_level')) {
_dump_level = prefs.getIntPref('oils.dump_level');
var _dump_prefix = '0';
try {
- netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
if (!prefs.prefHasUserValue('oils.unique_id')) {
prefs.setIntPref('oils.unique_id',Number(_dump_prefix));
!define MUI_WELCOMEFINISHPAGE_BITMAP "custom_images\${UI_IMAGESET}\install.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "custom_images\${UI_IMAGESET}\uninstall.bmp"
+; This should improve compression, and solves some zlib related issues with extensions
+SetCompressor /SOLID lzma
+
; MUI 1.67 compatible ------
!include "MUI.nsh"
--- /dev/null
+XULRunner / Firefox
+-------------------
+Support for later versions of XULRunner is included, which means that later
+improvements to XULRunner can be taken advantage of. This also means that the
+Firefox extension mode works in Firefox 3.6+, though some frequent tweaking
+will be needed due to the rapid Firefox major release schedule.
+
+The majority of the actual changes are backend changes, but there are some
+significant things to note for local customizations.
+
+Remote XUL
+~~~~~~~~~~
+Remote XUL no longer works in XULRunner/Firefox 4+, but to work around it a
+custom extension now creates an oils:// wrapper. Within the staff client that
+wrapper contains a "remote" host, from which server-side XUL can be loaded.
+
+Custom XUL pages stored on the server will need to reference the new wrapper
+to function.
+
+As a note: The new wrapper is used for all OPAC access and only talks SSL.
+
+enablePrivilege
+~~~~~~~~~~~~~~~
+The enablePrivilege command that would allow code to access various protected
+functionality is no longer available. Any code that depended upon it will need
+to be adjusted to use the oils:// wrapper created for Remote XUL.
+
+Cookies
+~~~~~~~
+Unfortunately, the oils:// wrapper has one less than useful effect. Any
+JavaScript loaded via it loses access to cookies. This is most notable when you
+are dealing with authtoken cookies. This only applies to JavaScript, however,
+and the server can still see the cookies when it gets requests.
+
+As a workaround you can load the data stash and fetch authtokens via it instead.
+This should always work when using the oils:// wrapper due to the elevated
+permission set it gets (nearly, if not equal to, local XUL).
+
+url_prefix
+~~~~~~~~~~
+Finally, as a useful feature, the url_prefix function is now slightly easier to
+use. Instead of needing to reference urls.SOMETHING you can instead just put the
+SOMETHING at the start of the url to prefix:
+
+url_prefix('SOMETHING/stuff.html')
+
+In this case SOMETHING can be terminated by the end of the string or up to the
+first instance of a slash (/), question mark (?), or pipe (|). The pipe is a
+special case and is removed during the replacement.
+
+For example, if urls.REPLACE were set to 'oils://remote/replace':
+
+url_prefix('REPLACE/stuff') becomes 'oils://remote/replace/stuff'
+url_prefix('REPLACE?query') becomes 'oils://remote/replace?query'
+url_prefix('RPLACE|ment') becomes 'oils://remote/replacement'
+
+The pipe is intended for cases where the urls entry may or may not already
+contain a query string, say for differences between OPACs where one requires
+that something be passed into the query string, but the other uses a path
+component instead.