[open-ils-commits] r19661 - branches/rel_1_6_2/Open-ILS/web/opac/skin/default/js (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Mar 9 14:17:21 EST 2011


Author: dbs
Date: 2011-03-09 14:17:17 -0500 (Wed, 09 Mar 2011)
New Revision: 19661

Modified:
   branches/rel_1_6_2/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
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


Modified: branches/rel_1_6_2/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- branches/rel_1_6_2/Open-ILS/web/opac/skin/default/js/myopac.js	2011-03-09 19:16:53 UTC (rev 19660)
+++ branches/rel_1_6_2/Open-ILS/web/opac/skin/default/js/myopac.js	2011-03-09 19:17:17 UTC (rev 19661)
@@ -280,10 +280,11 @@
 	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;
 	}
@@ -291,12 +292,13 @@
 	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;
 



More information about the open-ils-commits mailing list