The sequence of events for printing an address label is as follows.
Staff client Code in the util/print.js file builds an HTML page of the
address label. The page includes two vital components, 1) a source tag
to pull 'print_win.js' file from the server, and 2) an onload event
handler bound to the body tag to execute a 'print_init()' function that
is defined in the source tag.
However, print_init() is undefined because the source tag contains a
badly formed URL. It needs to be prefixed by 'oils://remote' so that the
new 'oils:' protocol can be used to pull the file remotely from the
server.
Signed-off-by: Steven Chan <schan@sitka.bclibraries.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
if(!params.type) {
params.type = '';
}
- var my_prefix = '/xul/server/';
+ var my_prefix = 'oils://remote/xul/server/';
if(window.location.protocol == "chrome:") {
// Likely in offline interface
my_prefix = 'chrome://open_ils_staff_client/content/';