comparison js/core.js @ 2648:781187c743cc

#9 Clear node on each postNode event
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Thu, 19 Jan 2017 15:51:49 +0000
parents 83ae42eab960
children 8f3ea7ce794b
comparison
equal deleted inserted replaced
2647:83ae42eab960 2648:781187c743cc
636 // This will take the node from the popupOptions and display it 636 // This will take the node from the popupOptions and display it
637 var node = this.popupOptions[this.currentIndex], 637 var node = this.popupOptions[this.currentIndex],
638 converter = new showdown.Converter(), 638 converter = new showdown.Converter(),
639 p = new DOMParser(); 639 p = new DOMParser();
640 this.popupResponse.innerHTML = ""; 640 this.popupResponse.innerHTML = "";
641 this.popupTitle.innerHTML = "";
641 this.popupTitle.appendChild(p.parseFromString(converter.makeHtml(node.specification.statement), "text/html").getElementsByTagName("body")[0].firstElementChild); 642 this.popupTitle.appendChild(p.parseFromString(converter.makeHtml(node.specification.statement), "text/html").getElementsByTagName("body")[0].firstElementChild);
642 if (node.specification.type == 'question') { 643 if (node.specification.type == 'question') {
643 var textArea = document.createElement('textarea'); 644 var textArea = document.createElement('textarea');
644 switch (node.specification.boxsize) { 645 switch (node.specification.boxsize) {
645 case 'small': 646 case 'small':