changeset 2787:28bc4e90e026

#133 Added to specification.js (decoder)
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Sat, 22 Apr 2017 17:47:09 +0100
parents a41a299223ab
children a4bcbcda23f7
files js/specification.js tests/examples/AB_example.xml
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/js/specification.js	Sat Apr 22 17:43:26 2017 +0100
+++ b/js/specification.js	Sat Apr 22 17:47:09 2017 +0100
@@ -442,6 +442,9 @@
                         option[attributeName] = projectAttr;
                     }
                 }
+                if (option.type == "check" && ioNode.firstElementChild) {
+                    option.errorMessage = ioNode.firstElementChild.textContent;
+                }
                 this.options.push(option);
             }
             // Get the image node
--- a/tests/examples/AB_example.xml	Sat Apr 22 17:43:26 2017 +0100
+++ b/tests/examples/AB_example.xml	Sat Apr 22 17:47:09 2017 +0100
@@ -46,7 +46,9 @@
             </metric>
             <interface>
                 <interfaceoption type="check" name="fragmentMoved" />
-                <interfaceoption type="check" name="scalerange" min="25" max="75" />
+                <interfaceoption type="check" name="scalerange" min="25" max="75">
+                    <errormessage>Test Error Message</errormessage>
+                </interfaceoption>
                 <interfaceoption type="show" name='playhead' />
                 <interfaceoption type="show" name="page-count" />
                 <interfaceoption type="show" name='volume' />