if ( typeof KOHA == "undefined" || !KOHA ) { var KOHA = {}; } KOHA.RecordedBooks = new function() { var svc_url = '/cgi-bin/koha/svc/recordedbooks'; var error_div = $('
'); function display_error ( error ) { error_div.text(error); } var details = null; function is_identified() { return details ? details.is_identified : false; } var checkout_popup = null; $( document ).ready(function() { checkout_popup = $("#recordedbooks-checkout"); }); function display_account (container, data) { if (!data.is_identified) { return; } if (data.checkouts) { var checkouts_div = $('
').html('

' + MSG_CHECKOUTS + '

'); var items = data.checkouts.items; var checkouts_list; if (items.length == 0) { checkouts_list = MSG_NO_CHECKOUTS; } else { checkouts_list = $('