From: Jason Etheridge Date: Tue, 12 Apr 2011 15:22:01 +0000 (-0400) Subject: fix Linked Titles -> Copy Details bug with closures and for/loop X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=61db504aa249cb17efe8d6a6e9fba3001fa2b241;p=evergreen%2Fequinox.git fix Linked Titles -> Copy Details bug with closures and for/loop --- 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); } }