if (xulG.ahr_id) fetch_and_render_all();
+ if (xul_param('when_done')) {
+ xul_param('when_done')();
+ }
+
} catch(E) {
try { g.error.standard_unexpected_error_alert('/xul/server/patron/hold_notices.xul',E); } catch(E) { alert('FIXME: ' + js2JSON(E)); }
}
},
}
);
+ dump('hold details init_list done\n');
}
function a_list_of_one() {
- g.list.clear();
- g.list.append(
- {
- 'row' : {
- 'my' : {
- 'ahr' : g.ahr,
- 'status' : g.blob.status,
- 'acp' : g.blob.copy,
- 'acn' : g.blob.volume,
- 'mvr' : g.blob.mvr,
- 'patron_family_name' : g.blob.patron_last,
- 'patron_first_given_name' : g.blob.patron_first,
- 'patron_barcode' : g.blob.patron_barcode,
- 'total_holds' : g.blob.total_holds,
- 'queue_position' : g.blob.queue_position,
- 'potential_copies' : g.blob.potential_copies,
- 'estimated_wait' : g.blob.estimated_wait,
- 'ahrn_count' : g.blob.hold.notes().length,
- 'blob' : g.blob
- }
- },
- 'no_auto_select' : true,
- }
- );
+ try {
+ g.list.clear();
+ g.list.append(
+ {
+ 'row' : {
+ 'my' : {
+ 'ahr' : g.ahr,
+ 'status' : g.blob.status,
+ 'acp' : g.blob.copy,
+ 'acn' : g.blob.volume,
+ 'mvr' : g.blob.mvr,
+ 'patron_family_name' : g.blob.patron_last,
+ 'patron_first_given_name' : g.blob.patron_first,
+ 'patron_barcode' : g.blob.patron_barcode,
+ 'total_holds' : g.blob.total_holds,
+ 'queue_position' : g.blob.queue_position,
+ 'potential_copies' : g.blob.potential_copies,
+ 'estimated_wait' : g.blob.estimated_wait,
+ 'ahrn_count' : g.blob.hold.notes().length,
+ 'blob' : g.blob
+ }
+ },
+ 'no_auto_select' : true,
+ }
+ );
+ } catch(E) {
+ alert('Error in hold_details.js, a_list_of_one(): ' + E);
+ }
}
function retrieve_notifications() {
obj.controller.view.cmd_holds_edit_request_date.setAttribute('disabled','false');
obj.controller.view.cmd_holds_activate.setAttribute('disabled','false');
obj.controller.view.cmd_holds_suspend.setAttribute('disabled','false');
- obj.controller.view.cmd_alt_view.setAttribute('disabled','false');
+ obj.controller.view.cmd_alt_view.setAttribute('rendering_rows','false');
+ if (obj.controller.view.cmd_alt_view.getAttribute('ready')=='true') {
+ obj.controller.view.cmd_alt_view.setAttribute('disabled','false');
+ }
obj.controller.view.cmd_holds_retarget.setAttribute('disabled','false');
obj.controller.view.cmd_holds_cancel.setAttribute('disabled','false');
obj.controller.view.cmd_holds_uncancel.setAttribute('disabled','false');
obj.controller.view.cmd_holds_activate.setAttribute('disabled','true');
obj.controller.view.cmd_holds_suspend.setAttribute('disabled','true');
obj.controller.view.cmd_alt_view.setAttribute('disabled','true');
+ obj.controller.view.cmd_alt_view.setAttribute('rendering_rows','true');
obj.controller.view.cmd_holds_retarget.setAttribute('disabled','true');
obj.controller.view.cmd_holds_cancel.setAttribute('disabled','true');
obj.controller.view.cmd_holds_uncancel.setAttribute('disabled','true');
}, 0
);
+ $('cmd_alt_view').setAttribute('disabled','true');
+ xulG.when_done = function() {
+ $('cmd_alt_view').setAttribute('ready','true');
+ if ($('cmd_alt_view').getAttribute('rendering_rows') != 'true') {
+ $('cmd_alt_view').setAttribute('disabled','false');
+ }
+ dump('hold details UI ready\n');
+ }
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
JSAN.use('util.browser');
obj.browser = new util.browser();
'push_xulG' : true,
'alt_print' : false,
'browser_id' : 'hold_detail_frame',
- 'passthru_content_params' : xulG,
+ 'passthru_content_params' : xulG
}
);
accesskey="&staff.circ.holds.title_transfer.accesskey;" />
<command id="cmd_search_opac" />
<command id="save_columns" />
- <command id="cmd_alt_view" />
+ <command id="cmd_alt_view" disabled="true"/>
<command id="cmd_cancelled_holds_view" />
<command id="cmd_uncancelled_holds_view" />
<command id="cmd_view_expired_onshelf_holds"