From 380185d8810a5ae4b18cd3695b70d7de0f729ec1 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 24 Mar 2014 17:39:12 +0000 Subject: [PATCH] mkwsDet elements now also move the team to a CSS class. --- tools/htdocs/mkws.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 02b0b55..ed64173 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -538,7 +538,8 @@ function team($, teamName) { // FIXME: record is async!! clearTimeout(m_paz.recordTimer); // in case on_show was faster to redraw element - var detRecordDiv = document.getElementById('mkwsDet_' + teamName + '_' + data.recid); + // ##### restrict to current team + var detRecordDiv = document.getElementById('mkwsDet_' + data.recid); if (detRecordDiv) return; m_currentRecordData = data; var recordDiv = findnode(recordElementId(m_currentRecordData.recid[0])); @@ -783,7 +784,8 @@ function team($, teamName) { m_currentRecordId = recId; // remove current detailed view if any - var detRecordDiv = document.getElementById('mkwsDet_' + m_teamName + '_' + oldRecordId); + // ##### restrict to current team + var detRecordDiv = document.getElementById('mkwsDet_' + oldRecordId); // lovin DOM! if (detRecordDiv) detRecordDiv.parentNode.removeChild(detRecordDiv); @@ -1057,7 +1059,7 @@ function team($, teamName) { { var template = loadTemplate("Record"); var details = template(data); - return '
' + details + '
'; + return '
' + details + '
'; } that.renderDetails = renderDetails; -- 1.7.10.4