7 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
8 if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
9 JSAN.errorLevel = "die"; // none, warn, or die
10 JSAN.addRepository('/xul/server/');
11 JSAN.use('util.error'); error = new util.error();
12 error.sdump('D_TRACE','my_init() for alternate_copy_summary.xul');
14 JSAN.use('util.network'); network = new util.network();
15 JSAN.use('OpenILS.data'); data = new OpenILS.data(); data.stash_retrieve();
16 JSAN.use('util.date');
19 var x = document.getElementById('patron_name');
24 var usr = ev.target.getAttribute('data');
25 if (usr) { window.xulG.new_patron_tab( {}, { 'id' : usr } ); }
30 var y = document.getElementById('prev_patron_name');
35 var usr = ev.target.getAttribute('data');
36 if (usr) { window.xulG.new_patron_tab( {}, { 'id' : usr } ); }
42 // timeout so xulG gets a chance to get pushed in
44 function () { xulG.from_item_details_new = false; load_item(); },
49 try { error.standard_unexpected_error_alert('main/test.xul',E); } catch(F) { alert(E); }
53 function set(name,value,data) {
54 if (typeof value == 'undefined' || typeof value == 'null') { return; }
55 var nodes = document.getElementsByAttribute('name',name);
56 for (var i = 0; i < nodes.length; i++) {
57 if (nodes[i].nodeName == 'button') {
58 nodes[i].setAttribute('label',value);
60 nodes[i].setAttribute('data',data);
62 nodes[i].setAttribute('data','');
65 nodes[i].setAttribute('value',value);
67 nodes[i].value = value;
71 function set_tooltip(name,value) {
72 if (typeof value == 'undefined' || typeof value == 'null') { return; }
73 var nodes = document.getElementsByAttribute('name',name);
74 for (var i = 0; i < nodes.length; i++) {
75 nodes[i].setAttribute('tooltiptext',value);
79 function renewal_composite_kludge(circ) {
80 // Only a corrupt database could give us a situation where more
81 // than one of these were true at a time, right?
82 if (circ.desk_renewal() == "t")
83 return document.getElementById('circStrings').getString(
84 'staff.circ.copy_details.desk_renewal'
86 else if (circ.opac_renewal() == "t")
87 return document.getElementById('circStrings').getString(
88 'staff.circ.copy_details.opac_renewal'
90 else if (circ.phone_renewal() == "t")
91 return document.getElementById('circStrings').getString(
92 'staff.circ.copy_details.phone_renewal'
97 function load_item() {
99 if (! xulG.barcode) return;
101 if (xulG.fetched_copy_details && xulG.fetched_copy_details[xulG.barcode]) {
102 var details = xulG.fetched_copy_details[xulG.barcode];
103 // We don't want to use these details more than once (i.e., we
104 // don't want cached data after things have potentially changed).
105 delete xulG.fetched_copy_details[xulG.barcode];
107 var details = network.simple_request('FM_ACP_DETAILS_VIA_BARCODE.authoritative', [ ses(), xulG.barcode ]);
108 // Should get back .mvr, .copy, .volume, .transit, .circ, .hold
111 if (typeof bib_brief_overlay == 'function') bib_brief_overlay( { 'mvr' : details.mvr, 'acp' : details.copy } );
113 set("stat_cat_entries", '');
114 set("age_protect", '');
115 set("alert_message", '');
117 set("call_number", '');
118 set("circ_as_type", '');
119 set("copy_circ_lib" , '');
120 set_tooltip("copy_circ_lib" , '');
121 set("circ_modifier", '');
122 set("circulate", '');
123 set("copy_number", '');
124 set("copy_create_date", '');
125 set("status_changed_time", '');
126 set("copy_creator", '');
129 set("deposit_amount", '');
130 set("dummy_author", '');
131 set("dummy_title", '');
132 set("copy_edit_date", '');
133 set("copy_editor", '');
134 set("fine_level", '');
137 set("loan_duration", '');
139 set_tooltip("location", '');
140 set("renewal_type", '');
141 set("opac_visible", '');
144 set("copy_status", '');
145 set_tooltip("copy_status", '');
147 set("stat_cat_entry_copy_maps", '');
148 set("circulations", '');
149 set("total_circ_count", '');
150 set_tooltip("total_circ_count", '');
151 set("total_circ_count_prev_year", '');
152 set("total_circ_count_curr_year", '');
156 set("stat_cat_entries", details.copy.stat_cat_entries());
157 set("age_protect", details.copy.age_protect());
158 set("alert_message", details.copy.alert_message());
159 set("barcode", details.copy.barcode());
160 if (typeof details.copy.call_number() == 'object') {
161 set("call_number", details.copy.call_number().label());
163 network.simple_request('FM_ACN_RETRIEVE.authoritative',[details.copy.call_number()], function(req) {
164 var acn_obj = req.getResultObject();
165 set("call_number", acn_obj.label());
168 set("circ_as_type", details.copy.circ_as_type());
169 set("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().shortname() : data.hash.aou[ details.copy.circ_lib() ].shortname());
170 set_tooltip("copy_circ_lib" , typeof details.copy.circ_lib() == 'object' ? details.copy.circ_lib().name() : data.hash.aou[ details.copy.circ_lib() ].name());
171 set("circ_modifier", details.copy.circ_modifier());
172 set("circulate", get_localized_bool( details.copy.circulate() ));
173 set("copy_number", details.copy.copy_number());
174 set("copy_create_date", util.date.formatted_date( details.copy.create_date(), '%{localized}' ));
175 set("status_changed_time", util.date.formatted_date( details.copy.status_changed_time(), '%{localized}' ));
176 set("copy_creator", details.copy.creator());
177 set("deleted", details.copy.deleted());
178 set("deposit", details.copy.deposit());
179 set("deposit_amount", details.copy.deposit_amount());
180 set("dummy_author", details.copy.dummy_author());
181 set("dummy_title", details.copy.dummy_title());
182 set("copy_edit_date", util.date.formatted_date( details.copy.edit_date(), '%{localized}' ));
183 set("copy_editor", details.copy.editor());
184 set("fine_level", cat.util.render_fine_level( details.copy.fine_level() ));
185 set("holdable", get_localized_bool( details.copy.holdable() ));
186 set("copy_id", details.copy.id());
187 set("loan_duration", cat.util.render_loan_duration( details.copy.loan_duration() ));
188 var copy_location = typeof details.copy.location() == 'object' ? details.copy.location() : data.lookup('acpl',details.copy.location());
189 set("location", copy_location.name());
190 set_tooltip("location", document.getElementById('circStrings').getFormattedString(
191 'staff.circ.copy_details.location_tooltip',
193 get_localized_bool( copy_location.circulate() ),
194 get_localized_bool( copy_location.holdable() ),
195 get_localized_bool( copy_location.hold_verify() ),
196 get_localized_bool( copy_location.opac_visible() )
199 set("opac_visible", get_localized_bool( details.copy.opac_visible() ));
200 set("price", details.copy.price());
201 set("ref", get_localized_bool( details.copy.ref() ));
202 var copy_status = typeof details.copy.status() == 'object' ? details.copy.status() : data.hash.ccs[ details.copy.status() ];
203 set("copy_status", copy_status.name() );
204 set_tooltip("copy_status", document.getElementById('circStrings').getFormattedString(
205 'staff.circ.copy_details.copy_status_tooltip',
207 get_localized_bool( copy_status.opac_visible() ),
208 get_localized_bool( copy_status.holdable() )
211 set("notes", details.copy.notes());
212 set("stat_cat_entry_copy_maps", details.copy.stat_cat_entry_copy_maps());
213 set("circulations", details.copy.circulations());
214 set("holds", details.copy.holds());
216 network.simple_request('FM_CIRC_IMPROVED_COUNT_VIA_COPY', [ses(), { 'copy' : details.copy.id() } ], function(req) {
217 var r = req.getResultObject();
218 var total = 0; var tooltip = ''; var year = {};
219 for (var i = 0; i < r.length; i++) {
220 total += Number( r[i].count() );
221 if (typeof year[ r[i].year() ] == 'undefined') year[ r[i].year() ] = 0;
222 year[ r[i].year() ] += Number( r[i].count() ); // Add original circs and renewals together
224 set( 'total_circ_count', total );
225 var curr_year = (new Date()).getFullYear();
226 var prev_year = curr_year - 1;
227 set( 'total_circ_count_curr_year', year[ curr_year ] || 0 );
228 set( 'total_circ_count_prev_year', year[ prev_year ] || 0 );
229 var keys = []; for (var i in year) { keys.push( i ); }; keys.sort();
230 for (var i = 0; i < keys.length; i++) {
231 tooltip += document.getElementById('circStrings').getFormattedString(
232 'staff.circ.copy_details.circ_count_by_year', [
233 keys[i] == -1 ? document.getElementById('circStrings').getString('staff.circ.copy_details.circ_count_by_year.legacy_label') : keys[i],
238 set_tooltip( 'total_circ_count', tooltip );
243 set("volume_create_date", '');
244 set("volume_creator", '');
246 set("volume_edit_date", '');
247 set("volume_editor", '');
248 set("volume_id", '');
250 set("owning_lib" , '');
251 set_tooltip("owning_lib" , '');
257 if (details.volume) {
258 set("copies", details.volume.copies());
259 set("volume_create_date", util.date.formatted_date( details.volume.create_date(), '%{localized}' ));
260 set("volume_creator", details.volume.creator());
261 set("deleted", details.volume.deleted());
262 set("volume_edit_date", util.date.formatted_date( details.volume.edit_date(), '%{localized}' ));
263 set("volume_editor", details.volume.editor());
264 set("volume_id", details.volume.id());
265 set("label", details.volume.label());
266 set("owning_lib" , typeof details.volume.owning_lib() == 'object' ? details.volume.owning_lib().shortname() : data.hash.aou[ details.volume.owning_lib() ].shortname());
267 set_tooltip("owning_lib" , typeof details.volume.owning_lib() == 'object' ? details.volume.owning_lib().name() : data.hash.aou[ details.volume.owning_lib() ].name());
268 set("record", details.volume.record());
269 set("notes", details.volume.notes());
270 set("uri_maps", details.volume.uri_maps());
271 set("uris", details.volume.uris());
274 set("transit_copy_status", '');
275 set_tooltip("transit_copy_status", '');
277 set("dest_recv_time", '');
278 set("transit_id", '');
279 set("persistant_transfer", '');
282 set("source_send_time", '');
283 set("target_copy", '');
284 set("hold_transit_copy", '');
286 if (details.transit) {
287 var transit_copy_status = typeof details.transit.copy_status() == 'object' ? details.transit.copy_status() : data.hash.ccs[ details.transit.copy_status() ];
288 set("transit_copy_status", transit_copy_status.name() );
289 set_tooltip("transit_copy_status", document.getElementById('circStrings').getFormattedString(
290 'staff.circ.copy_details.copy_status_tooltip',
292 get_localized_bool( transit_copy_status.opac_visible() ),
293 get_localized_bool( transit_copy_status.holdable() )
296 set("dest", details.transit.dest());
297 set("dest_recv_time", util.date.formatted_date( details.transit.dest_recv_time(), '%{localized}' ));
298 set("transit_id", details.transit.id());
299 set("persistant_transfer", details.transit.persistant_transfer());
300 set("prev_hop", details.transit.prev_hop());
301 set("source", details.transit.source());
302 set("source_send_time", util.date.formatted_date( details.transit.source_send_time(), '%{localized}' ));
303 set("target_copy", details.transit.target_copy());
304 set("hold_transit_copy", details.transit.hold_transit_copy());
307 set("checkin_lib", '');
308 set_tooltip("checkin_lib", '');
309 set("checkin_workstation","");
310 set("checkin_staff", '');
311 set("checkin_time", '');
312 set("checkin_scan_time", '');
313 set("circ_circ_lib" , '');
314 set_tooltip("circ_circ_lib" , '');
315 set("circ_staff", '');
316 set("desk_renewal", '');
319 set("duration_rule", '');
320 set("fine_interval", '');
323 set("max_fine_rule", '');
324 set("opac_renewal", '');
325 set("phone_renewal", '');
326 set("recurring_fine", '');
327 set("recurring_fine_rule", '');
328 set("renewal_remaining", '');
329 set("stop_fines", '');
330 set("stop_fines_time", '');
331 set("target_copy", '');
333 set("xact_finish", '');
334 set("xact_start", '');
335 set("create_time", '');
336 set("workstation", '');
337 set("renewal_workstation", '');
338 set("checkout_workstation", '');
341 set("billable_transaction", '');
342 set("circ_type", '');
343 set("billing_total", '');
344 set("payment_total", '');
345 set("patron_name", '');
346 set("prev_patron_name", '');
347 set("prev_num_circs", '');
348 set("prev_num_renewals", '');
349 set("prev_xact_start", '');
350 set("prev_checkout_workstation", '');
351 set("prev_renewal_time", '');
352 set("prev_stop_fines", '');
353 set("prev_stop_fines_time", '');
354 set("prev_renewal_workstation", '');
355 set("prev_checkin_workstation", '');
356 set("prev_last_checkin_time", '');
357 set("prev_last_checkin_scan_time", '');
360 try { set("checkin_lib", typeof details.circ.checkin_lib() == 'object' ? details.circ.checkin_lib().shortname() : data.hash.aou[ details.circ.checkin_lib() ].shortname() ); } catch(E) {};
361 try { set_tooltip("checkin_lib", typeof details.circ.checkin_lib() == 'object' ? details.circ.checkin_lib().name() : data.hash.aou[ details.circ.checkin_lib() ].name() ); } catch(E) {};
362 if (details.circ.checkin_workstation()) {
363 set("checkin_workstation", details.circ.checkin_workstation().name());
365 set("checkin_staff", details.circ.checkin_staff());
366 set("checkin_time", util.date.formatted_date( details.circ.checkin_time(), '%{localized}' ));
367 set("checkin_scan_time", util.date.formatted_date( details.circ.checkin_scan_time(), '%{localized}' ));
368 try { set("circ_circ_lib" , typeof details.circ.circ_lib() == 'object' ? details.circ.circ_lib().shortname() : data.hash.aou[ details.circ.circ_lib() ].shortname() ); } catch(E) {};
369 try { set_tooltip("circ_circ_lib" , typeof details.circ.circ_lib() == 'object' ? details.circ.circ_lib().name() : data.hash.aou[ details.circ.circ_lib() ].name() ); } catch(E) {};
370 set("circ_staff", details.circ.circ_staff());
371 set("desk_renewal", details.circ.desk_renewal());
372 set("due_date", util.date.formatted_date( details.circ.due_date(), '%{localized}' ));
373 set("duration", details.circ.duration());
374 set("fine_interval", details.circ.fine_interval());
375 set("circ_id", details.circ.id());
376 set("max_fine", details.circ.max_fine());
377 set("opac_renewal", details.circ.opac_renewal());
378 set("phone_renewal", details.circ.phone_renewal());
379 set("renewal_type", renewal_composite_kludge(details.circ));
380 set("recurring_fine", details.circ.recurring_fine());
381 set("renewal_remaining", details.circ.renewal_remaining());
382 set("stop_fines", details.circ.stop_fines());
383 set("stop_fines_time", util.date.formatted_date( details.circ.stop_fines_time(), '%{localized}' ));
384 set("target_copy", details.circ.target_copy());
385 set("circ_usr", details.circ.usr());
386 network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ ses(), details.circ.usr() ], function(preq) {
387 var r_au = preq.getResultObject();
388 JSAN.use('patron.util');
391 patron.util.format_name( r_au ) + ' : ' + r_au.card().barcode(),
395 set("xact_finish", util.date.formatted_date( details.circ.xact_finish(), '%{localized}' ));
396 set("xact_start", util.date.formatted_date( details.circ.xact_start(), '%{localized}' ));
397 set("create_time", util.date.formatted_date( details.circ.create_time(), '%{localized}' ));
398 set("workstation", details.circ.workstation());
399 if (get_bool(details.circ.opac_renewal())||get_bool(details.circ.phone_renewal())||get_bool(details.circ.desk_renewal())) {
400 set("renewal_workstation", (typeof details.circ.workstation() == 'object' && details.circ.workstation() != null) ? details.circ.workstation().name() : details.circ.workstation() );
401 network.simple_request('FM_CIRC_CHAIN_SUMMARY', [ses(), details.circ.id() ], function(req) {
403 var summary = req.getResultObject();
404 set("num_circs", summary.num_circs());
405 set("num_renewals", Number(summary.num_circs()) - 1);
406 set("xact_start", util.date.formatted_date( summary.start_time(), '%{localized}' ));
407 set("checkout_workstation", summary.checkout_workstation());
408 set("renewal_time", util.date.formatted_date( summary.last_renewal_time(), '%{localized}' ));
409 set("stop_fines", summary.last_stop_fines());
410 set("stop_fines_time", util.date.formatted_date( summary.last_stop_fines_time(), '%{localized}' ));
411 set("renewal_workstation", summary.last_renewal_workstation());
412 set("checkin_workstation", summary.last_checkin_workstation());
413 set("last_checkin_time", util.date.formatted_date( summary.last_checkin_time(), '%{localized}' ));
414 set("last_checkin_scan_time", util.date.formatted_date( summary.last_checkin_scan_time(), '%{localized}' ));
416 alert('Error in alternate_copy_summary.js, FM_CIRC_CHAIN: ' + E);
420 set("checkout_workstation", (typeof details.circ.workstation() == 'object' && details.circ.workstation() != null) ? details.circ.workstation().name() : details.circ.workstation() );
422 network.simple_request('FM_CIRC_PREV_CHAIN_SUMMARY', [ses(), details.circ.id() ], function(req) {
424 var robj = req.getResultObject();
425 if (!robj || typeof robj == 'null') { return; }
426 var summary = robj['summary'];
427 network.simple_request('FM_AU_FLESHED_RETRIEVE_VIA_ID',[ ses(), robj['usr'] ], function(preq) {
428 var r_au = preq.getResultObject();
429 JSAN.use('patron.util');
432 patron.util.format_name( r_au ) + ' : ' + r_au.card().barcode(),
436 set("prev_num_circs", summary.num_circs());
437 set("prev_num_renewals", Number(summary.num_circs()) - 1);
438 set("prev_xact_start", util.date.formatted_date( summary.start_time(), '%{localized}' ));
439 set("prev_checkout_workstation", summary.checkout_workstation());
440 set("prev_renewal_time", util.date.formatted_date( summary.last_renewal_time(), '%{localized}' ));
441 set("prev_stop_fines", summary.last_stop_fines());
442 set("prev_stop_fines_time", util.date.formatted_date( summary.last_stop_fines_time(), '%{localized}' ));
443 set("prev_renewal_workstation", summary.last_renewal_workstation());
444 set("prev_checkin_workstation", summary.last_checkin_workstation());
445 set("prev_last_checkin_time", util.date.formatted_date( summary.last_checkin_time(), '%{localized}' ));
446 set("prev_last_checkin_scan_time", util.date.formatted_date( summary.last_checkin_scan_time(), '%{localized}' ));
448 alert('Error in alternate_copy_summary.js, FM_CIRC_PREV_CHAIN: ' + E);
451 set("billings", details.circ.billings());
452 set("payments", details.circ.payments());
453 set("billable_transaction", details.circ.billable_transaction());
454 set("circ_type", details.circ.circ_type());
455 set("billing_total", details.circ.billing_total());
456 set("payment_total", details.circ.payment_total());
457 if (! details.circ.checkin_time() ) {
458 set("recurring_fine_rule", document.getElementById('circStrings').getFormattedString(
459 'staff.circ.copy_details.recurring_fine_rule_format',
461 details.circ.recurring_fine_rule().name(),
462 details.circ.recurring_fine_rule().id(),
463 details.circ.recurring_fine_rule().low(),
464 details.circ.recurring_fine_rule().normal(),
465 details.circ.recurring_fine_rule().high(),
466 details.circ.recurring_fine_rule().recurrence_interval()
469 set_tooltip("recurring_fine_rule", document.getElementById('circStrings').getFormattedString(
470 'staff.circ.copy_details.recurring_fine_rule_tooltip_format',
472 details.circ.recurring_fine_rule().name(),
473 details.circ.recurring_fine_rule().id(),
474 details.circ.recurring_fine_rule().low(),
475 details.circ.recurring_fine_rule().normal(),
476 details.circ.recurring_fine_rule().high(),
477 details.circ.recurring_fine_rule().recurrence_interval()
480 set("duration_rule", document.getElementById('circStrings').getFormattedString(
481 'staff.circ.copy_details.duration_rule_format',
483 details.circ.duration_rule().name(),
484 details.circ.duration_rule().id(),
485 details.circ.duration_rule().shrt(),
486 details.circ.duration_rule().normal(),
487 details.circ.duration_rule().extended(),
488 details.circ.duration_rule().max_renewals()
491 set_tooltip("duration_rule", document.getElementById('circStrings').getFormattedString(
492 'staff.circ.copy_details.duration_rule_tooltip_format',
494 details.circ.duration_rule().name(),
495 details.circ.duration_rule().id(),
496 details.circ.duration_rule().shrt(),
497 details.circ.duration_rule().normal(),
498 details.circ.duration_rule().extended(),
499 details.circ.duration_rule().max_renewals()
502 set("max_fine_rule", document.getElementById('circStrings').getFormattedString(
503 'staff.circ.copy_details.max_fine_rule_format',
505 details.circ.max_fine_rule().name(),
506 details.circ.max_fine_rule().id(),
507 details.circ.max_fine_rule().amount(),
508 details.circ.max_fine_rule().is_percent()
511 set_tooltip("max_fine_rule", document.getElementById('circStrings').getFormattedString(
512 'staff.circ.copy_details.max_fine_rule_tooltip_format',
514 details.circ.max_fine_rule().name(),
515 details.circ.max_fine_rule().id(),
516 details.circ.max_fine_rule().amount(),
517 details.circ.max_fine_rule().is_percent()
523 set("hold_status", '');
525 set("capture_time", '');
526 set("current_copy", '');
527 set("email_notify", '');
528 set("expire_time", '');
529 set("fulfillment_lib", '');
530 set_tooltip("fulfillment_lib", '');
531 set("fulfillment_staff", '');
532 set("fulfillment_time", '');
533 set("hold_type", '');
534 set("holdable_formats", '');
536 set("phone_notify", '');
537 set("pickup_lib", '');
538 set_tooltip("pickup_lib", '');
539 set("prev_check_time", '');
540 set("request_lib", '');
541 set_tooltip("request_lib", '');
542 set("request_time", '');
543 set("requestor", '');
544 set("selection_depth", '');
545 set("selection_ou", '');
546 set_tooltip("selection_ou", '');
549 set("cancel_time", '');
550 set("notify_time", '');
551 set("notify_count", '');
552 set("notifications", '');
554 set("eligible_copies", '');
556 set("thaw_date", '');
557 set("shelf_time", '');
558 set("cancel_cause", '');
559 set("cancel_note", '');
563 set("hold_status", details.hold.status());
564 set("transit", details.hold.transit());
565 set("capture_time", util.date.formatted_date( details.hold.capture_time(), '%{localized}' ));
566 set("current_copy", details.hold.current_copy());
567 set("email_notify", details.hold.email_notify());
568 set("expire_time", util.date.formatted_date( details.hold.expire_time(), '%{localized}' ));
569 try { set("fulfillment_lib" , typeof details.hold.fulfillment_lib() == 'object' ? details.hold.fulfillment_lib().shortname() : data.hash.aou[ details.hold.fulfillment_lib() ].shortname() ); } catch(E) {}
570 try { set_tooltip("fulfillment_lib" , typeof details.hold.fulfillment_lib() == 'object' ? details.hold.fulfillment_lib().name() : data.hash.aou[ details.hold.fulfillment_lib() ].name() ); } catch(E) {}
571 set("fulfillment_staff", details.hold.fulfillment_staff());
572 set("fulfillment_time", util.date.formatted_date( details.hold.fulfillment_time(), '%{localized}' ));
573 set("hold_type", details.hold.hold_type());
574 set("holdable_formats", details.hold.holdable_formats());
575 set("hold_id", details.hold.id());
576 set("phone_notify", details.hold.phone_notify());
577 try { set("pickup_lib" , typeof details.hold.pickup_lib() == 'object' ? details.hold.pickup_lib().shortname() : data.hash.aou[ details.hold.pickup_lib() ].shortname() ); } catch(E) {}
578 try { set_tooltip("pickup_lib" , typeof details.hold.pickup_lib() == 'object' ? details.hold.pickup_lib().name() : data.hash.aou[ details.hold.pickup_lib() ].name() ); } catch(E) {}
579 set("prev_check_time", util.date.formatted_date( details.hold.prev_check_time(), '%{localized}' ));
580 try { set("request_lib" , typeof details.hold.request_lib() == 'object' ? details.hold.request_lib().shortname() : data.hash.aou[ details.hold.request_lib() ].shortname() ); } catch(E) {}
581 try { set_tooltip("request_lib" , typeof details.hold.request_lib() == 'object' ? details.hold.request_lib().name() : data.hash.aou[ details.hold.request_lib() ].name() ); } catch(E) {}
582 set("request_time", util.date.formatted_date( details.hold.request_time(), '%{localized}' ));
583 set("requestor", details.hold.requestor());
584 set("selection_depth", details.hold.selection_depth());
585 set("selection_ou" , typeof details.hold.selection_ou() == 'object' ? details.hold.selection_ou().shortname() : data.hash.aou[ details.hold.selection_ou() ].shortname() );
586 set_tooltip("selection_ou" , typeof details.hold.selection_ou() == 'object' ? details.hold.selection_ou().name() : data.hash.aou[ details.hold.selection_ou() ].name() );
587 set("target", details.hold.target());
588 set("hold_usr", details.hold.usr());
589 set("cancel_time", util.date.formatted_date( details.hold.cancel_time(), '%{localized}' ));
590 set("notify_time", util.date.formatted_date( details.hold.notify_time(), '%{localized}' ));
591 set("notify_count", details.hold.notify_count());
592 set("notifications", details.hold.notifications());
593 set("bib_rec", details.hold.bib_rec());
594 set("eligible_copies", details.hold.eligible_copies());
595 set("frozen", details.hold.frozen());
596 set("thaw_date", util.date.formatted_date( details.hold.thaw_date(), '%{localized}' ));
597 set("shelf_time", util.date.formatted_date( details.hold.shelf_time(), '%{localized}' ));
598 set("cancel_cause", details.hold.cancel_cause());
599 set("cancel_note", details.hold.cancel_note());
600 set("notes", details.hold.notes());
603 var x = document.getElementById('cat_deck');
605 JSAN.use('util.deck');
606 var d = new util.deck('cat_deck');
607 d.reset_iframe( urls.XUL_MARC_VIEW, {}, { 'docid' : details.mvr ? details.mvr.doc_id() : -1 } );