From: Mike Taylor Date: Wed, 26 Mar 2014 12:06:43 +0000 (+0000) Subject: onRecord uses findnode rather than getElementById. X-Git-Tag: 1.0.0~1190 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=6e579300f4683bf1238100608c716cec57f7c756;p=mkws-moved-to-github.git onRecord uses findnode rather than getElementById. That means its finding of the details element is team-specific. --- diff --git a/src/mkws-team.js b/src/mkws-team.js index 8307cd9..dc22fd7 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -109,9 +109,8 @@ function team($, teamName) { log("record"); // FIXME: record is async!! clearTimeout(m_paz.recordTimer); - // ##### restrict to current team - var detRecordDiv = document.getElementById(recordDetailsId(data.recid[0])); - if (detRecordDiv) { + var detRecordDiv = findnode(recordDetailsId(data.recid[0])); + if (detRecordDiv.length) { // in case on_show was faster to redraw element return; }