5 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
6 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
7 JSAN.errorLevel = "die"; // none, warn, or die
8 JSAN.addRepository('/xul/server/');
9 JSAN.use('util.error'); error = new util.error();
10 error.sdump('D_TRACE','my_init() for missing_pieces.xul');
12 JSAN.use('util.network');
13 var network = new util.network();
15 // Why the indirection of missing_pieces.xul instead of calling window.prompt in chrome/content/main/menu.js directly?
16 // So we can get free remote upgrades of the logic behind cat.util.mark_item_as_missing_pieces, since I can't call
17 // JSAN.use('cat.util'); in menu.js
18 var barcode = window.prompt(
19 $("circStrings").getString('staff.circ.missing_pieces.scan_item.prompt'),
21 $("circStrings").getString('staff.circ.missing_pieces.scan_item.title')
30 copy = network.simple_request('FM_ACP_RETRIEVE_VIA_BARCODE',[ barcode ]);
31 if (typeof copy.ilsevent != 'undefined') throw(copy);
32 if (!copy) throw(copy);
34 alert($("circStrings").getFormattedString('staff.circ.missing_pieces.scan_item.error_alert', [barcode]) + '\n');
40 cat.util.mark_item_as_missing_pieces( [ copy.id() ] );
44 try { error.standard_unexpected_error_alert('circ/missing_pieces.xul',E); } catch(F) { alert(E); }