Removal of old full-record div now honours teamname.
[mkws-moved-to-github.git] / 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) {