fix Linked Titles -> Copy Details bug with closures and for/loop
authorJason Etheridge <jason@esilibrary.com>
Tue, 12 Apr 2011 15:22:01 +0000 (11:22 -0400)
committerJason Etheridge <jason@esilibrary.com>
Tue, 12 Apr 2011 15:22:01 +0000 (11:22 -0400)
Open-ILS/web/opac/skin/default/js/rdetail.js

index 8197318..4b2984d 100644 (file)
@@ -269,11 +269,11 @@ function rdetailForeignItems(r,id) {
             },
             'Copy Details'
         );
-        details.onclick = function(idx){
+        details.onclick = function(idx,context_row){
             return function() {
                 cpdBuild(
                     tbody,
-                    row,
+                    context_row,
                     robj[idx],
                     null,
                     1,
@@ -289,7 +289,7 @@ function rdetailForeignItems(r,id) {
                     )
                 );
             };
-        }(i);
+        }(i,row);
         td3.appendChild(details);
     }
 }