Mercurial > hg > webaudioevaluationtool
diff js/core.js @ 2730:a13adc8f8d3d
#201 Fixed
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Wed, 19 Apr 2017 09:30:06 +0100 |
parents | 9c01d5dd22a2 |
children | f2bb15d5f5c9 |
line wrap: on
line diff
--- a/js/core.js Tue Apr 18 15:35:11 2017 +0200 +++ b/js/core.js Wed Apr 19 09:30:06 2017 +0100 @@ -873,7 +873,7 @@ function processNumber(node) { var input = this.popupContent.getElementsByTagName('input')[0]; - if (node.mandatory === true && input.value.length === 0) { + if (node.specification.mandatory === true && input.value.length === 0) { interfaceContext.lightbox.post("Error", 'This question is mandatory. Please enter a number'); return false; } @@ -882,12 +882,12 @@ interfaceContext.lightbox.post("Error", 'Please enter a valid number'); return false; } - if (enteredNumber < node.min && node.min !== null) { - interfaceContext.lightbox.post("Error", 'Number is below the minimum value of ' + node.min); + if (enteredNumber < node.specification.min && node.specification.min !== null) { + interfaceContext.lightbox.post("Error", 'Number is below the minimum value of ' + node.specification.min); return false; } - if (enteredNumber > node.max && node.max !== null) { - interfaceContext.lightbox.post("Error", 'Number is above the maximum value of ' + node.max); + if (enteredNumber > node.specification.max && node.specification.max !== null) { + interfaceContext.lightbox.post("Error", 'Number is above the maximum value of ' + node.specification.max); return false; } node.response = input.value;