# HG changeset patch # User Nicholas Jillings # Date 1460983655 -3600 # Node ID 0de30572612943ed212157386db775966d5e95c2 # Parent 86fd1dbae138a6b426ec8939dc4f7eca6b100e68 Fixed test create not exposing interface node title element. diff -r 86fd1dbae138 -r 0de305726129 js/specification.js --- a/js/specification.js Fri Apr 15 16:11:47 2016 +0100 +++ b/js/specification.js Mon Apr 18 13:47:35 2016 +0100 @@ -370,6 +370,11 @@ var node = doc.createElement("interface"); if (typeof name == "string") node.setAttribute("name",this.name); + if (typeof this.title == "string") { + var titleNode = doc.createElement("title"); + titleNode.textContent = this.title; + node.appendChild(titleNode); + } for (var option of this.options) { var child = doc.createElement("interfaceoption"); diff -r 86fd1dbae138 -r 0de305726129 test_create/test_core.js --- a/test_create/test_core.js Fri Apr 15 16:11:47 2016 +0100 +++ b/test_create/test_core.js Mon Apr 18 13:47:35 2016 +0100 @@ -1585,6 +1585,27 @@ this.buttonDOM = obj.buttonsDOM; this.HTMLPoint = parent; this.rootDOM.removeChild(this.attributeDOM); + if (parent.id != "setup") { + // Put in the node: + this.titleNode = { + root: document.createElement("div"), + label: document.createElement("span"), + input: document.createElement("input"), + parent: this, + handleEvent: function(event) { + this.parent.specification.title = event.currentTarget.value; + } + } + this.titleNode.label.textContent = "Axis Title:"; + this.titleNode.root.className = "node-children"; + this.titleNode.root.appendChild(this.titleNode.label); + this.titleNode.root.appendChild(this.titleNode.input); + this.titleNode.input.addEventListener("change",this.titleNode,false); + this.titleNode.input.value = this.specification.title; + this.children.push(this.titleNode); + this.childrenDOM.appendChild(this.titleNode.root); + } + // Put in the check / show options as individual children var checks = this.parent.createGeneralNodeDOM("Checks","setup-interface-checks",this);