From 61db504aa249cb17efe8d6a6e9fba3001fa2b241 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Tue, 12 Apr 2011 11:22:01 -0400 Subject: [PATCH] fix Linked Titles -> Copy Details bug with closures and for/loop --- Open-ILS/web/opac/skin/default/js/rdetail.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js index 8197318834..4b2984d6f2 100644 --- a/Open-ILS/web/opac/skin/default/js/rdetail.js +++ b/Open-ILS/web/opac/skin/default/js/rdetail.js @@ -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); } } -- 2.11.0