# HG changeset patch # User Nicholas Jillings # Date 1455199644 0 # Node ID 1dbc6d3e6fb5bb0edf96236eebf69263e10a552d # Parent cf55f9ee94469443be646711b5e30705d059ef16 Test Creator nearing completion. Some more GUI events needed. Generates valid XML, can create new or use old. Supports most features. diff -r cf55f9ee9446 -r 1dbc6d3e6fb5 test-schema.xsd --- a/test-schema.xsd Thu Feb 11 12:06:54 2016 +0000 +++ b/test-schema.xsd Thu Feb 11 14:07:24 2016 +0000 @@ -80,8 +80,8 @@ - - + + diff -r cf55f9ee9446 -r 1dbc6d3e6fb5 test_create/style.css --- a/test_create/style.css Thu Feb 11 12:06:54 2016 +0000 +++ b/test_create/style.css Thu Feb 11 14:07:24 2016 +0000 @@ -61,6 +61,11 @@ margin: 0px 5px; } +div.popup-option-entry { + padding: 5px 0px; + border-bottom: 1px solid; +} + div.disabled{ color: rgb(100,100,100); } @@ -80,10 +85,9 @@ margin: 5px 0px; } div.node-attributes { - width: auto; + min-width: 92%; float: left; padding: 10px; - border: black 2px dashed; } div.attribute { float: left; @@ -91,9 +95,11 @@ } div.node-children { float: left; + min-width: 92%; } div.node-buttons { float: left; + min-width: 92%; } div.attribute input { max-width: 100px; diff -r cf55f9ee9446 -r 1dbc6d3e6fb5 test_create/test_core.js --- a/test_create/test_core.js Thu Feb 11 12:06:54 2016 +0000 +++ b/test_create/test_core.js Thu Feb 11 14:07:24 2016 +0000 @@ -223,6 +223,7 @@ var parse = new DOMParser(); specification.decode(parse.parseFromString(decoded.target.result,'text/xml')); popupObject.hide(); + popupObject.popupContent.innerHTML = null; convert.convert(document.getElementById('content')); } reader.readAsText(files); @@ -575,6 +576,7 @@ this.dynamic = document.createElement("div"); this.option = null; this.parent = null; + this.optionLists = []; var select = document.createElement("select"); select.setAttribute("name","type"); select.addEventListener("change",this,false); @@ -610,11 +612,23 @@ statementEntry.setAttribute("name","statement"); statementEntry.value = this.option.statement; this.dynamic.appendChild(statement); + + var id = document.createElement("div"); + var idText = document.createElement("span"); + var idEntry = document.createElement("input"); + id.appendChild(idText); + id.appendChild(idEntry); + idText.textContent = "ID: "; + idEntry.addEventListener("change",this,false); + idEntry.setAttribute("name","id"); + idEntry.value = this.option.id; + switch(this.option.type) { case "statement": break; case "question": + this.dynamic.appendChild(id); var boxsizeSelect = document.createElement("select"); var optionList = specification.schema.getAllElementsByName("survey")[0].getAllElementsByName("boxsize")[0].getAllElementsByTagName("xs:enumeration"); for (var i=0; i