- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 20 Aug 2010 05:51:19 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec-author-view In directory hutz:/tmp/cvs-serv1145 Modified Files: dfn.js Log Message: deal properly in pop-ups for case where we have only the defining instance of a term but no references to it Index: dfn.js =================================================================== RCS file: /sources/public/html5/spec-author-view/dfn.js,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- dfn.js 19 Aug 2010 12:30:54 -0000 1.14 +++ dfn.js 20 Aug 2010 05:51:17 -0000 1.15 @@ -16,6 +16,13 @@ networkStatus.textContent = dots; if (request.readyState == 4) { panelDiv.innerHTML = request.responseText; + if (panelDiv.firstChild.className == "has-norefs") { + var definingInstance = panelDiv.firstChild.firstChild; + while (definingInstance.nodeType != definingInstance.ELEMENT_NODE) { + definingInstance = definingInstance.nextSibling; + } + panelDiv.firstChild.removeChild(definingInstance); + } } }; try { @@ -73,6 +80,13 @@ if (targetNode) { panelDiv.innerHTML = targetNode.innerHTML; panelDiv.removeChild(panelDiv.firstChild); + if (targetNode.className == "has-norefs") { + var definingInstance = panelDiv.firstChild; + while (definingInstance.nodeType != definingInstance.ELEMENT_NODE) { + definingInstance = definingInstance.nextSibling; + } + panelDiv.removeChild(definingInstance); + } } else { console.log(node); return -1;
Received on Friday, 20 August 2010 05:51:20 UTC