From 47a1c1da5b5bb35c7b06935bc4df47df1a4e4f70 Mon Sep 17 00:00:00 2001 From: dbs Date: Wed, 9 Mar 2011 19:12:45 +0000 Subject: [PATCH] Draw pre-cataloged items (author and title) in My Account checkedout screen Two problems: FETCH_MODS_FROM_COPY returns an object, so we weren't getting to the point of fetching the raw copy itself, and there was some confusion about pre-cataloged vs. non-cataloged items that is hopefully straightened out now. Addresses LP # 723895 git-svn-id: svn://svn.open-ils.org/ILS/trunk@19659 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/skin/default/js/myopac.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index 12af1973c..6fd49f99c 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -285,10 +285,11 @@ function myOPACDrawCheckedTitle(r) { var record = r.getResultObject(); var circid = r.circ; - if(!record || checkILSEvent(record)) { + /* Draw pre-cataloged items */ + if(!record || checkILSEvent(record) || !(record.title() && record.author())) { var req = new Request( FETCH_COPY, r.copy ); - req.request.circ = circid - req.callback(myOPACDrawNonCatalogedItem); + req.request.circ = circid; + req.callback(myOPACDrawPreCatalogedItem); req.send(); return; } @@ -296,12 +297,13 @@ function myOPACDrawCheckedTitle(r) { var row = $('myopac_checked_row_ ' + circid); var tlink = $n( row, "myopac_checked_title_link" ); var alink = $n( row, "myopac_checked_author_link" ); + buildTitleDetailLink(record, tlink); buildSearchLink(STYPE_AUTHOR, record.author(), alink); __circ_titles[circid] = record.title(); } -function myOPACDrawNonCatalogedItem(r) { +function myOPACDrawPreCatalogedItem(r) { var copy = r.getResultObject(); var circid = r.circ; -- 2.11.0