Removal of old full-record div now honours teamname.
authorMike Taylor <mike@indexdata.com>
Wed, 2 Apr 2014 10:48:25 +0000 (11:48 +0100)
committerMike Taylor <mike@indexdata.com>
Wed, 2 Apr 2014 10:48:25 +0000 (11:48 +0100)
src/mkws-team.js

index 2ae79bd..8a78520 100644 (file)
@@ -366,11 +366,7 @@ function team($, teamName) {
        m_currentRecordId = recId;
 
        // remove current detailed view if any
-       // ##### restrict to current team
-       var detRecordDiv = document.getElementById(recordDetailsId(oldRecordId));
-       // lovin DOM!
-       if (detRecordDiv)
-           detRecordDiv.parentNode.removeChild(detRecordDiv);
+       findnode('#' + recordDetailsId(oldRecordId)).remove();
 
        // if the same clicked, just hide
        if (recId == oldRecordId) {