onRecord uses findnode rather than getElementById.
authorMike Taylor <mike@indexdata.com>
Wed, 26 Mar 2014 12:06:43 +0000 (12:06 +0000)
committerMike Taylor <mike@indexdata.com>
Wed, 26 Mar 2014 12:06:43 +0000 (12:06 +0000)
That means its finding of the details element is team-specific.

src/mkws-team.js

index 8307cd9..dc22fd7 100644 (file)
@@ -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;
        }