fixed bug in format icons for record details page
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Jan 2006 22:25:10 +0000 (22:25 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 20 Jan 2006 22:25:10 +0000 (22:25 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2780 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/result_common.js

index 0560621..13dbd80 100644 (file)
@@ -301,7 +301,7 @@ function resultDisplayRecord(rec, pos, is_mr) {
                }
        }
 
-       resultBuildFormatIcons( r, rec );
+       resultBuildFormatIcons( r, rec, is_mr );
 
        unHideMe(r);
        
@@ -327,7 +327,7 @@ function _resultFindRec(id) {
 }
 
 
-function resultBuildFormatIcons( row, rec ) {
+function resultBuildFormatIcons( row, rec, is_mr ) {
 
        var ress = rec.types_of_resource();
 
@@ -346,11 +346,17 @@ function resultBuildFormatIcons( row, rec ) {
                }
 
                var args = {};
-               args.page = RRESULT;
                args[PARAM_OFFSET] = 0;
-               args[PARAM_MRID] = rec.doc_id();
                args[PARAM_FORM] = modsFormatToMARC(res);
 
+               if(is_mr) {
+                       args.page = RRESULT;
+                       args[PARAM_MRID] = rec.doc_id();
+               } else {
+                       args.page = RDETAIL
+                       args[PARAM_RID] = rec.doc_id();
+               }
+
                link.setAttribute("href", buildOPACLink(args));
 
        }