changeset 2549:c5fd47349a4f

#107. Added axis-name setting in test_create
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Mon, 14 Nov 2016 20:34:58 +0000
parents c821dc2e26f5
children 15b42e98b06c
files test_create/test_core.js
diffstat 1 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test_create/test_core.js	Thu Nov 17 13:07:20 2016 +0000
+++ b/test_create/test_core.js	Mon Nov 14 20:34:58 2016 +0000
@@ -1595,7 +1595,7 @@
                         this.parent.specification.title = event.currentTarget.value;
                     }
                 }
-                this.titleNode.label.textContent = "Axis Title:";
+                this.titleNode.label.textContent = "Presented Axis Title:";
                 this.titleNode.root.className = "node-children";
                 this.titleNode.root.appendChild(this.titleNode.label);
                 this.titleNode.root.appendChild(this.titleNode.input);
@@ -1603,6 +1603,24 @@
                 this.titleNode.input.value = this.specification.title;
                 this.children.push(this.titleNode);
                 this.childrenDOM.appendChild(this.titleNode.root);
+                // Set the interface-name attribute
+                this.axisName = {
+                    root: document.createElement("div"),
+                    label: document.createElement("span"),
+                    input: document.createElement("input"),
+                    parent: this,
+                    handleEvent: function (event) {
+                        this.parent.specification.name = event.currentTarget.value;
+                    }
+                }
+                this.axisName.label.textContent = "Saved Axis Name (no spaces):";
+                this.axisName.root.className = "node-children";
+                this.axisName.root.appendChild(this.axisName.label);
+                this.axisName.root.appendChild(this.axisName.input);
+                this.axisName.input.addEventListener("change", this.axisName, false);
+                this.axisName.input.value = this.specification.name;
+                this.children.push(this.axisName);
+                this.childrenDOM.appendChild(this.axisName.root);
             }
 
             // Put in the check / show options as individual children