Draw pre-cataloged items (author and title) in My Account checkedout screen
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Mar 2011 19:12:45 +0000 (19:12 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Mar 2011 19:12:45 +0000 (19:12 +0000)
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

index 12af197..6fd49f9 100644 (file)
@@ -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;